[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Merlin 8, general 6502 tips
For Merlin 8
Ctl-D = will skip outputting to the screen--
LST OFF = ?
from main menu: (% prompt)
E = enter Editor and assembler
D = disk command
disk commands: prefix (to change directory)
brun printfiler (to capture assembly
output)
from Editor/assembler ( : prompt)
user "asdf" = set filename (asdf) to save text as,
after disk command: BRUN PRINTFILER has been entered
Q = go to main menu
A = start entering an assembly source file
E = go to editor
in editor:
control-Q = go to : prompt
control-X = start selection to cut, move cursor down to select more
lines
control-X again = cut out the selection
control-v = paste the "clipboard" to current cursor position
OP codes:
label1 DFB #00
label2 DFB #$00
label3 dfb #<label1 ;set label3 to the low byte of the address that
label 1 gets assembled to
label4 dfb #>label1 ;high byte of label1's address
label5 DS 40 ;define storage, 40 bytes
label6 asc "text" ;ascii data at address (label6), hibit set because
use quotes
label7 asc "text" ;ascii data at address (label7), hibit clear because
use apostrophes
self modifying code:
lda #<code
sta A1+1
lda #>code
sta A1+2
A1 JSR $2000 ;$2000 gets modified
self modifying code #2, like an "ON GOTO" statement in Applesoft
Basic. based on Command, different routines are JSR'd (you could
change it to a JMP)
ldy command
lda AddressTableLows,y
sta A1+1
lda lda AddressTableHighs,y
sta A1+2
A1 JSR $2000 ;$2000 gets modified
RTS
lda AddressTableLows
dfb #< command1
dfb #< command2
dfb #< command3
dfb #< command4
dfb #< command5
AddressTableHighs
dfb #> command1
dfb #> command2
dfb #> command3
dfb #> command4
dfb #> command5
command1 dostuff
lda
beq
wut
evr
rts
command2 dostuff
lda
beq
wut
evr
rts
etc...