1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-14 20:28:59 +00:00
6502bench/SourceGen/SGTestData/Expected/2022-extension-scripts_Merlin32.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

54 lines
1.1 KiB
ArmAsm

PrintInlineL1String equ $011000
PrintInlineL2String equ $012000
PrintInlineDciString equ $013000
org $1000
clc
xce
sep #$30
jsr PrintInline8String
asc '01234567'
jsr PrintInlineRev8String
rev '01234567'
jsr PrintInlineNullString
asc 'null-term string',00
jsl PrintInlineL1String
str 'string with length/1'
jsl PrintInlineL2String
strl 'string with length/2'
jsl PrintInlineDciString
dci 'DCI string'
jsr L107C
jsr L110F
jsr L1108
rts
PrintInline8String rts
PrintInlineRev8String rts
PrintInlineNullString rts
L107C jsr PrintInlineNullString
per $7ff4
rtl
dfb $65
dfb $6e
dfb $20
dfb $01
org $1100
asc 'string'
dfb $00
dfb $60
L1108 jsl PrintInlineL2String
asl A
brk
dfb $60
L110F jsr PrintInlineNullString
adc $6e
dfb $64