string asis include 'gsos.equ' include 'M16.Debug' include 'fst.macros' entry debugs16 MACRO &lab _Long2Hex &lab ldx #$230B jsl $E10000 MEND MACRO &lab _Int2Hex &lab ldx #$220B jsl $E10000 MEND MACRO &lab s16_puts &str &lab ldx #^(&str) ldy #(&str) cop $84 MEND debug procname export pha phx phy ; dump info to sweet 16. lda sweet_status bmi exit bne sweet_active ; check sweet status ; see tn 201 lda #0 short m sta >$00c04f lda >$00c04f ; emu id tax lda >$00c04f ; emu version long m cpx #$16 beq @ok ; not sweet 16 dec sweet_status bra exit @ok inc sweet_status sweet_active jsr debugs16 exit ply plx pla rts sweet_status dc.w 0 endp debugs16 procname with fst_parms ; debugger logging: ; x=^str ; y=str ; cop $84 ; hex2string @ offset 12. ~Int2Hex >16 sta |@m+1 ; restore the length. lda 1,s ;x = src ldx