[z88dk-dev] z80asm_missing_an_IFDEF

Bridge to the z88dk-developers mailing list
Post Reply
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

[z88dk-dev] z80asm_missing_an_IFDEF

Post by alvin »

ORG -1 implemented and tested. It forces the generation of a new binary file for that
section.


Did you get a complete commit to work? “org -1?? doesn’t seem to have an effect for me, including no error generated.


What I am using for memory model is below.


I do get error text if I put error text where the “org -1?? is under bss so I know the “org -1?? is being

met.



====




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; memory model ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



org __crt_org_code


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


SECTION CODE


nop


section code_crt_start
section code_crt_init
section code_crt_main
section code_crt_exit
section code_crt_return


include "../../clib_code.inc"
include "../../clib_rodata.inc"


section code_compiler
section rodata_compiler


section code_user
section rodata_user


SECTION CODE_END


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


IF __crt_org_data


org __crt_org_data


ELSE


IF __crt_model

"DATA section address must be specified for rom models"

ENDIF


ENDIF


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


SECTION DATA


defb 0


include "../../clib_smc.inc"
section smc_compiler
section smc_user


include "../../clib_data.inc"
section data_compiler
section data_user


SECTION DATA_END


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


IF __crt_org_bss


org __crt_org_bss


ELSE


IF __crt_model


org -1


ENDIF


ENDIF


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


SECTION BSS


defb 0


include "../../clib_bss.inc"
section bss_compiler
section bss_user


SECTION BSS_END



;; end memory model ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Post Reply