passport/src/id/trace.a

35 lines
828 B
Plaintext
Raw Normal View History

2017-08-15 15:31:36 +00:00
;-------------------------------
; Trace
; common code for all boot tracers
; in: A = lo byte of callback
; X = hi byte of callback
; never returns (exits via callback or UseUniversal)
;-------------------------------
!zone {
Trace
pha
txa
pha
lda #$C6
ldx #$16
2021-06-21 15:24:21 +00:00
jsr CopyMemory1
2017-08-15 15:31:36 +00:00
pla
2019-04-16 05:39:12 +00:00
ldx #0
ldy $16F8
2017-08-15 15:31:36 +00:00
cpy #$4C
2019-04-16 05:39:12 +00:00
beq +
ldx #3
ldy $16FB
2017-08-15 15:31:36 +00:00
cpy #$4C
2019-04-16 18:26:59 +00:00
bne ++
+ sta $16FA,x ; hi byte of callback
2019-04-16 05:39:12 +00:00
pla
sta $16F9,x ; lo byte of callback
jmp $1600
2017-08-15 15:31:36 +00:00
2019-04-16 18:26:59 +00:00
++ pla
jsr PrintByID ; unknown disk controller
!byte s_canttrace
2021-07-11 04:51:32 +00:00
; /!\ execution falls through here to UseUniversal
2017-08-15 15:31:36 +00:00
}