这是什么方言的6502汇编,我如何编译它而不翻译成一个不同的6502方言?
*=$0900
jmp Start
SCRN_START=$0400
Print=$ffd2
Basin=$ffcf
incasm "Character_ASCII_Const.asm"
defm PrintText
ldy #>/1 ; Load Hi Byte to Y
lda #</1 ; Load Lo Byte to Acc.
jsr String ; Print The text until hit Zero
endm
Start
lda #$83
clc
sbc #$02
jsr PrintAccumlator
rts我目前正在使用CC65作为我的6502汇编程序。
我按照以下方式编译代码:
$ cl65 -o mycode.prg -u __EXEHDR__ -t c64 -C c64-asm.cfg mycode.asm但这意味着我必须对上面的代码进行编辑,所以现在看起来如下。
jmp Start
SCRN_START=$0400
Print=$ffd2
Basin=$ffcf
.include "Character_ASCII_Const.asm"
.macro PrintText value
ldy #>value ; Load Hi Byte to Y
lda #<value ; Load Lo Byte to Acc.
jsr String ; Print The text until hit Zero
.endmacro
Start:
lda #$83
clc
sbc #$02
jsr PrintAccumlator
rts这是我的c64-asm.cfg
FEATURES {
STARTADDRESS: default = $0801;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $00FE, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = $D000 - %S;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}发布于 2020-06-11 15:46:22
这是CBM prg演播室的程序集文件。
据我所知,在其他汇编程序中使用这些方法并不容易。但是,一些简单的搜索/替换将使您大部分的方式。
https://stackoverflow.com/questions/61762254
复制相似问题