05-16-2013, 04:01 PM
this is fun
here is how I printed a block to co-ords 7,3
but if I move INC H to just before the jump command the screen goes a bit weird
EDIT
ohhh
INC seems to set the zero flag
here is how I printed a block to co-ords 7,3
Code:
function FASTCALL drawthis() as ubyte
asm
LD HL,16384
LD BC,7
LD A,3
RRC A
RRC A
RRC A
OR 7
LD L,A
drawblokes:
INC H
LD A,254
LD (HL),A
DEC BC
LD A, B
OR C
JP NZ,drawblokes
end asm
end function
drawthis()
Print "done"
but if I move INC H to just before the jump command the screen goes a bit weird
Code:
function FASTCALL drawthis() as ubyte
asm
LD HL,16384
LD BC,7
LD A,3
RRC A
RRC A
RRC A
OR 7
LD L,A
drawblokes:
LD A,254
LD (HL),A
DEC BC
LD A, B
OR C
INC H
JP NZ,drawblokes
end asm
end function
drawthis()
Print "done"
EDIT
ohhh
INC seems to set the zero flag