2019-10-06 02:51:34 +00:00
|
|
|
!cpu 65816
|
|
|
|
PrintInlineL1String = $011000
|
|
|
|
PrintInlineL2String = $012000
|
|
|
|
PrintInlineDciString = $013000
|
|
|
|
|
2021-09-17 00:02:19 +00:00
|
|
|
* = $1000
|
2019-10-06 02:51:34 +00:00
|
|
|
!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
|
2020-05-09 00:41:26 +00:00
|
|
|
jsr L1800
|
|
|
|
jsr L184F
|
|
|
|
jsr L1848
|
Optionally treat BRKs as two-byte instructions
Early data sheets listed BRK as one byte, but RTI after a BRK skips
the following byte, effectively making BRK a 2-byte instruction.
Sometimes, such as when diassembling Apple /// SOS code, it's handy
to treat it that way explicitly.
This change makes two-byte BRKs optional, controlled by a checkbox
in the project settings. In the system definitions it defaults to
true for Apple ///, false for all others.
ACME doesn't allow BRK to have an arg, and cc65 only allows it for
65816 code (?), so it's emitted as a hex blob for those assemblers.
Anyone wishing to target those assemblers should stick to 1-byte mode.
Extension scripts have to switch between formatting one byte of
inline data and formatting an instruction with a one-byte operand.
A helper function has been added to the plugin Util class.
To get some regression test coverage, 2022-extension-scripts has
been configured to use two-byte BRK.
Also, added/corrected some SOS constants.
See also issue #44.
2019-10-09 21:55:56 +00:00
|
|
|
!byte $00,$01
|
2019-10-07 21:21:26 +00:00
|
|
|
!word data01
|
Optionally treat BRKs as two-byte instructions
Early data sheets listed BRK as one byte, but RTI after a BRK skips
the following byte, effectively making BRK a 2-byte instruction.
Sometimes, such as when diassembling Apple /// SOS code, it's handy
to treat it that way explicitly.
This change makes two-byte BRKs optional, controlled by a checkbox
in the project settings. In the system definitions it defaults to
true for Apple ///, false for all others.
ACME doesn't allow BRK to have an arg, and cc65 only allows it for
65816 code (?), so it's emitted as a hex blob for those assemblers.
Anyone wishing to target those assemblers should stick to 1-byte mode.
Extension scripts have to switch between formatting one byte of
inline data and formatting an instruction with a one-byte operand.
A helper function has been added to the plugin Util class.
To get some regression test coverage, 2022-extension-scripts has
been configured to use two-byte BRK.
Also, added/corrected some SOS constants.
See also issue #44.
2019-10-09 21:55:56 +00:00
|
|
|
!byte $00,$02
|
2019-10-07 21:21:26 +00:00
|
|
|
!word data02
|
2019-10-19 23:23:42 +00:00
|
|
|
nop
|
|
|
|
jsr L1085
|
|
|
|
!byte $24
|
|
|
|
L1085 !byte $a9
|
|
|
|
!byte $00
|
|
|
|
sta $ff
|
|
|
|
!byte $ea
|
2020-05-09 00:41:26 +00:00
|
|
|
jmp Next1
|
2019-10-06 02:51:34 +00:00
|
|
|
|
|
|
|
PrintInline8String rts
|
|
|
|
|
|
|
|
PrintInlineRev8String rts
|
|
|
|
|
|
|
|
PrintInlineNullString rts
|
|
|
|
|
2019-10-07 21:21:26 +00:00
|
|
|
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
|
2019-11-17 01:15:03 +00:00
|
|
|
data02 !word @data03
|
2019-10-07 21:21:26 +00:00
|
|
|
!byte $80
|
|
|
|
!xor $80 {
|
2019-11-17 01:15:03 +00:00
|
|
|
@data03 !text "AllEight"
|
2019-10-07 21:21:26 +00:00
|
|
|
}
|
|
|
|
|
2020-05-09 00:41:26 +00:00
|
|
|
NoCont pla ;split across address change
|
|
|
|
pla
|
|
|
|
rts
|
|
|
|
|
|
|
|
L10BA jsr NoCont
|
|
|
|
|
|
|
|
!byte $00
|
|
|
|
!byte $80
|
|
|
|
|
|
|
|
L10BF jsr NoCont
|
|
|
|
|
|
|
|
!byte $00
|
|
|
|
!byte $80
|
|
|
|
|
|
|
|
Next1 jsr L10BA
|
|
|
|
jsr @L10CF
|
|
|
|
clc
|
|
|
|
jsr L10BF
|
|
|
|
rts
|
|
|
|
|
|
|
|
@L10CF sec
|
|
|
|
jsr L10BF
|
2020-08-22 15:56:38 +00:00
|
|
|
clc
|
|
|
|
!byte $00,$02
|
|
|
|
!word data02
|
|
|
|
bcc @L10DE
|
|
|
|
bcs @L10DE
|
|
|
|
|
|
|
|
!byte $00
|
|
|
|
!byte $80
|
|
|
|
|
|
|
|
@L10DE rts
|
2020-05-09 00:41:26 +00:00
|
|
|
|
2020-08-22 15:56:38 +00:00
|
|
|
!fill 289,$00
|
2020-05-09 00:41:26 +00:00
|
|
|
|
|
|
|
!pseudopc $1800 {
|
|
|
|
L1800 jsr PrintInlineNullString
|
|
|
|
per $8778
|
2019-10-06 02:51:34 +00:00
|
|
|
rtl
|
|
|
|
|
|
|
|
!byte $65
|
|
|
|
!byte $6e
|
|
|
|
!byte $20
|
|
|
|
!byte $01
|
2021-09-22 21:39:39 +00:00
|
|
|
}
|
2020-05-09 00:41:26 +00:00
|
|
|
!pseudopc $1840 {
|
2019-10-06 02:51:34 +00:00
|
|
|
!text "string"
|
|
|
|
!byte $00
|
|
|
|
!byte $60
|
|
|
|
|
2020-05-09 00:41:26 +00:00
|
|
|
L1848 jsl PrintInlineL2String
|
2019-10-06 02:51:34 +00:00
|
|
|
asl
|
Optionally treat BRKs as two-byte instructions
Early data sheets listed BRK as one byte, but RTI after a BRK skips
the following byte, effectively making BRK a 2-byte instruction.
Sometimes, such as when diassembling Apple /// SOS code, it's handy
to treat it that way explicitly.
This change makes two-byte BRKs optional, controlled by a checkbox
in the project settings. In the system definitions it defaults to
true for Apple ///, false for all others.
ACME doesn't allow BRK to have an arg, and cc65 only allows it for
65816 code (?), so it's emitted as a hex blob for those assemblers.
Anyone wishing to target those assemblers should stick to 1-byte mode.
Extension scripts have to switch between formatting one byte of
inline data and formatting an instruction with a one-byte operand.
A helper function has been added to the plugin Util class.
To get some regression test coverage, 2022-extension-scripts has
been configured to use two-byte BRK.
Also, added/corrected some SOS constants.
See also issue #44.
2019-10-09 21:55:56 +00:00
|
|
|
!byte $00,$60
|
2019-10-06 02:51:34 +00:00
|
|
|
|
2020-05-09 00:41:26 +00:00
|
|
|
L184F jsr PrintInlineNullString
|
2019-10-06 02:51:34 +00:00
|
|
|
adc $6e
|
|
|
|
!byte $64
|
2021-09-22 21:39:39 +00:00
|
|
|
}
|