* device/lib/gbz80/crt0.s,
authorMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 20 Oct 2006 14:11:41 +0000 (14:11 +0000)
committerMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 20 Oct 2006 14:11:41 +0000 (14:11 +0000)
* device/lib/gbz80/crt0_rle.s,
* device/lib/gbz80/div.s,
* device/lib/gbz80/fstubs.s,
* device/lib/gbz80/heap.s,
* device/lib/gbz80/mul.s,
* device/lib/gbz80/putchar.s,
* device/lib/gbz80/stubs.s,
* device/lib/z80/crt0.s,
* device/lib/z80/crt0_rle.s,
* device/lib/z80/div.s,
* device/lib/z80/fstubs.s,
* device/lib/z80/heap.s,
* device/lib/z80/mul.s,
* device/lib/z80/putchar.s,
* device/lib/z80/stubs.s: reverted, I was mistaken

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4422 4a8a32a2-be11-0410-ad9d-d568d2c75423

17 files changed:
ChangeLog
device/lib/gbz80/crt0.s
device/lib/gbz80/crt0_rle.s
device/lib/gbz80/div.s
device/lib/gbz80/fstubs.s
device/lib/gbz80/heap.s
device/lib/gbz80/mul.s
device/lib/gbz80/putchar.s
device/lib/gbz80/stubs.s
device/lib/z80/crt0.s
device/lib/z80/crt0_rle.s
device/lib/z80/div.s
device/lib/z80/fstubs.s
device/lib/z80/heap.s
device/lib/z80/mul.s
device/lib/z80/putchar.s
device/lib/z80/stubs.s

index 7673c3d481671e8e166fbb92e28cda706d961d74..e8e99404573472d05f32e88ce3f6e866d1c63808 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,27 @@
+2006-10-20 Maarten Brock <sourceforge.brock AT dse.nl>
+
+       * device/lib/gbz80/crt0.s,
+       * device/lib/gbz80/crt0_rle.s,
+       * device/lib/gbz80/div.s,
+       * device/lib/gbz80/fstubs.s,
+       * device/lib/gbz80/heap.s,
+       * device/lib/gbz80/mul.s,
+       * device/lib/gbz80/putchar.s,
+       * device/lib/gbz80/stubs.s,
+       * device/lib/z80/crt0.s,
+       * device/lib/z80/crt0_rle.s,
+       * device/lib/z80/div.s,
+       * device/lib/z80/fstubs.s,
+       * device/lib/z80/heap.s,
+       * device/lib/z80/mul.s,
+       * device/lib/z80/putchar.s,
+       * device/lib/z80/stubs.s: reverted, I was mistaken
+
 2006-10-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
 
        * src/mcs51/peeph.def: peephole 238.x added check for notvolatile
-       * support/regression/ports/mcs51/support.c: removed race 
-       condition on TI in _putchar allowing to use serial port mode 0  
+       * support/regression/ports/mcs51/support.c: removed race
+       condition on TI in _putchar allowing to use serial port mode 0
 
 2006-10-20 Borut Razem <borut.razem AT siol.net>
 
index eda721403b55112a28b78d44f9b2a966901c2524..814b43ed2cdc8b1916ca88366acac5dc1fc54534 100644 (file)
@@ -1,68 +1,68 @@
-       ;; Generic crt0.s for a GBZ80
-       .globl  _main
+        ;; Generic crt0.s for a GBZ80
+        .globl  _main
 
-       .area HEADER (ABS)
-       ;; Reset vector
-       .org    0
-       jp      init
+        .area   _HEADER (ABS)
+        ;; Reset vector
+        .org    0
+        jp      init
 
-       .org    0x08
-       reti
-       .org    0x10
-       reti
-       .org    0x18
-       reti
-       .org    0x20
-       reti
-       .org    0x28
-       reti
-       .org    0x30
-       reti
-       .org    0x38
-       reti
+        .org    0x08
+        reti
+        .org    0x10
+        reti
+        .org    0x18
+        reti
+        .org    0x20
+        reti
+        .org    0x28
+        reti
+        .org    0x30
+        reti
+        .org    0x38
+        reti
 
-       .org    0x100
-       jp      0x150
-               
-       .org    0x150
+        .org    0x100
+        jp      0x150
+
+        .org    0x150
 init:
-       di
-       ;; Stack at the top of memory.
-       ld      sp,#0xdfff        
+        di
+        ;; Stack at the top of memory.
+        ld      sp,#0xdfff
 
         ;; Setup global data
         call    gsinit
-        
-       ;; Use _main instead of main to bypass sdcc's intelligence
-       call    _main
-       jp      _exit
 
-       ;; Ordering of segments for the linker.
-       .area   HOME
-       .area   CODE
-        .area   GSINIT
-        .area   GSFINAL
-        
-       .area   DATA
-        .area   BSS
-        .area   HEAP
+        ;; Use _main instead of main to bypass sdcc's intelligence
+        call    _main
+        jp      _exit
+
+        ;; Ordering of segments for the linker.
+        .area   _HOME
+        .area   _CODE
+        .area   _GSINIT
+        .area   _GSFINAL
+
+        .area   _DATA
+        .area   _BSS
+        .area   _HEAP
 
-        .area   CODE
+        .area   _CODE
 __clock::
-       ld      a,#2
-       rst     0x08
-       ret
-       
+        ld      a,#2
+        rst     0x08
+        ret
+
 _exit::
-       ;; Exit - special code to the emulator
-       ld      a,#0
-       rst     0x08
+        ;; Exit - special code to the emulator
+        ld      a,#0
+        rst     0x08
 1$:
-       halt
-       jr      1$
+        halt
+        jr      1$
 
-        .area   GSINIT
-gsinit::       
+        .area   _GSINIT
+gsinit::
 
-        .area   GSFINAL
+        .area   _GSFINAL
         ret
index 8b0e84672a789d2fc0ffe8a29b098fb64f8e7e1c..859a6ae3b444be54fa53ea9f0222257814825360 100644 (file)
@@ -1,4 +1,4 @@
-        .area   CODE
+        .area   _CODE
 
         ;; Special RLE decoder used for initing global data
 __initrleblock::
index 7dfcbdff4af21342f469515d93ef4692a86540ab..d2ac308d3e4e0edf33830fd1e80b338129f880a4 100644 (file)
@@ -1,5 +1,5 @@
-       ;; Originally from GBDK by Pascal Felber.
-       .area   CODE
+        ;; Originally from GBDK by Pascal Felber.
+        .area   _CODE
 
 __divschar_rrx_s::
         ld      hl,#2+1
@@ -15,10 +15,10 @@ __divschar_rrx_hds::
 
         call    .div8
 
-       ld      e,c
+        ld      e,c
         ld      d,b
 
-       ret
+        ret
 
 __modschar_rrx_s::
         ld      hl,#2+1
@@ -32,11 +32,11 @@ __modschar_rrx_s::
 __modschar_rrx_hds::
         ld      c,l
 
-               call    .div8
+        call    .div8
 
         ;; Already in DE
 
-       ret
+        ret
 
 __divsint_rrx_s::
         ld      hl,#2+3
@@ -53,15 +53,15 @@ __divsint_rrx_s::
 
         ;; Fall through
 __divsint_rrx_hds::
-       ld      b,h
-       ld      c,l
+        ld      b,h
+        ld      c,l
 
-       call    .div16
+        call    .div16
 
-       ld      e,c
-       ld      d,b
+        ld      e,c
+        ld      d,b
 
-       ret
+        ret
 
 __modsint_rrx_s::
         ld      hl,#2+3
@@ -78,16 +78,16 @@ __modsint_rrx_s::
 
         ;; Fall through
 __modsint_rrx_hds::
-       ld      b,h
-       ld      c,l
+        ld      b,h
+        ld      c,l
 
-       call    .div16
+        call    .div16
 
         ;; Already in DE
 
-       ret
+        ret
 
-       ;; Unsigned
+        ;; Unsigned
 __divuchar_rrx_s::
         ld      hl,#2+1
         add     hl,sp
@@ -99,12 +99,12 @@ __divuchar_rrx_s::
         ;; Fall through
 __divuchar_rrx_hds::
         ld      c,l
-       call    .divu8
+        call    .divu8
 
-       ld      e,c
+        ld      e,c
         ld      d,b
 
-       ret
+        ret
 
 __moduchar_rrx_s::
         ld      hl,#2+1
@@ -117,7 +117,7 @@ __moduchar_rrx_s::
         ;; Fall through
 __moduchar_rrx_hds::
         ld      c,l
-       call    .divu8
+        call    .divu8
 
         ;; Already in DE
 
@@ -138,14 +138,14 @@ __divuint_rrx_s::
 
         ;; Fall through
 __divuint_rrx_hds::
-       ld      b,h
-       ld      c,l
-       call    .divu16
+        ld      b,h
+        ld      c,l
+        call    .divu16
 
-       ld      e,c
-       ld      d,b
+        ld      e,c
+        ld      d,b
 
-       ret
+        ret
 
 __moduint_rrx_s::
         ld      hl,#2+3
@@ -162,170 +162,170 @@ __moduint_rrx_s::
         ;; Fall through
 
 __moduint_rrx_hds::
-       ld      b,h
-       ld      c,l
+        ld      b,h
+        ld      c,l
 
-       call    .divu16
+        call    .divu16
 
         ;; Already in DE
 
-       ret
+        ret
 
 .div8::
 .mod8::
-       ld      a,c             ; Sign extend
-       rlca
-       sbc     a
-       ld      b,a
-       ld      a,e             ; Sign extend
-       rlca
-       sbc     a
-       ld      d,a
-
-       ; Fall through to .div16
-
-       ;; 16-bit division
-       ;;
-       ;; Entry conditions
-       ;;   BC = dividend
-       ;;   DE = divisor
-       ;;
-       ;; Exit conditions
-       ;;   BC = quotient
-       ;;   DE = remainder
-       ;;   If divisor is non-zero, carry=0
-       ;;   If divisor is 0, carry=1 and both quotient and remainder are 0
-       ;;
-       ;; Register used: AF,BC,DE,HL
+        ld      a,c             ; Sign extend
+        rlca
+        sbc     a
+        ld      b,a
+        ld      a,e             ; Sign extend
+        rlca
+        sbc     a
+        ld      d,a
+
+        ; Fall through to .div16
+
+        ;; 16-bit division
+        ;;
+        ;; Entry conditions
+        ;;   BC = dividend
+        ;;   DE = divisor
+        ;;
+        ;; Exit conditions
+        ;;   BC = quotient
+        ;;   DE = remainder
+        ;;   If divisor is non-zero, carry=0
+        ;;   If divisor is 0, carry=1 and both quotient and remainder are 0
+        ;;
+        ;; Register used: AF,BC,DE,HL
 .div16::
 .mod16::
-       ;; Determine sign of quotient by xor-ing high bytes of dividend
-       ;;  and divisor. Quotient is positive if signs are the same, negative
-       ;;  if signs are different
-       ;; Remainder has same sign as dividend
-       ld      a,b             ; Get high byte of dividend
-       ld      (.srem),a       ; Save as sign of remainder
-       xor     d               ; Xor with high byte of divisor
-       ld      (.squot),a      ; Save sign of quotient
-       ;; Take absolute value of divisor
-       bit     7,d
-       jr      Z,.chkde        ; Jump if divisor is positive
-       sub     a               ; Substract divisor from 0
-       sub     e
-       ld      e,a
-       sbc     a               ; Propagate borrow (A=0xFF if borrow)
-       sub     d
-       ld      d,a
-       ;; Take absolute value of dividend
+        ;; Determine sign of quotient by xor-ing high bytes of dividend
+        ;;  and divisor. Quotient is positive if signs are the same, negative
+        ;;  if signs are different
+        ;; Remainder has same sign as dividend
+        ld      a,b             ; Get high byte of dividend
+        ld      (.srem),a       ; Save as sign of remainder
+        xor     d               ; Xor with high byte of divisor
+        ld      (.squot),a      ; Save sign of quotient
+        ;; Take absolute value of divisor
+        bit     7,d
+        jr      Z,.chkde        ; Jump if divisor is positive
+        sub     a               ; Substract divisor from 0
+        sub     e
+        ld      e,a
+        sbc     a               ; Propagate borrow (A=0xFF if borrow)
+        sub     d
+        ld      d,a
+        ;; Take absolute value of dividend
 .chkde:
-       bit     7,b
-       jr      Z,.dodiv        ; Jump if dividend is positive
-       sub     a               ; Substract dividend from 0
-       sub     c
-       ld      c,a
-       sbc     a               ; Propagate borrow (A=0xFF if borrow)
-       sub     b
-       ld      b,a
-       ;; Divide absolute values
+        bit     7,b
+        jr      Z,.dodiv        ; Jump if dividend is positive
+        sub     a               ; Substract dividend from 0
+        sub     c
+        ld      c,a
+        sbc     a               ; Propagate borrow (A=0xFF if borrow)
+        sub     b
+        ld      b,a
+        ;; Divide absolute values
 .dodiv:
-       call    .divu16
-       ret     C               ; Exit if divide by zero
-       ;; Negate quotient if it is negative
-       ld      a,(.squot)
-       and     #0x80
-       jr      Z,.dorem        ; Jump if quotient is positive
-       sub     a               ; Substract quotient from 0
-       sub     c
-       ld      c,a
-       sbc     a               ; Propagate borrow (A=0xFF if borrow)
-       sub     b
-       ld      b,a
+        call    .divu16
+        ret     C               ; Exit if divide by zero
+        ;; Negate quotient if it is negative
+        ld      a,(.squot)
+        and     #0x80
+        jr      Z,.dorem        ; Jump if quotient is positive
+        sub     a               ; Substract quotient from 0
+        sub     c
+        ld      c,a
+        sbc     a               ; Propagate borrow (A=0xFF if borrow)
+        sub     b
+        ld      b,a
 .dorem:
-       ;; Negate remainder if it is negative
-       ld      a,(.srem)
-       and     #0x80
-       ret     Z               ; Return if remainder is positive
-       sub     a               ; Substract remainder from 0
-       sub     e
-       ld      e,a
-       sbc     a               ; Propagate remainder (A=0xFF if borrow)
-       sub     d
-       ld      d,a
-       ret
+        ;; Negate remainder if it is negative
+        ld      a,(.srem)
+        and     #0x80
+        ret     Z               ; Return if remainder is positive
+        sub     a               ; Substract remainder from 0
+        sub     e
+        ld      e,a
+        sbc     a               ; Propagate remainder (A=0xFF if borrow)
+        sub     d
+        ld      d,a
+        ret
 
 .divu8::
 .modu8::
-       ld      b,#0x00
-       ld      d,b
-       ; Fall through to divu16
+        ld      b,#0x00
+        ld      d,b
+        ; Fall through to divu16
 
 .divu16::
 .modu16::
-       ;; Check for division by zero
-       ld      a,e
-       or      d
-       jr      NZ,.divide      ; Branch if divisor is non-zero
-       ld      bc,#0x00        ; Divide by zero error
-       ld      d,b
-       ld      e,c
-       scf                     ; Set carry, invalid result
-       ret
+        ;; Check for division by zero
+        ld      a,e
+        or      d
+        jr      NZ,.divide      ; Branch if divisor is non-zero
+        ld      bc,#0x00        ; Divide by zero error
+        ld      d,b
+        ld      e,c
+        scf                     ; Set carry, invalid result
+        ret
 .divide:
-       ld      l,c             ; L = low byte of dividend/quotient
-       ld      h,b             ; H = high byte of dividend/quotient
-       ld      bc,#0x00        ; BC = remainder
-       or      a               ; Clear carry to start
-       ld      a,#16           ; 16 bits in dividend
+        ld      l,c             ; L = low byte of dividend/quotient
+        ld      h,b             ; H = high byte of dividend/quotient
+        ld      bc,#0x00        ; BC = remainder
+        or      a               ; Clear carry to start
+        ld      a,#16           ; 16 bits in dividend
 .dvloop:
-       ;; Shift next bit of quotient into bit 0 of dividend
-       ;; Shift next MSB of dividend into LSB of remainder
-       ;; BC holds both dividend and quotient. While we shift a bit from
-       ;;  MSB of dividend, we shift next bit of quotient in from carry
-       ;; HL holds remainder
-       ;; Do a 32-bit left shift, shifting carry to L, L to H,
-       ;;  H to C, C to B
-       ld      (.dcnt),a
-       rl      l               ; Carry (next bit of quotient) to bit 0
-       rl      h               ; Shift remaining bytes
-       rl      c
-       rl      b               ; Clears carry since BC was 0
-       ;; If remainder is >= divisor, next bit of quotient is 1. This
-       ;;  bit goes to carry
-       push    bc              ; Save current remainder
-       ld      a,c             ; Substract divisor from remainder
-       sbc     e
-       ld      c,a
-       ld      a,b
-       sbc     d
-       ld      b,a
-       ccf                     ; Complement borrow so 1 indicates a
-                               ;  successful substraction (this is the
-                               ;  next bit of quotient)
-       jr      C,.drop         ; Jump if remainder is >= dividend
-       pop     bc              ; Otherwise, restore remainder
-       jr      .nodrop
+        ;; Shift next bit of quotient into bit 0 of dividend
+        ;; Shift next MSB of dividend into LSB of remainder
+        ;; BC holds both dividend and quotient. While we shift a bit from
+        ;;  MSB of dividend, we shift next bit of quotient in from carry
+        ;; HL holds remainder
+        ;; Do a 32-bit left shift, shifting carry to L, L to H,
+        ;;  H to C, C to B
+        ld      (.dcnt),a
+        rl      l               ; Carry (next bit of quotient) to bit 0
+        rl      h               ; Shift remaining bytes
+        rl      c
+        rl      b               ; Clears carry since BC was 0
+        ;; If remainder is >= divisor, next bit of quotient is 1. This
+        ;;  bit goes to carry
+        push    bc              ; Save current remainder
+        ld      a,c             ; Substract divisor from remainder
+        sbc     e
+        ld      c,a
+        ld      a,b
+        sbc     d
+        ld      b,a
+        ccf                     ; Complement borrow so 1 indicates a
+                                ;  successful substraction (this is the
+                                ;  next bit of quotient)
+        jr      C,.drop         ; Jump if remainder is >= dividend
+        pop     bc              ; Otherwise, restore remainder
+        jr      .nodrop
 .drop:
-       inc     sp
-       inc     sp
+        inc     sp
+        inc     sp
 .nodrop:
-       ld      a,(.dcnt)
-       dec     a               ; DEC does not affect carry flag
-       jr      NZ,.dvloop
-       ;; Shift last carry bit into quotient
-       ld      d,b             ; DE = remainder
-       ld      e,c
-       rl      l               ; Carry to L
-       ld      c,l             ; C = low byte of quotient
-       rl      h
-       ld      b,h             ; B = high byte of quotient
-       or      a               ; Clear carry, valid result
-       ret
-
-       .area   BSS
+        ld      a,(.dcnt)
+        dec     a               ; DEC does not affect carry flag
+        jr      NZ,.dvloop
+        ;; Shift last carry bit into quotient
+        ld      d,b             ; DE = remainder
+        ld      e,c
+        rl      l               ; Carry to L
+        ld      c,l             ; C = low byte of quotient
+        rl      h
+        ld      b,h             ; B = high byte of quotient
+        or      a               ; Clear carry, valid result
+        ret
+
+        .area   _BSS
 
 .srem:
-       .ds 0x01                ; Sign of quotient
+        .ds 0x01                ; Sign of quotient
 .squot:
-       .ds 0x01                ; Sign of remainder
+        .ds 0x01                ; Sign of remainder
 .dcnt:
-       .ds 0x01                ; Counter for division
+        .ds 0x01                ; Counter for division
index 33605173384f80447155f80936d12c987cc1dc86..a1804e7f5e2b6fbf284979ecd062fddaa5cc6dd8 100644 (file)
@@ -1,6 +1,6 @@
         ;; Stubs to match between function names
-        .area CODE
+        .area  _CODE
         .globl  ___slong2fs
-        
-___slong2fs_rrx_s::     
+
+___slong2fs_rrx_s::
         jp      ___slong2fs
index bb1a8320465f74f86b55447e5285bf6a66bb6d22..06b452feafc4d362253e1c6096268e664b3fa51a 100644 (file)
@@ -1,14 +1,14 @@
         ;; Stubs that hook the heap in
         .globl  __sdcc_heap_init
-        
-        .area   GSINIT
+
+        .area   _GSINIT
         call    __sdcc_heap_init
-        
-        .area   HEAP
+
+        .area   _HEAP
 __sdcc_heap_start::
         ;; For now just allocate 1k of heap.
         .ds     1023
-        
-        .area   HEAP_END
+
+        .area   _HEAP_END
 __sdcc_heap_end::
         .ds     1
index 0cac8db0eabaf5ac46206bbcd0f0e54b4b831f7b..5e34c7602a80f9a8b6a845f93fea298c7689eda6 100644 (file)
@@ -1,6 +1,6 @@
-       ;; Originally from GBDK by Pascal Felber.
+        ;; Originally from GBDK by Pascal Felber.
 
-       .area   CODE
+        .area   _CODE
 
 __mulschar_rrx_s::
         ld      hl,#2
@@ -60,21 +60,21 @@ __mulint_rrx_s::
 
 __muluchar_rrx_hds::
 __mulint_rrx_hds::
-       ;; Parameters:
-       ;;      HL, DE (left, right irrelivent)
-       ld      b,h
-       ld      c,l
-
-       ;; 16-bit multiplication
-       ;;
-       ;; Entry conditions
-       ;;   BC = multiplicand
-       ;;   DE = multiplier
-       ;;
-       ;; Exit conditions
-       ;;   DE = less significant word of product
-       ;;
-       ;; Register used: AF,BC,DE,HL
+        ;; Parameters:
+        ;;      HL, DE (left, right irrelivent)
+        ld      b,h
+        ld      c,l
+
+        ;; 16-bit multiplication
+        ;;
+        ;; Entry conditions
+        ;;   BC = multiplicand
+        ;;   DE = multiplier
+        ;;
+        ;; Exit conditions
+        ;;   DE = less significant word of product
+        ;;
+        ;; Register used: AF,BC,DE,HL
 .mul16:
         ld      hl,#0
         ld      a,b
index 8eb9dc4d373e8e2656454a3c23b5f6bdf5eae9ce..54596af686ef2189a2658cc382032396647102e6 100644 (file)
@@ -1,15 +1,15 @@
-       .area CODE
-_putchar::       
-_putchar_rr_s:: 
+       .area   _CODE
+_putchar::
+_putchar_rr_s::
         ld      hl,#2
         add     hl,sp
-        
+
         ld      l,(hl)
         ld      a,#1
         rst     0x08
-        
+
         ret
-           
+
 _putchar_rr_dbs::
         ld      l,e
        ld      a,#1
index ebb22252a9a6d5a4e84e85ee5fc65c2d5d36c7de..695588d84906b2830a74ccc95d2fb78774e7af65 100644 (file)
@@ -1,26 +1,26 @@
         ;; Stubs to match between function names
-        .area CODE
+        .area   _CODE
 
         .globl  __mullong
         .globl  __modslong
         .globl  __modulong
         .globl  __divslong
         .globl  __divulong
-        .globl __divschar_rrx_s
-        .globl __divsint_rrx_s
-        .globl __divuchar_rrx_s
-        .globl __divuint_rrx_s
-        .globl __mulschar_rrx_s
-        .globl __muluchar_rrx_s
-        .globl __mulint_rrx_s
+        .globl  __divschar_rrx_s
+        .globl  __divsint_rrx_s
+        .globl  __divuchar_rrx_s
+        .globl  __divuint_rrx_s
+        .globl  __mulschar_rrx_s
+        .globl  __muluchar_rrx_s
+        .globl  __mulint_rrx_s
         .globl  __moduchar_rrx_s
         .globl  __modschar_rrx_s
         .globl  __moduint_rrx_s
         .globl  __modsint_rrx_s
-        .globl __rrulong_rrx_s
-        .globl __rrslong_rrx_s
-        .globl __rlulong_rrx_s
-        .globl __rlslong_rrx_s
+        .globl  __rrulong_rrx_s
+        .globl  __rrslong_rrx_s
+        .globl  __rlulong_rrx_s
+        .globl  __rlslong_rrx_s
 
 __mullong_rrx_s::
 __mullong_rrf_s::
@@ -45,74 +45,74 @@ __divulong_rrf_s::
 __mulint_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __mulint_rrx_s
+        jp      __mulint_rrx_s
 
 __divsint_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __divsint_rrx_s
+        jp      __divsint_rrx_s
 
 __divuint_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __divuint_rrx_s
+        jp      __divuint_rrx_s
 
 __mulschar_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __mulschar_rrx_s
+        jp      __mulschar_rrx_s
 
 __divschar_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __divschar_rrx_s
+        jp      __divschar_rrx_s
 
 __muluchar_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __muluchar_rrx_s
+        jp      __muluchar_rrx_s
 
 __divuchar_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __divuchar_rrx_s
+        jp      __divuchar_rrx_s
 
 __modschar_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __modschar_rrx_s
+        jp      __modschar_rrx_s
 
 __moduchar_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __moduchar_rrx_s
+        jp      __moduchar_rrx_s
 
 __modsint_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __modsint_rrx_s
+        jp      __modsint_rrx_s
 
 __moduint_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __moduint_rrx_s
+        jp      __moduint_rrx_s
 
 __rrulong_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __rrulong_rrx_s
+        jp      __rrulong_rrx_s
 
 __rrslong_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __rrslong_rrx_s
+        jp      __rrslong_rrx_s
 
 __rlulong_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __rlulong_rrx_s
+        jp      __rlulong_rrx_s
 
 __rlslong_rrf_s::
         ld      a,#5
         rst     0x08
-        jp     __rlslong_rrx_s
+        jp      __rlslong_rrx_s
index a87a2baab8d68ee72db8783394a12e040e53fac7..7ff5fa43da945aac9e9ca5ab520ef370fc0acb91 100644 (file)
@@ -2,7 +2,7 @@
         .module crt0
                .globl  _main
 
-       .area HEADER (ABS)
+       .area   _HEADER (ABS)
        ;; Reset vector
        .org    0
        jp      init
        reti
        .org    0x38
        reti
-       
+
        .org    0x100
 init:
        ;; Stack at the top of memory.
-       ld      sp,#0xffff        
+       ld      sp,#0xffff
 
         ;; Initialise global variables
         call    gsinit
@@ -33,21 +33,21 @@ init:
        jp      _exit
 
        ;; Ordering of segments for the linker.
-       .area   HOME
-       .area   CODE
-        .area   GSINIT
-        .area   GSFINAL
-        
-       .area   DATA
-        .area   BSS
-        .area   HEAP
-
-        .area   CODE
+       .area   _HOME
+       .area   _CODE
+        .area   _GSINIT
+        .area   _GSFINAL
+
+       .area   _DATA
+        .area   _BSS
+        .area   _HEAP
+
+        .area   _CODE
 __clock::
        ld      a,#2
         rst     0x08
        ret
-       
+
 _exit::
        ;; Exit - special code to the emulator
        ld      a,#0
@@ -56,8 +56,8 @@ _exit::
        halt
        jr      1$
 
-        .area   GSINIT
-gsinit::       
+        .area   _GSINIT
+gsinit::
 
-        .area   GSFINAL
+        .area   _GSFINAL
         ret
index f868d71b1c9f92e53e364c20f7d60c17ee2d6d79..e7deb7d9db439f4cec19988ac7aa3ee1399f580d 100644 (file)
@@ -1,4 +1,4 @@
-        .area   CODE
+        .area   _CODE
 
         ;; Special RLE decoder used for initing global data
 __initrleblock::
index 5ef13688034b938d9828736e12914cb41e746c1e..19e47457d03f9f1d4499065f89e909a351328fdc 100644 (file)
@@ -1,5 +1,5 @@
         ;; Originally from GBDK by Pascal Felber.
-        .area   CODE
+        .area   _CODE
 
 __divschar_rrx_s::
         ld      hl,#2+1
@@ -329,7 +329,7 @@ __moduint_rrx_hds::
         or      a               ; Clear carry, valid result
         ret
 
-        .area   BSS
+        .area   _BSS
 
 .srem:
         .ds 0x01                ; Sign of quotient
index 222817f48c9840a39933df1e3214668a34e89079..b5a196e38199146efe6300234b512c6d83e87517 100644 (file)
@@ -1,5 +1,5 @@
         ;; Stubs to match between function names
-        .area CODE
+        .area  _CODE
 
-___slong2fs_rrx_s::     
+___slong2fs_rrx_s::
         jp      ___slong2fs
index bb1a8320465f74f86b55447e5285bf6a66bb6d22..06b452feafc4d362253e1c6096268e664b3fa51a 100644 (file)
@@ -1,14 +1,14 @@
         ;; Stubs that hook the heap in
         .globl  __sdcc_heap_init
-        
-        .area   GSINIT
+
+        .area   _GSINIT
         call    __sdcc_heap_init
-        
-        .area   HEAP
+
+        .area   _HEAP
 __sdcc_heap_start::
         ;; For now just allocate 1k of heap.
         .ds     1023
-        
-        .area   HEAP_END
+
+        .area   _HEAP_END
 __sdcc_heap_end::
         .ds     1
index a58e9691d8c41ff020ed296ec1dec527af92913b..00e6ce9ee2e9747a980aab13522a1c7a3d74b102 100644 (file)
@@ -1,6 +1,6 @@
        ;; Originally from GBDK by Pascal Felber.
 
-       .area   CODE
+       .area   _CODE
 
 __mulschar_rrx_s::
         ld      hl,#2
index d10710aea994c0f8a649caddc902b92f6f013d4d..123f1f5e42208cf4485488ef2e6c7c9d5f7cc5b5 100644 (file)
@@ -1,19 +1,19 @@
-       .area CODE
-_putchar::       
-_putchar_rr_s:: 
+        .area   _CODE
+_putchar::
+_putchar_rr_s::
         ld      hl,#2
         add     hl,sp
-        
+
         ld      l,(hl)
         ld      a,#1
         rst     0x08
-        
+
         ret
-           
+
 _putchar_rr_dbs::
         ld      l,e
-       ld      a,#1
+        ld      a,#1
         rst     0x08
 
         ret
-                       
+
index ebb22252a9a6d5a4e84e85ee5fc65c2d5d36c7de..10211be3398c82b0af7489d2cad56ed8e43a74c2 100644 (file)
@@ -1,5 +1,5 @@
         ;; Stubs to match between function names
-        .area CODE
+        .area  _CODE
 
         .globl  __mullong
         .globl  __modslong