r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[rebcode] Rebcode discussion

Steeve
24-Feb-2007
[2089x3]
8
it is A
_a in my source
BrianH
24-Feb-2007
[2092]
What do 16-bit arithmetic instructions use for an accumulator?
Steeve
24-Feb-2007
[2093x2]
HL
but most of instructions act on A
BrianH
24-Feb-2007
[2095]
Is 8-bit or 16-bit code more common?
Steeve
24-Feb-2007
[2096x6]
8 bit
because it's more compact and faster
and many operations occur only on 8 bit registers
like rotation operations
and bit manipulations
but the first reason is that 8bit register operations are faster
BrianH
24-Feb-2007
[2102x2]
Well, there is no reason to change that balance - the code expects 
it. 16-bit operations can be sped up using a few tricks if necessary, 
like temporary registers that are used internally. You can even name 
those registers _bc, _de and _hl if you like :)
Do the rotation instructions affect the carry flag?
Steeve
24-Feb-2007
[2104x5]
some of them, it's an option
the carry flag can be injected to the left or to the right
or not
there are 12 different rotations
Z80 is good with rotation
BrianH
24-Feb-2007
[2109]
How does your code handle exchanges?
Steeve
24-Feb-2007
[2110x3]
badly
label EXX
	set.i tmp _b set.i _b _b' set.i _b' tmp 
	set.i tmp _c set.i _c _c' set.i _c' tmp
	set.i tmp _d set.i _d _d' set.i _d' tmp
	set.i tmp _e set.i _e _e' set.i _e' tmp
	set.i tmp _h set.i _h _h' set.i _h' tmp
	set.i tmp _l set.i _l _l' set.i _l' tmp
	(cont)
exchange of  b, c, d ,e , h , l, with b' , c', d', e', h', l'
BrianH
24-Feb-2007
[2113]
It could be worse.
Steeve
24-Feb-2007
[2114]
i don't see how :-)
BrianH
24-Feb-2007
[2115]
You could be accessing all of those values indirectly to make the 
swap easier, but slowing down everything else :)
Steeve
24-Feb-2007
[2116x2]
yeah or i could build another instance of the interpreter and swap 
them
Mwahahaha
BrianH
24-Feb-2007
[2118]
I thought of that, except in my head it was a second set of BRAB 
blocks :)
Steeve
24-Feb-2007
[2119]
so, to conclude this session, Rebcode needs union handling and swap 
instruction.
BrianH
24-Feb-2007
[2120x2]
I was thinking vectors and opcodes to handle the struct! type, but 
a swap instruction would be nice too.
I would love a REBOL native swap instruction that worked like block 
set, but we all have dreams :)
Steeve
24-Feb-2007
[2122]
good night Brian
BrianH
24-Feb-2007
[2123x2]
Limited use though.
Good night.
Sunanda
24-Feb-2007
[2125]
Steeve <BTW, why rebcode thread is not on rebol.net ?>

Technically, it is because the group's description does not have 
"[web-pubiic]" in it.....Add that text to the description, and the 
last 300 messages will be on REBOL.net in around 10 minutes.
***

I suspect no one did that either for the reason BrianH suggests, 
or because no one has thought to do it.

I don't see any reason why it should not be a [web-public] group, 
but I'll leave the changing of the group description to the active 
participants. (hint: right-click the group name in the left-hand 
side list of groups)
Pekr
24-Feb-2007
[2126]
Why not to write down your logical conclusions and throw them at 
RAMBO?
Steeve
24-Feb-2007
[2127]
done
Steeve
26-Feb-2007
[2128x7]
2 bugs found: poke doesn't work with tuples and when we poke an image 
with a  RGB tuple value , RGB channels are mixed in a strange manner.
new version of  galaga.r http://perso.orange.fr/rebol/galaga.r
use rebcode but not for the video emulation, so we can get it faster, 
soon...
only 86kb for the source + game rom
(game rom include)
this demo is the first stone of the future MSX emulator, but we could 
emulate lot of computer based on Z80 ship.
the next step is to  include the PSG emulation, yeah ! we will have 
music too.
Graham
27-Feb-2007
[2135]
hey, what about a 6502 emulator ??
Anton
27-Feb-2007
[2136]
Impressive, Steeve.
Henrik
27-Feb-2007
[2137]
wow, that's great, Steeve!
Pekr
27-Feb-2007
[2138]
I am getting some error - which is the latest rebcode release?