diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index cb5bd378a..502cae621 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -161,6 +161,8 @@ L2: lda zpsave,x ; setup sp +.segment "INIT" + initsp: lda APPMHI sta sp @@ -168,7 +170,7 @@ initsp: sta sp+1 rts - .data + .data zpsave: .res zpspace diff --git a/libsrc/atari/dosdetect.s b/libsrc/atari/dosdetect.s index a9014fe93..4972953fa 100644 --- a/libsrc/atari/dosdetect.s +++ b/libsrc/atari/dosdetect.s @@ -8,8 +8,11 @@ .constructor detect,26 .export __dos_type +; ------------------------------------------------------------------------ ; DOS type detection +.segment "INIT" + detect: lda #ATARIDOS sta __dos_type ; set default @@ -43,7 +46,10 @@ mydos: lda #MYDOS sta __dos_type rts - .bss +; ------------------------------------------------------------------------ +; Data + + .bss __dos_type: .res 1 diff --git a/libsrc/atari/getargs.s b/libsrc/atari/getargs.s index d2d7157ea..7a43407c4 100644 --- a/libsrc/atari/getargs.s +++ b/libsrc/atari/getargs.s @@ -12,8 +12,11 @@ SPACE = 32 ; SPACE char. .import __dos_type .constructor initmainargs,25 +; -------------------------------------------------------------------------- ; Get command line +.segment "INIT" + initmainargs: lda #0 sta __argc @@ -32,7 +35,7 @@ nargdos:rts argdos: lda #ATEOL sta ourcl+CL_SIZE - + ; Move SpartaDOS command line to our own buffer lda DOSVEC @@ -112,7 +115,7 @@ eopar: finargs: lda __argc - asl + asl tax lda #0 sta argv,x @@ -123,7 +126,10 @@ finargs: stx __argv+1 rts - .bss +; -------------------------------------------------------------------------- +; Data + +.bss argv: .res (1 + MAXARGS) * 2