mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-27 03:17:45 +00:00
The code that allows scripts to catch and handle BRK/JSR/JSL followed by inline data now also handles COP and WDM. (issue #177)
102 lines
2.1 KiB
ArmAsm
102 lines
2.1 KiB
ArmAsm
!cpu 65816
|
|
PrintInlineL1String = $011000
|
|
PrintInlineL2String = $012000
|
|
PrintInlineDciString = $013000
|
|
|
|
* = $1000
|
|
!as
|
|
!rs
|
|
clc
|
|
xce
|
|
sep #$30
|
|
jsr PrintInline8String
|
|
!text "01234567"
|
|
jsr PrintInlineRev8String
|
|
!text "76543210"
|
|
jsr PrintInlineNullString
|
|
!text "null-term string",$00
|
|
jsl PrintInlineL1String
|
|
!text $14,"string with length/1"
|
|
jsl PrintInlineL2String
|
|
!text $14,$00,"string with length/2"
|
|
jsl PrintInlineDciString
|
|
!text "DCI strin",$e7
|
|
jsr L1800
|
|
jsr L184F
|
|
jsr L1848
|
|
!byte $00,$01
|
|
!word data01
|
|
!byte $00,$02
|
|
!word data02
|
|
jmp Next
|
|
|
|
PrintInline8String rts
|
|
|
|
PrintInlineRev8String rts
|
|
|
|
PrintInlineNullString rts
|
|
|
|
data01 !word 4386
|
|
!byte $33,$44
|
|
!32 $88776655
|
|
!byte $99,$88,$77,$66
|
|
!byte 'f'
|
|
!byte 'F' | $80
|
|
!byte $40
|
|
!byte $c1
|
|
!byte $42
|
|
!byte $c3
|
|
!byte $44
|
|
!byte $c5
|
|
!byte $46
|
|
!byte $c7
|
|
!24 PrintInlineL2String
|
|
!word data02
|
|
!byte $80
|
|
data02 !word @data03
|
|
!byte $80
|
|
!xor $80 {
|
|
@data03 !text "AllEight"
|
|
}
|
|
|
|
Next clc
|
|
!byte $00,$02
|
|
!word data02
|
|
bcc @L10B8
|
|
bcs @L10B8
|
|
|
|
!byte $00
|
|
!byte $80
|
|
|
|
@L10B8 cop $03
|
|
!text $04,"COP!"
|
|
!byte $42,$04
|
|
!text $04,"WDM!"
|
|
rts
|
|
|
|
!fill 313,$00
|
|
|
|
!pseudopc $1800 {
|
|
L1800 jsr PrintInlineNullString
|
|
per $8778
|
|
rtl
|
|
|
|
!byte $65
|
|
!byte $6e
|
|
!byte $20
|
|
!byte $01
|
|
}
|
|
!pseudopc $1840 {
|
|
!text "string"
|
|
!byte $00
|
|
!byte $60
|
|
|
|
L1848 jsl PrintInlineL2String
|
|
asl
|
|
!byte $00,$60
|
|
|
|
L184F jsr PrintInlineNullString
|
|
adc $6e
|
|
!byte $64
|
|
}
|