1
0
mirror of https://github.com/fadden/6502bench.git synced 2026-04-20 19:16:34 +00:00

Add scripts and inline data to tutorials

Added an inline data formatting section to Tutorial2.

Added a new section on extension scripts, using Scripts/Sample as
the code.
This commit is contained in:
Andy McFadden
2019-10-23 14:52:52 -07:00
parent 1844fcb8b7
commit eb99a716f1
4 changed files with 120 additions and 17 deletions
Binary file not shown.
+30 -3
View File
@@ -53,7 +53,10 @@ stringtab
dw string3
copydone
lda #$ff
jsr PrintInlineZString
asc 'Embedded!',00
lda #$ff ;self-modifying code example
sta _mod+1
_mod lda #$00
bne skipbrk
@@ -62,12 +65,12 @@ middat ds 4
outdat ds 1
skipbrk
lda middat
lda middat ;nearby-label example
ora middat+1
and middat+2
eor middat+3
ldx #$00
ldx #$00 ;embedded instruction example
dfb $2c
rebr ldx #$01
sta outdat
@@ -85,3 +88,27 @@ thing
lda INPUT
rts
PrintInlineZString
pla
sta PTR1
pla
sta PTR1+1
ldy #$01
:loop lda (PTR1),Y
beq strend
ora #$80
jsr $FDED
iny
bne :loop
strend tya
clc
adc PTR1
sta PTR1
lda PTR1+1
adc #$00
pha
lda PTR1
pha
rts