Re: A83: Does this have any problems
[Prev][Next][Index][Thread]
Re: A83: Does this have any problems
There is no "ld a,a+1", if you want to add 1 to a, then do "inc a"..
There's also no 'z' register so you cannot do "ld z,255"
> Here is a program that I made to change chars, can anyone tell me the
> getKey equiv's for the arrows. Right now I just added some numbers in,
> and exactly how many characters are in the font table so I can set the
> lower and upper bounds.
>
> Phelan 'Amen' Wolf
>
> PS: How do I get it to run another program? How do you invert text?
>
> SOURCE::
>
> .org 9327h
> call _runIndicOff
> ld a,0
> lblBEGIN:
> call 4755h ;_clrLCDFULL
> call 4775h ;_homeUp
> ld hl,str1
> call 470Dh ;_puts
> call 473Dh ;_newline
> ld hl,str2
> call 470Dh ;_puts
> call 473Dh ;_newline
> ld hl,str3
> call 470Dh ;_puts
> call 473Dh ;_newline
> ld hl,str4
> call 470Dh ;_puts
> call 473Dh ;_newline
>
> lblSTART:
> call 4CFEh ;_getkey
> ld (varKEY),a
> call 4755h ;_clrLCDFULL
> call 4775h ;_homeUp
> ld a,0
> ld b,a
> ld a,(varKEY)
> cp b
> jp nz,else1
> ld a,10
> ld b,a
> ld a,(varKEY)
> cp b
> jp nz,else2
> jp endif2
> else2:
> endif2:
> lblUPCHAR:
> ld a,a+1 ;add one to a
> ld z,0 ;set lower bound
> jp z, START ;check if a is at lower bound, if is goto start
> ld z,255 ;set upper bound
> jp z, START ;check if a is at lower bound, if is goto start
> call 4755h ;_clrLCDFULL
> call 4775h ;_homeUp
> call _putc
> jp lblSTART
>
> lblDOWNCHAR:
> ld a,a-1 ;add one to a
> ld z,0 ;set lower bound
> jp z, START ;check if a is at lower bound, if is goto start
> ld z,255 ;set upper bound
> jp z, START ;check if a is at lower bound, if is goto start
> call 4755h ;_clrLCDFULL
> call 4775h ;_homeUp
> call _putc
> jp lblSTART
> else1:
> endif1:
> ret
>
> str1:
> .db "USE THE UP AND",0
> str2:
> .db "DOWN ARROWS TO",0
> str3:
> .db "VEIW EACH",0
> str4:
> .db "CHARACTER",0
> varKEY:
> .db $00
>
> RESULT: .db $00,$00
>
> .end
> END
Follow-Ups:
References: