1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-20 17:20:49 +00:00

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
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
+7 -6
View File
@@ -7,10 +7,11 @@
; int __fastcall__ write (int fd, const void* buf, unsigned count);
;
.export exit, _open, _close, _read, _write
.export args, exit, _open, _close, _read, _write
exit := $FFF0
_open := $FFF1
_close := $FFF2
_read := $FFF3
_write := $FFF4
args := $FFF0
exit := $FFF1
_open := $FFF2
_close := $FFF3
_read := $FFF4
_write := $FFF5