mirror of
https://github.com/fadden/6502bench.git
synced 2024-12-02 13:51:36 +00:00
4e5c34f457
This adds a new data format option, "binary include", that takes a filename operand. When assembly sources are generated, the section of file is replaced with an appropriate pseudo-op, and binary files are generated that hold the file contents. This is a convenient way to remove large binary blobs, such as music or sound samples, that aren't useful to have in text form in the sources. Partial pathnames are allowed, so you can output a sound blob to "sounds/blather.bin". For safety reasons, we don't allow the files to be created above the project directory, and existing files will only be overwritten if they have a matching length (so you don't accidentally stomp on your project file). The files are not currently shown in the GenAsm dialog, which lets you see a preview of the generated sources. The hex dump tool can do this for the (presumably rare) situations where it's useful. A new regression test, 20300-binary-include, has been added. The pseudo-op name can be overridden on-screen in the settings. We don't currently do anything new for text/HTML exports. It might be useful to generate an optional appendix with a hex dump of the excised sections. (issue #144)
18 lines
360 B
ArmAsm
18 lines
360 B
ArmAsm
org $1000
|
|
L1000 ldy #$28
|
|
lda :L1017,y
|
|
sta $2000,y
|
|
dey
|
|
bpl L1000
|
|
lda :L103F
|
|
lda :L103F+1
|
|
lda done-1
|
|
jmp done
|
|
|
|
:L1017 hex 20212223242526272829303132333435363738394142434445464748494a5051
|
|
hex 5253545556575859
|
|
:L103F ds 32,$ff
|
|
|
|
done rts
|
|
|