load drawing

This commit is contained in:
Travis Shears 2025-07-03 10:48:30 +02:00
parent 2df49c1a01
commit 940f8e235c
3 changed files with 18 additions and 26 deletions

Binary file not shown.

BIN
footer.pbm Normal file

Binary file not shown.

View file

@ -16,19 +16,25 @@
hexdump -C footer.pbm
)
|1550 @drawing-size
|15f @image-size ( header 9 + data 341 = 350 )
|0100
@on-reset
( set img-pt to start of img )
;img ;img-pt STA2
( file header )
LIT "P write-to-image
LIT "4 write-to-image
#0a write-to-image
LIT "8 write-to-image
#20 write-to-image
LIT "8 write-to-image
#20 write-to-image
LIT "3 write-to-image
LIT "1 write-to-image
#0a write-to-image
( image data )
load-drawing
#e7 write-to-image
#e7 write-to-image
#e7 write-to-image
@ -40,6 +46,13 @@
save-file
BRK
@load-drawing
;/filename .File/name DEO2
;drawing-size .File/length DEO2
;drawing .File/read DEO2
JMP2r
&filename "footer.1line $1
@write-to-image ( val )
;img-pt LDA2 ( val pt* )
STA ( )
@ -50,32 +63,11 @@
@save-file
;/filename .File/name DEO2
#000f .File/length DEO2
;image-size .File/length DEO2
;img .File/write DEO2
JMP2r
&filename "footer.pbm $1
@img-pt $2
@img $20
(
@gen-image
( set image-pt to start of image )
;image ;image-pt STA2
LIT2 00 "P write-to-image
LIT2 00 "4 write-to-image
#000a write-to-image
#0008 write-to-image
#0020 write-to-image
#0008 write-to-image
#00ff write-to-image
JMP2r
@image-pt $2
( todo include space for header )
@image $155
( @drawing $1550 ( 5456 ) )
)
@img $image-size
@drawing $drawing-size