initmainargs routine by Stefan Haubenthal.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3949 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2009-02-22 17:51:12 +00:00
parent bf810bf001
commit a17d27247e
2 changed files with 115 additions and 6 deletions

View File

@@ -42,11 +42,19 @@ L1: lda sp,x
jsr CLRCH
; Switch to second charset
; Switch to second charset. The routine that is called by BSOUT to switch the
; character set will use FNLEN as temporary storage - YUCK! Since the
; initmainargs routine, which parses the command line for arguments needs this
; information, we need to save and restore it here.
; Thanks to Stefan Haubenthal for this information!
lda FNLEN
pha ; Save FNLEN
lda #14
; sta $E84C ; See PET FAQ
jsr BSOUT
pla
sta FNLEN ; Restore FNLEN
; Clear the BSS data