mirror of
https://github.com/mist64/msbasic.git
synced 2024-12-21 17:30:09 +00:00
working on kbdbasic
This commit is contained in:
parent
dedef396f6
commit
f274e63f40
@ -1,5 +1,7 @@
|
||||
Name Year MS Version ROM 9digit extensions
|
||||
Name Year MS Version ROM 9digit extensions comment
|
||||
Commodore BASIC 1 1977 Y Y CBM
|
||||
OSI BASIC 1977 1.0 REV 3.2 Y N -
|
||||
KBD BASIC ? Y N KBD (maybe betw. CBM&OSI)
|
||||
KIM BASIC 1977 1.1 N Y -
|
||||
AppleSoft I 1977 N Y Apple
|
||||
Commodore BASIC 2 1979 Y Y CBM
|
||||
|
1
TODO.txt
1
TODO.txt
@ -3,3 +3,4 @@
|
||||
* use C enum for zero page
|
||||
* convert messy init code into completely different
|
||||
files without ifdefs (not much in common!)
|
||||
* generate keyword and pointer list together
|
||||
|
@ -54,7 +54,7 @@ TEMP3 := $009D; ; same
|
||||
DSCPTR := $009F
|
||||
DSCLEN := $00A2
|
||||
JMPADRS := $00A3
|
||||
TEMPX := $00A4
|
||||
LENGTH := $00A4
|
||||
ARGEXTENSION := $00A5 ; overlap with JMPADRS! (same on c64)
|
||||
TEMP1 := $00A6
|
||||
HIGHDS := $00A7
|
||||
@ -137,7 +137,7 @@ TEMP3 := $009D-82 ; same
|
||||
DSCPTR := $009F-82
|
||||
DSCLEN := $00A2-82
|
||||
JMPADRS := $00A3-82
|
||||
TEMPX := $00A4-82
|
||||
LENGTH := $00A4-82
|
||||
ARGEXTENSION := $00A5-82 ; overlap with JMPADRS! (same on c64)
|
||||
TEMP1 := $00A6-82
|
||||
HIGHDS := $00A7-82
|
||||
|
148
defines_kbd.s
Normal file
148
defines_kbd.s
Normal file
@ -0,0 +1,148 @@
|
||||
Z00 := $0700
|
||||
L0001 := $0001
|
||||
L0002 := $0002
|
||||
GOWARM := $0003
|
||||
GOSTROUT := $0006
|
||||
GOGIVEAYF := $0008
|
||||
|
||||
USR := $000A
|
||||
Z15 := $000D
|
||||
Z16 := $06FB;$000E
|
||||
Z17 := $06FC;$000F
|
||||
Z18 := $06FD;$0010
|
||||
LINNUM := $0011
|
||||
TXPSV := $0011
|
||||
INPUTBUFFER := $0013
|
||||
CHARAC := $0006;5B
|
||||
ENDCHR := $0007;5C
|
||||
EOLPNTR := $0008;5D
|
||||
DIMFLG := $0009;5E
|
||||
VALTYP := $000A;5F
|
||||
DATAFLG := $000B;60
|
||||
SUBFLG := $000C;61
|
||||
INPUTFLG := $000D;62
|
||||
CPRMASK := $000E;63
|
||||
Z14 := $000F;64 ; Ctrl+O flag
|
||||
TEMPPT := $0015;65
|
||||
LASTPT := $0016;;66
|
||||
INDEX := $0021;71
|
||||
DEST := $0023;73
|
||||
RESULT := $0025;75
|
||||
RESULT_LAST := $0028;78
|
||||
TXTTAB := $0029;79
|
||||
VARTAB := $002B;7B
|
||||
ARYTAB := $002D;7D
|
||||
STREND := $002F;7F
|
||||
FRETOP := $0031;81
|
||||
FRESPC := $0033;83
|
||||
MEMSIZ := $0035;;85
|
||||
CURLIN := $0037;87
|
||||
OLDLIN := $0039;89
|
||||
OLDTEXT := $003B;8B
|
||||
Z8C := $003D;8D
|
||||
DATPTR := $003F;8F
|
||||
INPTR := $0041;91
|
||||
VARNAM := $0043;93
|
||||
VARPNT := $0045;95
|
||||
FORPNT := $0047;97
|
||||
LASTOP := $0049;99
|
||||
CPRTYP := $004B;9B
|
||||
FNCNAM := $004C;9C
|
||||
TEMP3 := $004C;;9C ; same
|
||||
DSCPTR := $004E;9E
|
||||
|
||||
DSCLEN := $0050;A0
|
||||
JMPADRS := $0093;A1
|
||||
|
||||
LENGTH := $0094
|
||||
|
||||
TEMP1 := $0053;A3
|
||||
ARGEXTENSION := $0053;;A3 ; same!
|
||||
HIGHDS := $0054;A4
|
||||
HIGHTR := $0056;A6
|
||||
INDX := $0058;;A8
|
||||
TEMP2 := $0058;;A8 ; same!
|
||||
TMPEXP := $0058;;A8 ; same
|
||||
EXPON := $0059;A9
|
||||
LOWTR := $0094;AA ; $AB also EXPSGN?
|
||||
EXPSGN := $005B;;AB
|
||||
FAC := $005C;AC
|
||||
FAC_LAST := $005F;;AF
|
||||
FACSIGN := $0060;B0
|
||||
SERLEN := $0061;B1
|
||||
SHIFTSIGNEXT := $0062;B2
|
||||
ARG := $0063;B3
|
||||
ARG_LAST := $0066;;B6
|
||||
ARGSIGN := $0067;B7
|
||||
STRNG1 := $0068;B8 ; TODO: also SGNCPR
|
||||
FACEXTENSION := $0069;;B9
|
||||
STRNG2 := $006A;BA
|
||||
CHRGET := $006C;BC
|
||||
CHRGOT := $0072;C2
|
||||
TXTPTR := $0073;C3
|
||||
|
||||
RNDSEED := $00D4
|
||||
|
||||
L0207 := $0207
|
||||
L020A := $020A
|
||||
;L2A13 := $2A0A
|
||||
L2EE2 := $2EF9
|
||||
MONRDKEY := $FFEB
|
||||
MONCOUT := $FFEE
|
||||
MONISCNTC := $FFF1
|
||||
LOAD := $FFF4
|
||||
SAVE := $FFF7
|
||||
|
||||
BYTES_PER_FRAME := $10
|
||||
SPACE_FOR_GOSUB := $49
|
||||
TEMPST := $68
|
||||
FOR_STACK1 := $0D
|
||||
FOR_STACK2 := $08
|
||||
NUM_TOKENS := $1C
|
||||
NULL_MAX := $0A
|
||||
BYTES_PER_ELEMENT := 4
|
||||
BYTES_PER_VARIABLE := 6
|
||||
BYTES_FP := 4
|
||||
MANTISSA_BYTES := BYTES_FP-1
|
||||
|
||||
RAMSTART3 := $0300
|
||||
|
||||
TOKEN_GOTO := $88
|
||||
TOKEN_GOSUB := $8C
|
||||
TOKEN_TAB := $9C
|
||||
TOKEN_TO := $9D
|
||||
TOKEN_FN := $9E
|
||||
TOKEN_SPC := $9F
|
||||
TOKEN_THEN := $A0
|
||||
TOKEN_NOT := $A1
|
||||
TOKEN_STEP := $A2
|
||||
TOKEN_PLUS := $A3
|
||||
TOKEN_MINUS := $A4
|
||||
TOKEN_GREATER := $AA
|
||||
TOKEN_EQUAL := $AB
|
||||
TOKEN_SGN := $AD
|
||||
TOKEN_LEFTSTR := $C1
|
||||
|
||||
RAMSTART2 := $0300
|
||||
|
||||
PRT = $AAAA
|
||||
VSAV = $AAAA
|
||||
VLOD = $AAAA
|
||||
PSAV = $AAAA
|
||||
GETC = $AAAA
|
||||
LE68C = $AAAA
|
||||
LDE42 = $AAAA ; PRIMM ?
|
||||
LFDDA = $AAAA
|
||||
LE33D = $AAAA
|
||||
LF457 = $AAAA
|
||||
LFD3E = $AAAA
|
||||
INLIN = $AAAA
|
||||
GETLN = $AAAA
|
||||
LFF64 = $AAAA
|
||||
LF422 = $AAAA
|
||||
LFFD3 = $AAAA
|
||||
LC46E = $AAAA
|
||||
FL1 = $AAAA
|
||||
LFFED = $AAAA
|
||||
LFFD6 = $AAAA
|
||||
|
@ -52,7 +52,7 @@ DSCPTR := $009D
|
||||
|
||||
DSCLEN := $00A0
|
||||
JMPADRS := $00A1
|
||||
TEMPX := $00A2
|
||||
LENGTH := $00A2
|
||||
ARGEXTENSION := $00A3 ; overlap with JMPADRS! (same on c64)
|
||||
TEMP1 := $00A4
|
||||
HIGHDS := $00A5
|
||||
|
8
kbdbasic.cfg
Normal file
8
kbdbasic.cfg
Normal file
@ -0,0 +1,8 @@
|
||||
MEMORY {
|
||||
BASROM: start = $E000, size = $3F00, fill = no, file = %O;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
BASIC: load = BASROM, type = ro;
|
||||
}
|
||||
|
25
make.sh
25
make.sh
@ -1,30 +1,43 @@
|
||||
# 1.0
|
||||
ca65 -D CBM -D CBM1 msbasic.s -o cbmbasic1.o &&
|
||||
echo cbmbasic1
|
||||
ca65 -D CBM -D CBM1 -D CBM_KBD msbasic.s -o cbmbasic1.o &&
|
||||
ld65 -C cbmbasic.cfg cbmbasic1.o -o cbmbasic1-new.bin &&
|
||||
xxd -g 1 cbmbasic1.bin > cbmbasic1.bin.txt
|
||||
xxd -g 1 cbmbasic1-new.bin > cbmbasic1-new.bin.txt
|
||||
diff -u cbmbasic1.bin.txt cbmbasic1-new.bin.txt | head
|
||||
|
||||
# 1.0 ?
|
||||
echo kbdbasic
|
||||
ca65 -D KBD -D OSI_KBD -D CBM_KBD -D CBM2_KBD -D KIM_KBD -D CONFIG_11 msbasic.s -o kbdbasic.o &&
|
||||
ld65 -C kbdbasic.cfg kbdbasic.o -o kbdbasic-new.bin &&
|
||||
#xxd -g 1 kbdbasic.bin > kbdbasic.bin.txt
|
||||
#xxd -g 1 kbdbasic-new.bin > kbdbasic-new.bin.txt
|
||||
#diff -u kbdbasic.bin.txt kbdbasic-new.bin.txt | head
|
||||
|
||||
da65 --info kbdbasic-temp.txt
|
||||
#opendiff ../cbmbasic2.s cbmbasic2-new.s
|
||||
|
||||
# 1.0 rev 3.2
|
||||
ca65 -D OSI msbasic.s -o osi.o &&
|
||||
echo osi
|
||||
ca65 -D OSI -D OSI_KBD msbasic.s -o osi.o &&
|
||||
ld65 -C osi.cfg osi.o -o osi-new.bin
|
||||
xxd -g 1 osi.bin > osi.bin.txt
|
||||
xxd -g 1 osi-new.bin > osi-new.bin.txt
|
||||
diff -u osi.bin.txt osi-new.bin.txt | head
|
||||
|
||||
# 1.1
|
||||
ca65 -D KIM -D CONFIG_11 msbasic.s -o kb9.o &&
|
||||
echo kb9
|
||||
ca65 -D KIM -D KIM_KBD -D CONFIG_11 msbasic.s -o kb9.o &&
|
||||
ld65 -C kb9.cfg kb9.o -o kb9-new.bin &&
|
||||
xxd -g 1 kb9.bin > kb9.bin.txt
|
||||
xxd -g 1 kb9-new.bin > kb9-new.bin.txt
|
||||
diff -u kb9.bin.txt kb9-new.bin.txt | head
|
||||
|
||||
# 2
|
||||
ca65 -D CBM -D CBM2 -D CONFIG_11 msbasic.s -o cbmbasic2.o &&
|
||||
echo cbmbasic2
|
||||
ca65 -D CBM -D CBM2 -D CONFIG_11 -D CBM_KBD -D CBM2_KBD msbasic.s -o cbmbasic2.o &&
|
||||
ld65 -C cbmbasic.cfg cbmbasic2.o -o cbmbasic2-new.bin &&
|
||||
xxd -g 1 cbmbasic2.bin > cbmbasic2.bin.txt
|
||||
xxd -g 1 cbmbasic2-new.bin > cbmbasic2-new.bin.txt
|
||||
diff -u cbmbasic2.bin.txt cbmbasic2-new.bin.txt | head
|
||||
|
||||
#da65 --info cbmbasic2-temp.txt
|
||||
#opendiff ../cbmbasic2.s cbmbasic2-new.s
|
||||
|
Loading…
Reference in New Issue
Block a user