diff os9/mc09/crtos9.asm @ 111:c4e909f21b25

micro c,j self compiled on os9 level2
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 31 Dec 2018 17:51:27 +0900
parents 613615c9b946
children 36000611014b
line wrap: on
line diff
--- a/os9/mc09/crtos9.asm	Mon Dec 31 15:57:24 2018 +0900
+++ b/os9/mc09/crtos9.asm	Mon Dec 31 17:51:27 2018 +0900
@@ -1,6 +1,6 @@
 
 * * micro-C driver under FLEX * * 12-Dec-81 M.Ohta,H.Tezuka
-* 12-Dec-2018 S.Kono * 
+* 12-Dec-2018 for OS-9 S.Kono * 
 
 *
 * micro-C user program
@@ -46,9 +46,19 @@
         bra     __0C004
 __0C005
 *       y is heap upper bound
+* copy arg string
+        ldx     4,s
+__0C007 tst     ,x+
+        bne     __0C007
+        clr     ,-y
+__0C008 lda     ,-x
+        sta     ,-y
+        cmpx    4,s
+        bne     __0C008
+        sty     4,s
+        leax    ,y
 *  copy saved arg into new stack
 *  and change the stack
-        leax    ,y
         ldy     2,s
         ldd     4,s
         std     ,--x