[A83] Re: Op1 (Op2,Op3...)
[Prev][Next][Index][Thread]
[A83] Re: Op1 (Op2,Op3...)
You're doing ld (hl),a, which copies a to whatever hl happens to be pointed
at. Remember -- parentheses always mean you're copying to or from memory,
not just copying register data! What you intended to do is this:
ld l,a
ld h,0
In a message dated 5/16/2001 3:11:45 PM Eastern Daylight Time, rtwolf@gmx.net
writes:
> This outputs 33195, whatever I put in X:
>
> .NOLIST
> #define equ .equ
> #define EQU .equ
> #define end .end
> #include "ti83plus.inc"
> ;#include "tokens.inc"
> .LIST
> #define bcall(xxxx) rst 28h \ .dw xxxx
> #define bcallz(xxxx) jr nz,$+5 \ rst 28h \ .dw xxxx
> #define bcallnz(xxxx) jr z,$+5 \ rst 28h \ .dw xxxx
> #define bcallc(xxxx) jr nc,$+5 \ rst 28h \ .dw xxxx
> #define bcallnc(xxxx) jr c,$+5 \ rst 28h \ .dw xxxx
> #define bjump(xxxx) call 50h \ .dw xxxx
> .addinstr BCALL * EF 3 NOP 1
> saferam1 =9872h ;Ion-
> progstart =9327h ;headers
> .org progstart-2
> .db $BB,$6D
>
> begin:
> bcall(_RclX)
> bcall(_FPSquare)
> bcall(_ConvOP1)
> ld (hl),a
> bcall(_disphl)
> ret
> .end
> END
>
>
----
Jonah Cohen
<ComAsYuAre@aol.com>
http://jonah.ticalc.org