introduce a benchmark mode
This commit is contained in:
parent
a4741861ce
commit
cd7b333b2d
4 changed files with 119 additions and 2 deletions
32
src/asm/6502/macroInt.s
Normal file
32
src/asm/6502/macroInt.s
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
macroState=$50 ; pointer to state
|
||||
macroAddr=$52 ; pointer to address
|
||||
|
||||
; macro state takes 4 bytes
|
||||
; macroPos bits:
|
||||
; 7: had
|
||||
; 6: will
|
||||
|
||||
; x: macro
|
||||
macroIntRun:
|
||||
lda macroAddr,x
|
||||
ora macroAddr+1,x
|
||||
beq :+
|
||||
|
||||
; do macro
|
||||
: rts
|
||||
|
||||
; set the macro address, then call
|
||||
; x: macro
|
||||
macroIntInit:
|
||||
lda #0
|
||||
sta macroState,x
|
||||
sta macroPos,x
|
||||
txa
|
||||
rol
|
||||
tax
|
||||
lda macroAddr,x
|
||||
ora macroAddr+1,x
|
||||
beq :+
|
||||
lda #$40
|
||||
sta macroState,x
|
||||
: rts
|
||||
Loading…
Add table
Add a link
Reference in a new issue