This commit is contained in:
Michael Steil 2008-10-12 19:18:33 +00:00
parent a40c027b70
commit ee400a016f
8 changed files with 46 additions and 38 deletions

View File

@ -1,6 +1,7 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $0800, size = $3F00, fill = no, file = %O;
DUMMY: start = $0000, size = $00FF, file = "";
}
SEGMENTS {
@ -9,6 +10,6 @@ SEGMENTS {
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;
CODE: load = BASROM, type = ro;
DUMMY: load = BASROM, type = zp; # don't include
DUMMY: load = DUMMY; # don't include
}

View File

@ -1,6 +1,7 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $C000, size = $3F00, fill = no, file = %O;
DUMMY: start = $0000, size = $00FF, file = "";
}
SEGMENTS {
@ -9,6 +10,6 @@ SEGMENTS {
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;
CODE: load = BASROM, type = ro;
DUMMY: load = BASROM, type = zp; # don't include
DUMMY: load = DUMMY; # don't include
}

View File

@ -1,6 +1,7 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $C000, size = $3F00, fill = no, file = %O;
DUMMY: start = $0000, size = $00FF, file = "";
}
SEGMENTS {
@ -9,6 +10,6 @@ SEGMENTS {
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;
CODE: load = BASROM, type = ro;
DUMMY: load = BASROM, type = zp; # don't include
DUMMY: load = DUMMY; # don't include
}

View File

@ -1,6 +1,7 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $2000, size = $3F00, fill = no, file = %O;
DUMMY: start = $0000, size = $00FF, file = "";
}
SEGMENTS {
@ -9,6 +10,6 @@ SEGMENTS {
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;
CODE: load = BASROM, type = ro;
DUMMY: load = BASROM, type = zp; # don't include
DUMMY: load = DUMMY; # don't include
}

View File

@ -1,6 +1,7 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $E000, size = $3F00, fill = no, file = %O;
DUMMY: start = $0000, size = $00FF, file = "";
}
SEGMENTS {
@ -9,6 +10,6 @@ SEGMENTS {
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;
CODE: load = BASROM, type = ro;
DUMMY: load = BASROM, type = zp; # don't include
DUMMY: load = DUMMY; # don't include
}

View File

@ -1,7 +1,5 @@
; ----------------------------------------------------------------------------
; Macros
; htasc - set the hi bit on the last byte of a string for termination
; (by Tom Greene)
.macro htasc str
.repeat .strlen(str)-1,I
.byte .strat(str,I)
@ -9,42 +7,52 @@
.byte .strat(str,.strlen(str)-1) | $80
.endmacro
.macro keyword_addr key, vec, token
.segment "VECTORS"
.addr vec
.segment "KEYWORDS"
htasc key
define_token token
; For every token, a byte gets put into segment "DUMMY".
; This way, we count up with every token. The DUMMY segment
; doesn't get linked into the binary.
.macro define_token_init
.segment "DUMMY"
DUMMY_START:
.endmacro
; optionally define token symbol
; count up token number
.macro define_token token
.segment "DUMMY"
.ifnblank token
token := <(*-DUMMY_START)+$80
.endif
.res 1
.endmacro
.macro keyword_rts key, vec, token
.segment "VECTORS"
.word vec-1
.segment "KEYWORDS"
htasc key
define_token token
.res 1; count up in any case
.endmacro
; lay down a keyword, optionally define a token symbol
.macro keyword key, token
.segment "KEYWORDS"
htasc key
define_token token
.endmacro
;.macro define_token name
; .segment "VECTORS"
; name := <(*-TOKEN_ADDRESS_TABLE)/2+$80
;.endmacro
.macro define_token_init
.segment "DUMMY"
DUMMY_START:
; lay down a keyword and an address (RTS style),
; optionally define a token symbol
.macro keyword_rts key, vec, token
.segment "VECTORS"
.word vec-1
keyword key, token
.endmacro
; lay down a keyword and an address,
; optionally define a token symbol
.macro keyword_addr key, vec, token
.segment "VECTORS"
.addr vec
keyword key, token
.endmacro
;---------------------------------------------
; set the MSB of every byte of a string
.macro asc80 str
.repeat .strlen(str),I
.byte .strat(str,I)+$80
.endrep
.endmacro

View File

@ -7189,12 +7189,6 @@ QT_WANT:
QT_WRITTEN_BY:
.ifndef CONFIG_CBM_ALL
.ifdef APPLE
; set the MSB of every byte of a string
.macro asc80 str
.repeat .strlen(str),I
.byte .strat(str,I)+$80
.endrep
.endmacro
asc80 "COPYRIGHT 1977 BY MICROSOFT CO"
.byte $0D,$00
.else

View File

@ -1,6 +1,7 @@
MEMORY {
ZP: start = $0000, size = $0100, type = rw;
BASROM: start = $A000, size = $3F00, fill = no, file = %O;
DUMMY: start = $0000, size = $00FF, file = "";
}
SEGMENTS {
@ -9,6 +10,6 @@ SEGMENTS {
VECTORS: load = BASROM, type = ro;
KEYWORDS: load = BASROM, type = ro;
CODE: load = BASROM, type = ro;
DUMMY: load = BASROM, type = zp; # don't include
DUMMY: load = DUMMY; # don't include
}