A82: Whats wrong here?
[Prev][Next][Index][Thread]
A82: Whats wrong here?
When I run this program compiled for the Oshell82
it looks alright, but when I quit and go back the calc gives
funny answers when I check my Mem...later it crashes.
I cant figure out why, can you?
/P-A
-----------
#include "OFFTI-82.h"
.org 0
#IFDEF OSHELL82
.db "Test",0
#ENDIF
ld hl,(PROGRAM_ADDR)
ld de,Text
add hl,de
Main: push hl
ROM_CALL(CLEARLCD)
ld a,0
ld (CURSOR_ROW),a
ld (CURSOR_COL),a
ld b,129
MiniLoop:
pop hl
ld a,(hl)
ldi
dec b
push hl
ROM_CALL(TX_CHARPUT)
ld a,b
cp 0
jr nz,MiniLoop
Loop:
call GET_KEY
cp $37
jr z,Quit
cp $04
jr z,Upp
cp $01
jr z,Ner
jr Loop
Quit:
pop hl
ret
Ner:
pop hl
ld bc,112
lddr
jr Main
Upp:
pop hl
ld bc,144
lddr
jr Main
Text:
.db "1234567890123456"
.db "2HMisc Text LB "
.db "3Rasdfasfasdfjjj"
.db "4Yeah c. A={CY,"
.db "5}<- "
.db "6LC m **0P0*"
.db "7234567890123456"
.db "8HL]=[C],HL=HLB "
.db "9LA --0-0*ate "
.db "10ft Acc. A={CY,"
.db "11<- "
.db "12C m **0P0*"
.db "1334567890123456"
.db "14L]=[C],HL=HLB "
.db "15A --0-0*ate "
.db "16ft Acc. A={CY,"
.db "17<- "
.db "18C m **0P0*"
.db "1934567890123456"
.db "20L]=[C],HL=HLB "
.db "21A --0-0*ate "
.db "22ft Acc. A={CY,"
.db "23<- "
.db "24C m **0P0*"
.db "252345SLUUUTTT!!",0
.end
.end