Added support for cc65 program arguments.

This commit is contained in:
Oliver Schmidt
2013-05-24 18:36:30 +02:00
parent 1354e1265f
commit 5bd0a53ea2
6 changed files with 115 additions and 37 deletions

16
libsrc/sim6502/mainargs.s Normal file
View File

@@ -0,0 +1,16 @@
;
; Oliver Schmidt, 2013-05-16
;
.constructor initmainargs, 24
.import __argc, __argv, args
.segment "INIT"
initmainargs:
lda #<__argv
ldx #>__argv
jsr args
sta __argc
stx __argc+1
rts