This commit is contained in:
Michael Steil 2008-10-11 23:57:13 +00:00
parent 8fc6b95bae
commit 1376fe340a
9 changed files with 210 additions and 106 deletions

View File

@ -1,8 +1,10 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $0800, size = $3F00, fill = no, file = %O;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = BASROM, type = ro;
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;

View File

@ -1,8 +1,10 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $C000, size = $3F00, fill = no, file = %O;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = BASROM, type = ro;
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;

View File

@ -1,8 +1,10 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $C000, size = $3F00, fill = no, file = %O;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = BASROM, type = ro;
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;

View File

@ -86,22 +86,25 @@ L00CF := $00CF
RNDSEED := $00DA
Z96 := $020C
.else
USR := $0000
Z00 := $0000
L0001 := $0001
L0002 := $0002
GOWARM := $0003
Z15 := $0004
Z16 := $00C6;05
Z17 := $0006
GOSTROUT := $0006
Z18 := $0007
LINNUM := $0011;0008
TXPSV := $0048
GOGIVEAYF := $0008
INPUTBUFFER := $0200;00A
INPUTBUFFERX := $0200
Z03 := $000E;3 ; same
;USR := $0000
;Z00 := $0000
;L0001 := $0001
;L0002 := $0002
;GOWARM := $0003
;Z15 := $0004
;Z17 := $0006
;GOSTROUT := $0006
;Z18 := $0007
;GOGIVEAYF := $0008
;Z03 := $000E;3 ; same
;LINNUM := $0011;0008
CHARAC := $005A-82-5
ENDCHR := $005B-82-5
EOLPNTR := $005C-82-5
@ -112,66 +115,72 @@ SUBFLG := $0061-82-5
INPUTFLG := $0062-82-5
CPRMASK := $0063-82-5
Z14 := $0064-82-5 ; Ctrl+O flag
TEMPPT := $0065-82
LASTPT := $0066-82
TEMPST := $0068-82
INDEX := $0071-82
DEST := $0073-82
RESULT := $0075-82
RESULT_LAST := $0079-82
TXTTAB := $007A-82
VARTAB := $007C-82
ARYTAB := $007E-82
STREND := $0080-82
FRETOP := $0082-82
FRESPC := $0084-82
MEMSIZ := $0086-82
CURLIN := $0088-82
OLDLIN := $008A-82
OLDTEXT := $008C-82
Z8C := $008E-82
DATPTR := $0090-82
INPTR := $0092-82
VARNAM := $0094-82
VARPNT := $0096-82
FORPNT := $0098-82
LASTOP := $009A-82
CPRTYP := $009C-82
FNCNAM := $009D-82
TEMP3 := $009D-82 ; same
DSCPTR := $009F-82
DSCLEN := $00A2-82
JMPADRS := $00A3-82
Z52 := $00A4-82;
LENGTH := $00A4-82
ARGEXTENSION := $00A5-82 ; overlap with JMPADRS! (same on c64)
TEMP1 := $00A6-82
HIGHDS := $00A7-82
HIGHTR := $00A9-82
TEMP2 := $00AB-82
INDX := $00AC-82
TMPEXP := $00AC-82 ; same
EXPON := $00AD-82
LOWTR := $00AE-82 ; $9D also EXPSGN
LOWTRX := $00AE-82 ; $9D also EXPSGN
EXPSGN := $00AF-82
FAC := $00B0-82
FAC_LAST := $00B4-82
FACSIGN := $00B5-82
SERLEN := $00B6-82
SHIFTSIGNEXT := $00B7-82
ARG := $00B8-82
ARG_LAST := $00BC-82
ARGSIGN := $00BD-82
STRNG1 := $00BE-82 ; TODO: also SGNCPR
FACEXTENSION := $00BF-82
STRNG2 := $00C0-82
CHRGET := $00C2-82
CHRGOT := $00C8-82
TXTPTR := $00C9-82
L00CF := $00CF-82
RNDSEED := $00DA-82
Z96 := $96
;TEMPPT := $0065-82
;LASTPT := $0066-82
;TEMPST := $0068-82
;INDEX := $0071-82
;DEST := $0073-82
;RESULT := $0075-82
;RESULT_LAST := $0079-82
;TXTTAB := $007A-82
;VARTAB := $007C-82
;ARYTAB := $007E-82
;STREND := $0080-82
;FRETOP := $0082-82
;FRESPC := $0084-82
;MEMSIZ := $0086-82
;CURLIN := $0088-82
;OLDLIN := $008A-82
;OLDTEXT := $008C-82
;Z8C := $008E-82
;DATPTR := $0090-82
;INPTR := $0092-82
;VARNAM := $0094-82
;VARPNT := $0096-82
;FORPNT := $0098-82
;LASTOP := $009A-82
;TXPSV := $009A-82
;CPRTYP := $009C-82
;FNCNAM := $009D-82
;TEMP3 := $009D-82 ; same
;DSCPTR := $009F-82
;DSCLEN := $00A2-82
;JMPADRS := $00A3-82
;Z52 := $00A4-82;
;LENGTH := $00A4-82
;ARGEXTENSION := $00A5-82 ; overlap with JMPADRS! (same on c64)
;TEMP1 := $00A6-82
;HIGHDS := $00A7-82
;HIGHTR := $00A9-82
;TEMP2 := $00AB-82
;INDX := $00AC-82
;TMPEXP := $00AC-82 ; same
;EXPON := $00AD-82
;LOWTR := $00AE-82 ; $9D also EXPSGN
;LOWTRX := $00AE-82 ; $9D also EXPSGN
;EXPSGN := $00AF-82
;FAC := $00B0-82
;FAC_LAST := $00B4-82
;FACSIGN := $00B5-82
;SERLEN := $00B6-82
;SHIFTSIGNEXT := $00B7-82
;ARG := $00B8-82
;ARG_LAST := $00BC-82
;ARGSIGN := $00BD-82
;STRNG1 := $00BE-82 ; TODO: also SGNCPR
;FACEXTENSION := $00BF-82
;STRNG2 := $00C0-82
;CHRGET := $00C2-82
;CHRGOT := $00C8-82
;TXTPTR := $00C9-82
;L00CF := $00CF-82
;RNDSEED := $00DA-82
;Z96 := $00E8-82
;Z16 := $0118-82
INPUTBUFFER := $0200;00A
INPUTBUFFERX := $0200
.endif
BYTES_PER_FRAME := $12

View File

@ -1,8 +1,10 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $2000, size = $3F00, fill = no, file = %O;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = BASROM, type = ro;
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;

View File

@ -1,8 +1,10 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $E000, size = $3F00, fill = no, file = %O;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = BASROM, type = ro;
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;

62
make.sh
View File

@ -1,34 +1,34 @@
# 1.0
echo cbmbasic1
ca65 -D CBM1 msbasic.s -o tmp/cbmbasic1.o &&
ld65 -C cbmbasic1.cfg tmp/cbmbasic1.o -o tmp/cbmbasic1-new.bin &&
xxd -g 1 orig/cbmbasic1.bin > tmp/cbmbasic1.bin.txt
xxd -g 1 tmp/cbmbasic1-new.bin > tmp/cbmbasic1-new.bin.txt
diff -u tmp/cbmbasic1.bin.txt tmp/cbmbasic1-new.bin.txt | head
#echo cbmbasic1
#ca65 -D CBM1 msbasic.s -o tmp/cbmbasic1.o &&
#ld65 -C cbmbasic1.cfg tmp/cbmbasic1.o -o tmp/cbmbasic1-new.bin &&
#xxd -g 1 orig/cbmbasic1.bin > tmp/cbmbasic1.bin.txt
#xxd -g 1 tmp/cbmbasic1-new.bin > tmp/cbmbasic1-new.bin.txt
#diff -u tmp/cbmbasic1.bin.txt tmp/cbmbasic1-new.bin.txt | head
# 1.0 ?
echo kbdbasic
ca65 -D KBD msbasic.s -o tmp/kbdbasic.o &&
ld65 -C kbdbasic.cfg tmp/kbdbasic.o -o tmp/kbdbasic-new.bin &&
xxd -g 1 orig/kbdbasic.bin > tmp/kbdbasic.bin.txt
xxd -g 1 tmp/kbdbasic-new.bin > tmp/kbdbasic-new.bin.txt
diff -u tmp/kbdbasic.bin.txt tmp/kbdbasic-new.bin.txt | head
#echo kbdbasic
#ca65 -D KBD msbasic.s -o tmp/kbdbasic.o &&
#ld65 -C kbdbasic.cfg tmp/kbdbasic.o -o tmp/kbdbasic-new.bin &&
#xxd -g 1 orig/kbdbasic.bin > tmp/kbdbasic.bin.txt
#xxd -g 1 tmp/kbdbasic-new.bin > tmp/kbdbasic-new.bin.txt
#diff -u tmp/kbdbasic.bin.txt tmp/kbdbasic-new.bin.txt | head
# 1.0 rev 3.2
echo osi
ca65 -D OSI msbasic.s -o tmp/osi.o &&
ld65 -C osi.cfg tmp/osi.o -o tmp/osi-new.bin
xxd -g 1 orig/osi.bin > tmp/osi.bin.txt
xxd -g 1 tmp/osi-new.bin > tmp/osi-new.bin.txt
diff -u tmp/osi.bin.txt tmp/osi-new.bin.txt | head
#echo osi
#ca65 -D OSI msbasic.s -o tmp/osi.o &&
#ld65 -C osi.cfg tmp/osi.o -o tmp/osi-new.bin
#xxd -g 1 orig/osi.bin > tmp/osi.bin.txt
#xxd -g 1 tmp/osi-new.bin > tmp/osi-new.bin.txt
#diff -u tmp/osi.bin.txt tmp/osi-new.bin.txt | head
# 1.1
echo kb9
ca65 -D KIM msbasic.s -o tmp/kb9.o &&
ld65 -C kb9.cfg tmp/kb9.o -o tmp/kb9-new.bin &&
xxd -g 1 orig/kb9.bin > tmp/kb9.bin.txt
xxd -g 1 tmp/kb9-new.bin > tmp/kb9-new.bin.txt
diff -u tmp/kb9.bin.txt tmp/kb9-new.bin.txt | head
#echo kb9
#ca65 -D KIM msbasic.s -o tmp/kb9.o &&
#ld65 -C kb9.cfg tmp/kb9.o -o tmp/kb9-new.bin &&
#xxd -g 1 orig/kb9.bin > tmp/kb9.bin.txt
#xxd -g 1 tmp/kb9-new.bin > tmp/kb9-new.bin.txt
#diff -u tmp/kb9.bin.txt tmp/kb9-new.bin.txt | head
# 2
echo cbmbasic2
@ -38,11 +38,13 @@ xxd -g 1 orig/cbmbasic2.bin > tmp/cbmbasic2.bin.txt
xxd -g 1 tmp/cbmbasic2-new.bin > tmp/cbmbasic2-new.bin.txt
diff -u tmp/cbmbasic2.bin.txt tmp/cbmbasic2-new.bin.txt | head
da65 --info del/cbmbasic2-temp.txt
# 1.1
echo applesoft
ca65 -D APPLE msbasic.s -o tmp/applesoft.o &&
ld65 -C applesoft.cfg tmp/applesoft.o -o tmp/applesoft-new.bin &&
xxd -g 1 orig/applesoft.bin > tmp/applesoft.bin.txt
xxd -g 1 tmp/applesoft-new.bin > tmp/applesoft-new.bin.txt
diff -u tmp/applesoft.bin.txt tmp/applesoft-new.bin.txt | head
#echo applesoft
#ca65 -D APPLE msbasic.s -o tmp/applesoft.o &&
#ld65 -C applesoft.cfg tmp/applesoft.o -o tmp/applesoft-new.bin &&
#xxd -g 1 orig/applesoft.bin > tmp/applesoft.bin.txt
#xxd -g 1 tmp/applesoft-new.bin > tmp/applesoft-new.bin.txt
#diff -u tmp/applesoft.bin.txt tmp/applesoft-new.bin.txt | head
#da65 --info applesoft-temp.txt

View File

@ -1,5 +1,83 @@
; Microsoft BASIC for 6502
.zeropage
.ifdef CBM2
USR: .res 1
Z00 = USR
L0001: .res 1
L0002: .res 1
GOWARM: .res 1
Z15: .res 2
Z17: .res 1
GOSTROUT = Z17
Z18: .res 1
GOGIVEAYF: .res 6
Z03: .res 3
LINNUM: .res 2
TEMPPT: .res 1
LASTPT: .res 2
TEMPST: .res 9; := $0068-82
INDEX: .res 2; := $0071-82
DEST: .res 2; := $0073-82
RESULT: .res 4; := $0075-82
RESULT_LAST:.res 1; := $0079-82
TXTTAB: .res 2; := $007A-82
VARTAB: .res 2; := $007C-82
ARYTAB: .res 2; := $007E-82
STREND: .res 2; := $0080-82
FRETOP: .res 2; := $0082-82
FRESPC: .res 2; := $0084-82
MEMSIZ: .res 2; := $0086-82
CURLIN: .res 2; := $0088-82
OLDLIN: .res 2; := $008A-82
OLDTEXT: .res 2; := $008C-82
Z8C: .res 2; := $008E-82
DATPTR: .res 2; := $0090-82
INPTR: .res 2; := $0092-82
VARNAM: .res 2; := $0094-82
VARPNT: .res 2; := $0096-82
FORPNT: .res 2; := $0098-82
LASTOP: .res 2; := $009A-82
TXPSV = LASTOP
CPRTYP: .res 1; := $009C-82
FNCNAM: .res 2; := $009D-82
TEMP3 = FNCNAM
DSCPTR: .res 3; := $009F-82
DSCLEN: .res 1; := $00A2-82
JMPADRS: .res 1; := $00A3-82
Z52: .res 1; := $00A4-82;
LENGTH = Z52
ARGEXTENSION:.res 1; := $00A5-82 ; overlap with JMPADRS! (same on c64)
TEMP1: .res 1; := $00A6-82
HIGHDS: .res 2; := $00A7-82
HIGHTR: .res 2; := $00A9-82
TEMP2: .res 1; := $00AB-82
INDX: .res 1; := $00AC-82
TMPEXP = INDX
EXPON: .res 1; := $00AD-82
LOWTR: .res 1; := $00AE-82 ; $9D also EXPSGN
LOWTRX = LOWTR
EXPSGN: .res 1; := $00AF-82
FAC: .res 4; := $00B0-82
FAC_LAST: .res 1; := $00B4-82
FACSIGN: .res 1; := $00B5-82
SERLEN: .res 1; := $00B6-82
SHIFTSIGNEXT:.res 1; := $00B7-82
ARG: .res 4; := $00B8-82
ARG_LAST: .res 1; := $00BC-82
ARGSIGN: .res 1; := $00BD-82
STRNG1: .res 1; := $00BE-82 ; TODO: also SGNCPR
FACEXTENSION:.res 1; := $00BF-82
STRNG2: .res 2; := $00C0-82
CHRGET: .res 6; := $00C2-82
CHRGOT: .res 1; := $00C8-82
TXTPTR: .res 6; := $00C9-82
L00CF: .res 11; := $00CF-82
RNDSEED: .res 14; := $00DA-82
Z96: .res 48; := $00E8-82
Z16: .res 1; := $0118-82
.endif
.ifdef CBM1
.include "defines_cbm.s" ; 6
CONFIG_CBM_ALL := 1
@ -88,7 +166,10 @@ TOKEN_ADDRESS_TABLE:
.segment "KEYWORDS"
TOKEN_NAME_TABLE:
.macro keyvec key, vec
;.local label
.segment "VECTORS"
;label:
;.out label
.addr vec
.segment "KEYWORDS"
htasc key

View File

@ -1,8 +1,10 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $A000, size = $3F00, fill = no, file = %O;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = BASROM, type = ro;
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;