Keith,

You have no area HOME in the assembly file. It should be 
in the CODE memory.

Maarten

> Hello. I just recently upgraded to:
> 
> SDCC :
> cs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
> 2.7.0 #4818 (Aug 18 2007) (UNIX)
> 
> I have the following ASM code (which used to assemble,
> compile, and link fine):
> 
> .module serialA
> .globl _main
> .area DSEG (DATA)
> .area OSEG (OVR,DATA)
> .area SSEG (DATA)
> .area ISEG (DATA)
> .area BSEG (BIT)
> .area XSEG (XDATA)
> .area CSEG (CODE)
> .area GSINIT  (CODE)
> .area GSFINAL (CODE)
> .area GSINIT  (CODE)
> _main:
>    mov scon,#0x52
>    setb tr1
>    mov tmod,#0x21
>    mov th1,#0xFA
>    
>    mov r0,#0x07
>    mov r1,#0x0c
>    mov r2,#0x04
>    mov r3,#0x08
>    lcall and16
>    mov a,r0
>    lcall print_2dig_hex
>    mov a,r1
>    lcall print_2dig_hex
> 
>    jnb ti,.
>    ljmp $0
>    
> and16:                          ; 16bit AND takes 6
> cycles
>    xch a,r0
>    anl a,r2
>    xch a,r0
>    xch a,r1
>    anl a,r3
>    xch a,r1
>    ret
> 
> print_2dig_hex:
> 
> 
>    mov b,a
>    anl a,#0xf0
>    swap a
>    lcall write_ascii
>    mov a,b
>    anl a,#0x0f
>    lcall write_ascii
>    lcall print_space
>    ret
> 
> write_ascii:
>    mov  dptr,#hexadecimal
>    movc a,@a+dptr
>    jnb  ti,.
>    clr  ti
>    mov  sbuf,a
>    ret
> 
> carriage_return:
>    jnb ti,.
>    clr ti
>    mov sbuf,#0x0a
>    ret
> 
> print_space:
>    jnb ti,.
>    clr ti
>    mov sbuf,#0x20
>    ret
> 
> hexadecimal:
>    .db 48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70
> 
> I assemble the above ASM with:
> 
> /usr/local/src/sdcc/bin/asx8051 -o -l and16.asm
> 
> All appears to be OK at this point. It generates two
> files:
> 
> and16.rel
> and16.lst
> 
> I then compile with:
> 
> /usr/local/src/sdcc/bin/sdcc
> -I/usr/local/src/sdcc/device/include
> -L/usr/local/src/sdcc/device/lib
> -L/usr/local/src/sdcc/device/lib/mcs51 --code-loc
> 0x8000 and16.rel
> 
> and get the following output:
> 
> ASlink-Warning-No definition of area HOME
> 
> This is wrong. Here is the output of and16.lnk:
> 
> -myuxi
> -Y
> -b HOME = 0x8000
> -b ISEG = 0x0000
> -b BSEG = 0x0000
> -k /usr/local/src/sdcc/device/lib
> -k /usr/local/src/sdcc/device/lib/mcs51
> -k /usr/local/src/sdcc/bin/../share/sdcc/lib/small
> -k /usr/local/share/sdcc/lib/small
> -l mcs51
> -l libsdcc
> -l libint
> -l liblong
> -l libfloat
> and16.rel
> 
> -e
> 
> Here is the output of and16.map:
> 
> 
> Hexadecimal
> 
> Area                               Addr   Size  
> Decimal Bytes (Attributes)
> --------------------------------   ----   ----  
> ------- ----- ------------
> .  .ABS.                           0000   0000 =     
> 0. bytes (ABS,CON)
> 
>       Value  Global
>    --------  --------------------------------
>      FFFFFF00    s_BSEG
>      0000    l_BIT_BANK
>      0000    l_BSEG
>      0000    l_BSEG_BYTES
>      0000    l_CSEG
>      0000    l_DSEG
>      0000    l_GSFINAL
>      0000    l_ISEG
>      0000    l_OSEG
>      0000    l_REG_BANK_0
>      0000    l_REG_BANK_1
>      0000    l_REG_BANK_2
>      0000    l_REG_BANK_3
>      0000    l_SSEG
>      0000    l_XSEG
>      0000    l__CODE
>      0000    s_BSEG_BYTES
>      0000    s_CSEG
>      0000    s_DSEG
>      0000    s_GSINIT
>      0000    s_ISEG
>      0000    s_REG_BANK_0
>      0000    s_SSEG
>      0000    s_XSEG
>      0008    s_REG_BANK_1
>      0010    s_REG_BANK_2
>      0018    s_BIT_BANK
>      0018    s_OSEG
>      0018    s_REG_BANK_3
>      0020    s__CODE
>      006C    l_GSINIT
>      006C    s_GSFINAL
>      0100    l_IRAM
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hexadecimal
> 
> Area                               Addr   Size  
> Decimal Bytes (Attributes)
> --------------------------------   ----   ----  
> ------- ----- ------------
> GSINIT                             0000   006C =   
> 108. bytes (REL,CON,CODE)
> 
>       Value  Global
>    --------  --------------------------------
>   0C:0000    _main
> 
> ^LASxxxx Linker V01.75 + NoICE + SDCC Feb 1999,  page
> 1.
> 
> Files Linked      [ module(s) ]
> 
> and16.rel
> ^LASxxxx Linker V01.75 + NoICE + SDCC Feb 1999,  page
> 2.
> 
> User Base Address Definitions
> 
> HOME = 0x8000
> ISEG = 0x0000
> BSEG = 0x0000
> 
> ^L
> 
> It very clearly knows that HOME is 0x8000. Why does it
> pretend to not know this? Any help is appreciated. 2.7
> is turning out to be a big disappointment.
> 
> 
> 
> 
> 
> 
>       
> ____________________________________________________________________________________
> Park yourself in front of a world of choices in alternative vehicles. Visit 
> the Yahoo! Auto Green Center.
> http://autos.yahoo.com/green_center/ 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
> 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to