Commit | Line | Data |
---|---|---|
0c2459f2 BJ |
1 | # |
2 | # This module contains the stack push routine and the fltused | |
3 | # symbol definition. Push() doesn't have to be machine coded | |
4 | # but it does get called alot. The fltused definition will | |
5 | # prevent the loader from adding some printf-associated modules. | |
6 | # | |
7 | # If APL is to be loaded from a library, then some undefined | |
8 | # symbol must be present in the module which contains the | |
9 | # fltused definition. In that sense, it is necessary to | |
10 | # have _push (or something) in machine code. | |
11 | # | |
12 | # Ross Harvey 18-May-78 | |
13 | # | |
14 | .text | |
15 | .globl _push | |
16 | _push: .word 0 | |
17 | movl _sp, r0 | |
18 | # movl 4(ap),(r0) | |
19 | # acbl $4,_sp,_staktop,ok | |
20 | movl 4(ap),(r0)+ | |
21 | cmpl r0, _staktop | |
22 | bgtr toobig | |
23 | movl r0, _sp | |
24 | ret | |
25 | toobig: movl r0,_sp | |
26 | calls $0,_newstak | |
27 | ret |