home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
JSAGE
/
ZSUS
/
PROGPACK
/
SCZ01BET.LBR
/
SYSCCFG0.CZZ
/
SYSCCFG0.CCZ
Wrap
Text File
|
1989-05-24
|
3KB
|
78 lines
.printx * SYSCCFG0.CCZ: std cp/m header *
.z80 ; m80 needs this, slr ignores it
;******************************************************************************
.comment *
copyright (c) Al Grabauskas, 1989
system dependent header.
this file contains code to be included at assembly time if a
a definition of "main()" was detected in SmallC/Z source.
this file is used to connect your "main()" module to the
run-time support libraries of your choice.
*
;******************************************************************************
; startup code
entry Uloadpt
extrn Uentry
Uloadpt: jp Uentry
; -----------------------------------------------------------------------
; these are entry and exit vectors. Uentry will walk Uinvec on program
; startup, calling each routine in turn, and exit does the same on exit.
; the Uinvec vectors must be "hard initilialized" here. the Uexvec
; vectors may be modified at run time, by the Uinvec routines in
; particular. these vectors also serve to pull in the basic routines
; in the link step.
; note:
; i chose to put this here, but if you find yourself having too many
; variations of these, you may want to put them in a load module,
; just putting a reference in here and letting the linker do the work.
entry Uinvec,Uexvec
extrn Usysinit ; o/s dependent init routine
extrn Umeminit ; dynamic memory allocation sub-system
; main environment setup routine (calls main())
extrn Umain
Uinvec:
dw Umeminit ; dynamic memory allocation init
dw Usysinit ; o/s dependent init routine
;;;;;;; no i/o subsystem init required, but it would go here
dw Umain ; clib environment and main() execute
; (Umain always returns to system);
entry Uextrap ; user exit trap vector
entry Usetecd ; o/s dependent set exit code vector
entry Uiodint ; i/o subsystem de-init vector
entry Uretsys ; return to system vector
extrn Unulrtn ; null routine (just a ret)
extrn Uexcd ; o/s depepndent error code handler
extrn Uioexit ; i/o subsystem de-init
extrn Uretcpm ; return to o/s w/o warm boot
Uexvec:
Uextrap:dw Unulrtn ; user code exit trap
Usetecd:dw Uexcd ; o/s dependent error code handler
Uiodint:dw Uioexit ; i/o subsystem de-init
Uretsys:dw Uretcpm ; return to system w/o warm boot
dw 0 ; ensure a cold boot if the above
; is messed up for some reason
;******************************************************************************