mirror of
https://github.com/rkujawa/rk65c02.git
synced 2026-04-21 15:16:44 +00:00
examples/msbasic: add patches for rk65c02 platform (defines, extra, iscntc, loadsave, init, print)
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
--- a/defines.s
|
||||
+++ b/defines.s
|
||||
@@ -24,6 +24,9 @@
|
||||
.elseif .def(aim65)
|
||||
AIM65 := 1
|
||||
.include "defines_aim65.s"
|
||||
+.elseif .def(rk65c02)
|
||||
+RK65C02 := 1
|
||||
+.include "defines_rk65c02.s"
|
||||
.elseif .def(sym1)
|
||||
SYM1 := 1
|
||||
.include "defines_sym1.s"
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/extra.s
|
||||
+++ b/extra.s
|
||||
@@ -22,6 +22,9 @@
|
||||
.endif
|
||||
|
||||
+.ifdef RK65C02
|
||||
+.include "rk65c02_extra.s"
|
||||
+.endif
|
||||
.ifdef AIM65
|
||||
.include "aim65_extra.s"
|
||||
.endif
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/init.s
|
||||
+++ b/init.s
|
||||
@@ -105,6 +105,9 @@
|
||||
sty ATN+2
|
||||
sta GOSTROUT+1
|
||||
sty GOSTROUT+2
|
||||
+ .elseif .def(RK65C02)
|
||||
+ sta GOSTROUT+1
|
||||
+ sty GOSTROUT+2
|
||||
.else
|
||||
sta USR+1
|
||||
sty USR+2
|
||||
@@ -0,0 +1,28 @@
|
||||
--- a/init.s 2026-03-07 21:46:05.896443558 +0100
|
||||
+++ b/init.s 2026-03-07 21:46:33.793584864 +0100
|
||||
@@ -51,6 +51,7 @@
|
||||
sta GORESTART+1
|
||||
sty GORESTART+2
|
||||
.ifndef AIM65
|
||||
+ .ifndef RK65C02
|
||||
sta GOSTROUT+1
|
||||
sty GOSTROUT+2
|
||||
lda #<AYINT
|
||||
@@ -62,6 +63,7 @@
|
||||
sta GOGIVEAYF
|
||||
sty GOGIVEAYF+1
|
||||
.endif
|
||||
+ .endif
|
||||
.endif
|
||||
lda #$4C
|
||||
.ifdef CONFIG_CBM_ALL
|
||||
@@ -91,6 +93,9 @@
|
||||
.ifdef APPLE
|
||||
lda #<USR_FUNC
|
||||
ldy #>USR_FUNC
|
||||
+ .elseif .def(RK65C02)
|
||||
+ lda #<STROUT
|
||||
+ ldy #>STROUT
|
||||
.else
|
||||
lda #<IQERR
|
||||
ldy #>IQERR
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/init.s 2026-03-07 21:41:40.145609568 +0100
|
||||
+++ b/init.s 2026-03-07 21:41:40.145413973 +0100
|
||||
@@ -51,6 +51,7 @@
|
||||
sta GORESTART+1
|
||||
sty GORESTART+2
|
||||
.ifndef AIM65
|
||||
+ .ifndef RK65C02
|
||||
sta GOSTROUT+1
|
||||
sty GOSTROUT+2
|
||||
lda #<AYINT
|
||||
@@ -62,6 +63,7 @@
|
||||
sta GOGIVEAYF
|
||||
sty GOGIVEAYF+1
|
||||
.endif
|
||||
+ .endif
|
||||
.endif
|
||||
lda #$4C
|
||||
.ifdef CONFIG_CBM_ALL
|
||||
@@ -91,6 +93,9 @@
|
||||
.ifdef APPLE
|
||||
lda #<USR_FUNC
|
||||
ldy #>USR_FUNC
|
||||
+ .elseif .def(RK65C02)
|
||||
+ lda #<STROUT
|
||||
+ ldy #>STROUT
|
||||
.else
|
||||
lda #<IQERR
|
||||
ldy #>IQERR
|
||||
@@ -100,6 +105,9 @@
|
||||
sty ATN+2
|
||||
sta GOSTROUT+1
|
||||
sty GOSTROUT+2
|
||||
+ .elseif .def(RK65C02)
|
||||
+ sta GOSTROUT+1
|
||||
+ sty GOSTROUT+2
|
||||
.else
|
||||
sta USR+1
|
||||
sty USR+2
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/iscntc.s
|
||||
+++ b/iscntc.s
|
||||
@@ -21,6 +21,9 @@
|
||||
.ifdef MICROTAN
|
||||
.include "microtan_iscntc.s"
|
||||
.endif
|
||||
+.ifdef RK65C02
|
||||
+.include "rk65c02_iscntc.s"
|
||||
+.endif
|
||||
.ifdef AIM65
|
||||
.include "aim65_iscntc.s"
|
||||
.endif
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/loadsave.s
|
||||
+++ b/loadsave.s
|
||||
@@ -12,6 +12,9 @@
|
||||
.ifdef MICROTAN
|
||||
.include "microtan_loadsave.s"
|
||||
.endif
|
||||
+.ifdef RK65C02
|
||||
+.include "rk65c02_loadsave.s"
|
||||
+.endif
|
||||
.ifdef AIM65
|
||||
.include "aim65_loadsave.s"
|
||||
.endif
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/print.s
|
||||
+++ b/print.s
|
||||
@@ -100,7 +100,12 @@ L29B9:
|
||||
.else
|
||||
.ifndef APPLE
|
||||
ldy #$00
|
||||
sty INPUTBUFFER,x
|
||||
+ .ifdef RK65C02
|
||||
+ ldx #<(INPUTBUFFER-1)
|
||||
+ ldy #>(INPUTBUFFER-1)
|
||||
+ .else
|
||||
ldx #LINNUM+1
|
||||
+ .endif
|
||||
.endif
|
||||
.if .def(MICROTAN) || .def(SYM1)
|
||||
bne CRDO2
|
||||
Reference in New Issue
Block a user