Implement exec() for Atari XDOS.
- Adds new ENOEXEC error code, also used by Apple2 targets. - Maximum command line length is 40, incl. program name. This is an XDOS restriction. - testcode/lib/tinyshell.c has been extended to be able to run programs.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
;
|
||||
|
||||
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
||||
.export _exit, start
|
||||
.export _exit, start, excexit, SP_save
|
||||
|
||||
.import initlib, donelib
|
||||
.import callmain, zerobss
|
||||
@@ -109,12 +109,12 @@ start:
|
||||
|
||||
; Call the module destructors. This is also the exit() entry.
|
||||
|
||||
_exit: jsr donelib ; Run module destructors
|
||||
_exit: ldx SP_save
|
||||
txs ; Restore stack pointer
|
||||
|
||||
; Restore the system stuff.
|
||||
|
||||
ldx SP_save
|
||||
txs ; Restore stack pointer
|
||||
excexit:jsr donelib ; Run module destructors; 'excexit' is called from the exec routine
|
||||
|
||||
; Restore the left margin.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user