Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change the compiling ORG address?
#1
I wonder how to change the default address 32768. I've searched for "org" in the forum archive, but all references are about the assembler ORG. There's no mention in the wiki either.
I blindly tried this:
Code:
org 30000
And this:
Code:
#org 30000
But they are not accepted. Then I tried this:
Code:
asm
org 24000
end asm
print "hello"
stop
And got the following assembler:
Code:
    org 32768
__START_PROGRAM:
    di
    push ix
    push iy
    exx
    push hl
    exx
    ld hl, 0
    add hl, sp
    ld (__CALL_BACK__), hl
    ei
    call __PRINT_INIT
#line 3
        org 24000
#line 4
    ld hl, __LABEL0
    call PRINT_STR
    call PRINT_EOL
    ld a, 8
    call __STOP
    ld hl, 0
    ld b, h
    ld c, l
__END_PROGRAM:
    di
    ld hl, (__CALL_BACK__)
    ld sp, hl
    exx
    pop hl
    exx
    pop iy
    pop ix
    ei
    ret
I searched for "or" and "pragma" through the sources, but I found no clue.
Reply
#2
It's a command line option.
zxb --org=<org address

for example:
zxb --org=32768 -TaB myprogram.bas

Read here for command line parameters help: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Zxb#Command_Line_Options">http://www.boriel.com/wiki/en/index.php ... ne_Options</a><!-- m -->
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)