mirror of https://github.com/mgcaret/rom4x.git
add build metadata
This commit is contained in:
parent
2e97ca4fc8
commit
0c442f1d46
|
@ -1,55 +1,56 @@
|
||||||
.code
|
.code
|
||||||
.psc02
|
.psc02
|
||||||
.include "iic+.defs"
|
.include "iic+.defs"
|
||||||
.org misc5x ; max 306 bytes
|
.org misc5x ; max 306 bytes
|
||||||
bra domenu ; Display menu
|
bra domenu ; Display menu
|
||||||
bra dobann ; Display banner (title + By MG)
|
bra dobann ; Display banner (title + By MG)
|
||||||
bra gtkey ; get a key
|
bra gtkey ; get a key
|
||||||
bra confirm ; ask SURE?
|
bra confirm ; ask SURE?
|
||||||
bra ntitle ; display "Apple IIc +"
|
bra ntitle ; display "Apple IIc +"
|
||||||
dobann: jsr ntitle
|
dobann: jsr ntitle
|
||||||
ldx #(msg2-msg1) ; msg display entry point
|
ldx #(msg2-msg1) ; msg display entry point
|
||||||
jmp disp
|
jmp disp
|
||||||
domenu: jsr ntitle ; "Apple ||c +"
|
domenu: jsr ntitle ; "Apple ||c +"
|
||||||
ldx #$00 ; menu start
|
ldx #$00 ; menu start
|
||||||
jsr disp ; show it
|
jsr disp ; show it
|
||||||
rts
|
rts
|
||||||
gtkey: lda #$60
|
gtkey: lda #$60
|
||||||
sta ($0),y ; cursor
|
sta ($0),y ; cursor
|
||||||
sta kbdstrb ; clr keyboard
|
sta kbdstrb ; clr keyboard
|
||||||
kbdin: lda kbd ; get key
|
kbdin: lda kbd ; get key
|
||||||
bpl kbdin
|
bpl kbdin
|
||||||
sta kbdstrb ; clear keyboard
|
sta kbdstrb ; clear keyboard
|
||||||
sta ($0),y ; put it on screen
|
sta ($0),y ; put it on screen
|
||||||
rts
|
rts
|
||||||
; display message, input x = message start relative to msg1
|
; display message, input x = message start relative to msg1
|
||||||
disp: ldy #$0 ; needs to be zero
|
disp: ldy #$0 ; needs to be zero
|
||||||
disp0: lda msg1,x ; get message byte
|
disp0: lda msg1,x ; get message byte
|
||||||
bne disp1 ; proceed if nonzero
|
bne disp1 ; proceed if nonzero
|
||||||
rts ; exit if 0
|
rts ; exit if 0
|
||||||
disp1: inx ; next byte either way
|
disp1: inx ; next byte either way
|
||||||
cmp #$20 ; ' '
|
cmp #$20 ; ' '
|
||||||
bcc disp2 ; start of ptr if < 20
|
bcc disp2 ; start of ptr if < 20
|
||||||
eor #$80 ; invert high bit
|
eor #$80 ; invert high bit
|
||||||
sta ($0),y ; write to mem
|
sta ($0),y ; write to mem
|
||||||
inc $0 ; inc address low byte
|
inc $0 ; inc address low byte
|
||||||
bra disp0 ; back to the beginning
|
bra disp0 ; back to the beginning
|
||||||
disp2: sta $1 ; write address high
|
disp2: sta $1 ; write address high
|
||||||
lda msg1,x ; get it
|
lda msg1,x ; get it
|
||||||
sta $0 ; write address low
|
sta $0 ; write address low
|
||||||
inx ; set next msg byte
|
inx ; set next msg byte
|
||||||
bra disp0 ; back to the beginning
|
bra disp0 ; back to the beginning
|
||||||
confirm: pha
|
confirm:
|
||||||
ldx #(msg3-msg1) ; ask confirm
|
pha
|
||||||
jsr disp
|
ldx #(msg3-msg1) ; ask confirm
|
||||||
jsr gtkey
|
jsr disp
|
||||||
plx
|
jsr gtkey
|
||||||
ora #$20 ; to lower
|
plx
|
||||||
cmp #$f9 ; "y"
|
ora #$20 ; to lower
|
||||||
php
|
cmp #$f9 ; "y"
|
||||||
txa
|
php
|
||||||
plp
|
txa
|
||||||
rts
|
plp
|
||||||
|
rts
|
||||||
; display "Apple IIc +" in a convoluted manner
|
; display "Apple IIc +" in a convoluted manner
|
||||||
; we push the address of swrts/swrts2 onto the stack
|
; we push the address of swrts/swrts2 onto the stack
|
||||||
; and then the address of the title routine
|
; and then the address of the title routine
|
||||||
|
@ -57,30 +58,32 @@ confirm: pha
|
||||||
; display "Apple IIc +", which then RTS to swrts, which
|
; display "Apple IIc +", which then RTS to swrts, which
|
||||||
; switches banks back to here and RTS to our caller.
|
; switches banks back to here and RTS to our caller.
|
||||||
ntitle: lda #>(swrts2-1) ; put return addr of swrts/swrts2 on stack
|
ntitle: lda #>(swrts2-1) ; put return addr of swrts/swrts2 on stack
|
||||||
pha
|
pha
|
||||||
lda #<(swrts2-1)
|
lda #<(swrts2-1)
|
||||||
pha
|
pha
|
||||||
lda #>(banner-1) ; put addr of the Title routine on the stack
|
lda #>(banner-1) ; put addr of the Title routine on the stack
|
||||||
pha
|
pha
|
||||||
lda #<(banner-1)
|
lda #<(banner-1)
|
||||||
pha
|
pha
|
||||||
jmp swrts2 ; jump to swrts2
|
jmp swrts2 ; jump to swrts2
|
||||||
; msg format
|
; msg format
|
||||||
; A byte < $20 indicates high byte of address.
|
; A byte < $20 indicates high byte of address.
|
||||||
; Next byte must be low byte of address. Anything
|
; Next byte must be low byte of address. Anything
|
||||||
; else are characters to display and will have their
|
; else are characters to display and will have their
|
||||||
; upper bit inverted before being written to the screen.
|
; upper bit inverted before being written to the screen.
|
||||||
msg1 = *
|
msg1 = *
|
||||||
.byte $05,$06,"0 Monitor"
|
.byte $05,$06,"0 Monitor"
|
||||||
.byte $05,$86,"1 Reboot"
|
.byte $05,$86,"1 Reboot"
|
||||||
.byte $06,$06,"2 Zero RAM Card"
|
.byte $06,$06,"2 Zero RAM Card"
|
||||||
.byte $06,$86,"3 Sys Diags"
|
.byte $06,$86,"3 Sys Diags"
|
||||||
.byte $07,$06,"4 RAM Card Diags"
|
.byte $07,$06,"4 RAM Card Diags"
|
||||||
.byte $07,$86,"5 Boot 3.5/SmartPort"
|
.byte $07,$86,"5 Boot 3.5/SmartPort"
|
||||||
.byte $04,$2e,"6 Boot 5.25"
|
.byte $04,$2e,"6 Boot 5.25"
|
||||||
.byte $04,$ae,"7 Accelerator"
|
.byte $04,$ae,"7 Accelerator"
|
||||||
.byte $07,$5f,"By M.G."
|
.byte $07,$5f,"By M.G."
|
||||||
msg2: .byte $07,$db,"ROM 5X 04/08/17"
|
msg2: .byte $07,$db,"ROM 5X 04/08/17"
|
||||||
.byte $05,$ae,$00 ; cursor pos in menu
|
.byte $05,$ae,$00 ; cursor pos in menu
|
||||||
msg3: .byte $05,$b0,"SURE? ",$00
|
msg3: .byte $05,$b0,"SURE? ",$00
|
||||||
|
; metadata to identify build conditions
|
||||||
|
.dword .time
|
||||||
|
.word .version
|
||||||
|
|
Loading…
Reference in New Issue