1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-01 22:50:35 +00:00
6502bench/SourceGen/SGTestData/Expected/2022-extension-scripts_acme.S
Andy McFadden 28eafef27c Expand the set of things SetInlineDataFormat accepts
Extension scripts (a/k/a "plugins") can now apply any data format
supported by FormatDescriptor to inline data.  In particular, it can
now handle variable-length inline strings.  The code analyzer
verifies the string structure (e.g. null-terminated strings have
exactly one null byte, at the very end).

Added PluginException to carry an exception back to the plugin code,
for occasions when they're doing something so wrong that we just
want to smack them.

Added test 2022-extension-scripts to exercise the feature.
2019-10-05 19:51:34 -07:00

58 lines
1.2 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 L107C
jsr L110F
jsr L1108
rts
PrintInline8String rts
PrintInlineRev8String rts
PrintInlineNullString rts
L107C jsr PrintInlineNullString
per $7ff4
rtl
!byte $65
!byte $6e
!byte $20
!byte $01
!pseudopc $1100 {
!text "string"
!byte $00
!byte $60
L1108 jsl PrintInlineL2String
asl
brk
!byte $60
L110F jsr PrintInlineNullString
adc $6e
!byte $64
} ;!pseudopc