diff --git a/defines_osi.s b/defines_osi.s index c453e2a..c1702a9 100644 --- a/defines_osi.s +++ b/defines_osi.s @@ -27,8 +27,13 @@ WIDTH2 := 56 RAMSTART2 := $0300 ; magic memory locations -L0207 := $0207 -L020A := $020A +L0200 := $0200 +LD000 := $D000 +LD300 := $D300 +LD700 := $D700 +LFB00 := $FB00 +LFC00 := $FC00 +LFFE0 := $FFE0 ; monitor functions MONRDKEY := $FFEB @@ -36,4 +41,3 @@ MONCOUT := $FFEE MONISCNTC := $FFF1 LOAD := $FFF4 SAVE := $FFF7 - diff --git a/eval.s b/eval.s index 9f11e74..aa7087c 100644 --- a/eval.s +++ b/eval.s @@ -455,8 +455,8 @@ FRM_VARIABLE_CALL = *-1 LCE3B: .else ldx #$00 - stx $6D - bit $62 + stx STRNG1+1 + bit FAC+4 bpl LCE53 cmp #$54 ; T bne LCE53 diff --git a/kbd_extra.s b/kbd_extra.s index 79619b4..067d9e1 100644 --- a/kbd_extra.s +++ b/kbd_extra.s @@ -174,7 +174,7 @@ LBF83: txa sbc FRETOP sta $0521 - lda #$3F + lda #>CONST_MEMSIZ sbc FRETOP+1 sta $0522 lda FRETOP @@ -236,9 +236,9 @@ LFF34: sta HIGHTR lda FRETOP+1 sta HIGHTR+1 - lda #$FF + lda #CONST_MEMSIZ sta HIGHDS+1 lda $0523 sta FRETOP diff --git a/osi_extra.s b/osi_extra.s index 26f67ab..9c69706 100644 --- a/osi_extra.s +++ b/osi_extra.s @@ -2,58 +2,56 @@ .byte $00,$00 LBEE4: - lda LBF05 + lda LBF03+2 lsr a bcc LBEE4 - lda $FB03 - sta $FB07 + lda LFB00+3 + sta LFB00+7 and #$7F rts pha LBEF4: - lda $FB05 + lda LFB00+5 bpl LBEF4 pla - sta $FB04 + sta LFB00+4 rts - lda $FB06 + lda LFB00+6 lda #$FF - .byte $8D - .byte $05 -LBF05: - .byte $FB +LBF03: + sta LFB00+5 rts LBF07: - lda $FC00 + lda LFC00 lsr a bcc LBF07 - lda $FC01 + lda LFC00+1 beq LBF07 and #$7F rts pha LBF16: - lda $FC00 + lda LFC00 lsr a lsr a bcc LBF16 pla - sta $FC01 + sta LFC00+1 rts lda #$03 - sta $FC00 + sta LFC00 lda #$B1 - sta $FC00 + sta LFC00 rts - sta $0202 + sta L0200+2 pha txa pha tya pha - lda $0202 + lda L0200+2 beq LBF6D - ldy $0206 + ldy L0200+6 beq LBF47 LBF3F: ldx #$40 @@ -70,13 +68,13 @@ LBF47: jsr LBFD5 jmp LBF6D LBF55: - sta $0201 + sta L0200+1 jsr LBFC2 - inc $0200 - lda $FFE1 + inc L0200+0 + lda LFFE0+1 clc - adc $FFE0 - cmp $0200 + adc LFFE0+0 + cmp L0200+0 bmi LBF73 LBF6A: jsr LBFDE @@ -91,70 +89,70 @@ LBF73: jsr LBFD8 LBF76: jsr LBFC2 - lda $FFE0 + lda LFFE0 and #$E0 - sta $0202 + sta L0200+2 ldx #$07 LBF83: lda LBFF3,x - sta L0207,x + sta L0200+7,x dex bpl LBF83 ldx LBFFB,y lda #$20 - ldy $FFE1 + ldy LFFE0+1 cpy #$20 bmi LBF99 asl a LBF99: - sta $0208 + sta L0200+8 ldy #$00 LBF9E: - jsr L0207 + jsr L0200+7 bne LBF9E - inc $0209 - inc $020C - cpx $0209 + inc L0200+9 + inc L0200+12 + cpx L0200+9 bne LBF9E LBFAE: - jsr L0207 - cpy $0202 + jsr L0200+7 + cpy L0200+2 bne LBFAE lda #$20 LBFB8: - jsr L020A - dec $0208 + jsr L0200+10 + dec L0200+8 bne LBFB8 beq LBF6A LBFC2: - ldx $0200 - lda $0201 + ldx L0200+0 + lda L0200+1 LBFC8: - ldy $FFE2 + ldy LFFE0+2 bne LBFD1 - sta $D300,x + sta LD300,x rts LBFD1: - sta $D700,x + sta LD700,x rts LBFD5: jsr LBFC2 LBFD8: - lda $FFE0 - sta $0200 + lda LFFE0 + sta L0200+0 LBFDE: - ldx $0200 - lda $D300,x - ldy $FFE2 + ldx L0200+0 + lda LD300,x + ldy LFFE0+2 beq LBFEC - lda $D700,x + lda LD700,x LBFEC: - sta $0201 + sta L0200+1 lda #$5F bne LBFC8 LBFF3: - lda $D000,y - sta $D000,y + lda LD000,y + sta LD000,y iny rts LBFFB: diff --git a/print.s b/print.s index c82a870..f25e50f 100644 --- a/print.s +++ b/print.s @@ -101,7 +101,7 @@ CRDO: .if .def(CONFIG_PRINTNULLS) && .def(CONFIG_FILE) lda CURDVC bne LC9D8 - sta $05 + sta POSX LC9D8: .endif lda #CRLF_1 @@ -116,7 +116,7 @@ CRDO2: PRINTNULLS: .ifdef KBD lda #$00 - sta $10 + sta POSX eor #$FF .else .if .def(CONFIG_NULL) || .def(CONFIG_PRINTNULLS) diff --git a/rnd.s b/rnd.s index a3a98b6..4029794 100644 --- a/rnd.s +++ b/rnd.s @@ -10,8 +10,8 @@ RND: jsr SIGN beq LFC26 bmi LFC10 - lda $87 - ldy $88 + lda RNDSEED + ldy RNDSEED+1 LFBFA: sta FAC+2 sty FAC+1 @@ -33,10 +33,10 @@ LFC10: lda FAC+2 dex bne LFBFE - sta $87 + sta RNDSEED sta FAC+3 lda FAC+1 - sta $88 + sta RNDSEED+1 lda #$80 sta FAC stx FACSIGN