BSD 4_1_snap development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 25 May 1979 14:02:52 +0000 (06:02 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 25 May 1979 14:02:52 +0000 (06:02 -0800)
Work on file usr/src/cmd/apl/apl_s.s

Synthesized-from: CSRG/cd1/4.1.snap

usr/src/cmd/apl/apl_s.s [new file with mode: 0644]

diff --git a/usr/src/cmd/apl/apl_s.s b/usr/src/cmd/apl/apl_s.s
new file mode 100644 (file)
index 0000000..0186847
--- /dev/null
@@ -0,0 +1,27 @@
+#
+#      This module contains the stack push routine and the fltused
+#      symbol definition.  Push() doesn't have to be machine coded
+#      but it does get called alot.  The fltused definition will
+#      prevent the loader from adding some printf-associated modules.
+#
+#      If APL is to be loaded from a library, then some undefined
+#      symbol must be present in the module which contains the
+#      fltused definition.  In that sense, it is necessary to
+#      have _push (or something) in machine code.
+#
+#                                      Ross Harvey 18-May-78
+#
+.text
+.globl _push
+_push: .word   0
+       movl    _sp, r0
+#      movl    4(ap),(r0)
+#      acbl    $4,_sp,_staktop,ok
+       movl    4(ap),(r0)+
+       cmpl    r0, _staktop
+       bgtr    toobig
+       movl    r0, _sp
+       ret
+toobig:        movl    r0,_sp
+       calls   $0,_newstak
+       ret