From 4c06d021c6fa6303c96486130497eb45f3991d68 Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 8 Oct 2004 18:52:22 +0000 Subject: [PATCH] Move startup code to STARTUP segment. Added several "do nothing" files. git-svn-id: svn://svn.cc65.org/cc65/trunk@3225 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/lynx/crt0.s | 2 +- libsrc/lynx/getenv.s | 12 ++++++++++++ libsrc/lynx/mainargs.s | 21 +++++++++++++++++++++ libsrc/lynx/sysuname.s | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 libsrc/lynx/getenv.s create mode 100644 libsrc/lynx/mainargs.s create mode 100644 libsrc/lynx/sysuname.s diff --git a/libsrc/lynx/crt0.s b/libsrc/lynx/crt0.s index 7542e2112..1d8e19de3 100644 --- a/libsrc/lynx/crt0.s +++ b/libsrc/lynx/crt0.s @@ -68,7 +68,7 @@ __sprsys: .res 1 ; ------------------------------------------------------------------------ ; Actual code - .code + .segment "STARTUP" ; set up system diff --git a/libsrc/lynx/getenv.s b/libsrc/lynx/getenv.s new file mode 100644 index 000000000..81966c6df --- /dev/null +++ b/libsrc/lynx/getenv.s @@ -0,0 +1,12 @@ +; +; Ullrich von Bassewitz, 2004-10-08 +; +; char* getenv (const char* name); +; + + .export _getenv + .import return0 + +_getenv = return0 ; "not found" + + diff --git a/libsrc/lynx/mainargs.s b/libsrc/lynx/mainargs.s new file mode 100644 index 000000000..d6bae50d6 --- /dev/null +++ b/libsrc/lynx/mainargs.s @@ -0,0 +1,21 @@ +; +; Ullrich von Bassewitz, 2004-10-08 +; +; Setup arguments for main +; + + + .constructor initmainargs, 24 + .import __argc, __argv + + +;--------------------------------------------------------------------------- +; Setup arguments for main + +.proc initmainargs + + rts + +.endproc + + diff --git a/libsrc/lynx/sysuname.s b/libsrc/lynx/sysuname.s new file mode 100644 index 000000000..879297ea4 --- /dev/null +++ b/libsrc/lynx/sysuname.s @@ -0,0 +1,39 @@ +; +; Ullrich von Bassewitz, 2004-10-08 +; +; unsigned char __fastcall__ _sysuname (struct utsname* buf); +; + + .export __sysuname, utsdata + + .import utscopy + + __sysuname = utscopy + +;-------------------------------------------------------------------------- +; Data. We define a fixed utsname struct here and just copy it. + +.rodata + +utsdata: + ; sysname + .asciiz "cc65" + + ; nodename + .asciiz "" + + ; release + .byte ((.VERSION >> 8) & $0F) + '0' + .byte '.' + .byte ((.VERSION >> 4) & $0F) + '0' + .byte $00 + + ; version + .byte (.VERSION & $0F) + '0' + .byte $00 + + ; machine + .asciiz "LYNX" + + + -- 2.39.5