~z88dk-team/z88dk-pkg/trunk

« back to all changes in this revision

Viewing changes to lib/nascom_crt0.asm

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-02-12 08:23:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080212082349-wgijt44scmgje90o
Tags: 1.7.ds1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - build z88dk and z88dk-bin binary packages for lpia too
  - update Maintainer field as per spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
;
6
6
; - - - - - - -
7
7
;
8
 
;       $Id: nascom_crt0.asm,v 1.2 2003/06/27 14:04:12 stefano Exp $
 
8
;       $Id: nascom_crt0.asm,v 1.5 2007/06/27 20:49:27 dom Exp $
9
9
;
10
10
; - - - - - - -
11
11
 
27
27
        XDEF    cleanup         ;jp'd to by exit()
28
28
        XDEF    l_dcal          ;jp(hl)
29
29
 
30
 
        XDEF    int_seed        ;Integer rand() seed
 
30
        XDEF    _std_seed        ;Integer rand() seed
31
31
 
32
32
        XDEF    _vfprintf       ;jp to the printf() core
33
33
 
39
39
        XDEF    heaplast        ;Near malloc heap variables
40
40
        XDEF    heapblocks
41
41
 
42
 
        XDEF    base_graphics   ;Graphical variables
 
42
        XDEF    base_graphics   ;Graphical variables (useless with NASCOM)
43
43
        XDEF    coords          ;Current xy position
44
44
 
45
45
        XDEF    montest         ;NASCOM: check the monitor type
57
57
.start
58
58
 
59
59
        ld      (start1+1),sp   ;Save entry stack
60
 
        ld      hl,-64          ;Create an atexit() stack
61
 
        add     hl,sp
 
60
 
 
61
        ; search for the top of writeble memory and set the stack pointer
 
62
        ld      hl,ffffh
 
63
        ld      a,55
 
64
.stackloop
 
65
        ld      (hl),a
 
66
        cp      (hl)
 
67
        dec     hl
 
68
        jr      nz,stackloop
 
69
 
62
70
        ld      sp,hl
63
71
        ld      (exitsp),sp
64
72
 
144
152
.coords         defw    0       ; Current graphics xy coordinates
145
153
.base_graphics  defw    0       ; Address of the Graphics map
146
154
 
147
 
.int_seed       defw    0       ; Seed for integer rand() routines
 
155
._std_seed       defw    0       ; Seed for integer rand() routines
148
156
 
149
157
.exitsp         defw    0       ; Address of where the atexit() stack is
150
158
.exitcount      defb    0       ; How many routines on the atexit() stack
153
161
.heaplast       defw    0       ; Address of last block on heap
154
162
.heapblocks     defw    0       ; Number of blocks
155
163
 
156
 
                defm  "Small C+ NASCOM"&0       ;Unnecessary file signature
 
164
                defm  "Small C+ NASCOM" ;Unnecessary file signature
 
165
                defb    0
157
166
 
158
167
;-----------------------
159
168
; Floating point support