| 1 | .LS .ID |
| 2 | .ta 8n 16n 24n |
| 3 | .nf |
| 4 | / |
| 5 | / Modified C runtime startoff for pcx |
| 6 | / with floating point interpreter |
| 7 | / |
| 8 | \&.globl savr5 |
| 9 | \&.globl fptrap |
| 10 | \&.globl _exit, _pxpbuf, _main |
| 11 | |
| 12 | start: |
| 13 | / |
| 14 | / If non shared text the following |
| 15 | / three words will be the beginning of the core image |
| 16 | / |
| 17 | br 1f |
| 18 | 0 / 0 = Non-shared text |
| 19 | _pxpbuf |
| 20 | 1: |
| 21 | sys signal; 4; fptrap |
| 22 | setd |
| 23 | mov sp,r0 |
| 24 | mov (r0),-(sp) |
| 25 | tst (r0)+ |
| 26 | mov r0,2(sp) |
| 27 | jsr pc,_main |
| 28 | cmp (sp)+,(sp)+ |
| 29 | mov r0,(sp) |
| 30 | jsr pc,*$_exit |
| 31 | sys exit |
| 32 | |
| 33 | \&.bss |
| 34 | savr5: .=.+2 |
| 35 | \&.data |
| 36 | / |
| 37 | / If pcx is loaded with shared text -n |
| 38 | / or separate i and d -i, then the |
| 39 | / following three words will be the first |
| 40 | / in the core image. Note that in this |
| 41 | / case the pointer to the buffer will |
| 42 | / be deceivingly large. The first word |
| 43 | / of offset can be subtracted to correct |
| 44 | / it without having to do the involved |
| 45 | / calculations to really calculate the |
| 46 | / address of the buffer correctly. We |
| 47 | / can get away with this because we know the |
| 48 | / buffer is not in stack space. |
| 49 | / |
| 50 | _info: |
| 51 | _info |
| 52 | 1 / 1 = pure text |
| 53 | _pxpbuf |
| 54 | .fi |
| 55 | .LE |