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
|
2021-06-18 17:53:17 +00:00
|
|
|
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
|
2021-06-18 17:53:17 +00:00
|
|
|
ldy $16F8
|
2017-08-15 15:31:36 +00:00
|
|
|
cpy #$4C
|
2019-04-16 05:39:12 +00:00
|
|
|
beq +
|
|
|
|
ldx #3
|
2021-06-18 17:53:17 +00:00
|
|
|
ldy $16FB
|
2017-08-15 15:31:36 +00:00
|
|
|
cpy #$4C
|
2019-04-16 18:26:59 +00:00
|
|
|
bne ++
|
2021-06-18 17:53:17 +00:00
|
|
|
+ sta $16FA,x ; hi byte of callback
|
2019-04-16 05:39:12 +00:00
|
|
|
pla
|
2021-06-18 17:53:17 +00:00
|
|
|
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
|
2021-06-13 02:07:26 +00:00
|
|
|
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
|
|
|
}
|