Quantcast
Channel: Cemetech
Viewing all articles
Browse latest Browse all 75762

z80 Assembly :: RE: z80 version of If

$
0
0
Author: chickendude
Posted: 19 Nov 2012 02:14:15 pm (GMT -5)

What bcall? You mean bcallz(XXX)? When would you ever use that? If you want you can just jump over the bcall:

Code:
   cp $3F
   jr nz,skipBcall       ;usually you would just use jr nz,$+5 : 5 because jr takes 2 bytes and bcall is 3 bytes, so you jump forward 5 bytes
   bcall(_XXXX)
skipBcall:
Also, in your original example it should be jp not jq Wink

I think z80 code is really beautiful, though another pair (or two) of registers would have been really handy for some more complicated routines.


Viewing all articles
Browse latest Browse all 75762

Latest Images

Trending Articles



Latest Images