flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Madis731 18 Jul 2012, 12:53
org doesn't change the pointer. You need an absolute jump if you don't know where you are. If you know exactly where you are at the start of the execution then just put org there and do a relative jump.
|
|||
![]() |
|
shoorick 18 Jul 2012, 13:05
look there: http://board.flatassembler.net/topic.php?t=9181
|
|||
![]() |
|
delta67 18 Jul 2012, 17:48
Madis731 wrote: org doesn't change the pointer. You need an absolute jump if you don't know where you are. If you know exactly where you are at the start of the execution then just put org there and do a relative jump. Thanks for ur reply Madis731. I think an absolute jump to 0000h is the best solution !! |
|||
![]() |
|
delta67 18 Jul 2012, 17:49
shoorick wrote: look there: http://board.flatassembler.net/topic.php?t=9181 Thanks shoorick for the link. |
|||
![]() |
|
JohnFound 18 Jul 2012, 17:58
Absolute jump to 0000h may not do the job. The question is, how the EPROM (or FLASH) is mapped in the address space of the CPU?
Generally, asking such question, it is good to post the memory map of the computer. |
|||
![]() |
|
delta67 18 Jul 2012, 18:05
and i found this code:
;========================================= rom_size = 800h rom_start = 100000h - rom_size rom_empty = 0FFh ;========================================= use16 ;----------------------------------------- start: mov dx,378h mov al,0 next: out dx,al mov cx,07FFFh delay: loop delay not al jmp next ;----------------------------------------- times rom_size - 16 - $ db rom_empty ;----------------------------------------- boot: jmp (rom_start shr 4):start ;----------------------------------------- times rom_size - $ db rom_empty ;========================================= here: http://board.flatassembler.net/topic.php?t=8189 |
|||
![]() |
|
delta67 18 Jul 2012, 18:12
JohnFound wrote: Absolute jump to 0000h may not do the job. The question is, how the EPROM (or FLASH) is mapped in the address space of the CPU? The SBC uses only 16 bits for adressing thus the EPROM must be the last 8K bytes E000-FFFF. |
|||
![]() |
|
JohnFound 18 Jul 2012, 18:38
delta67 wrote: The SBC uses only 16 bits for adressing thus the EPROM must be the last 8K bytes E000-FFFF. That means that the EPROM is mapped several times (16) in the address space. Anyway, it is better to use the last image. It is from $FE000 to $FFFFF. The jump to the beginning of the EPROM should be "jmp $FE00:0000" and the code in the EPROM should be "org $0" P.S. The source you quoted is OK for your job, only you should set the rom_size to $2000. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
![]() |
|
delta67 18 Jul 2012, 19:33
JohnFound wrote:
Thanks JhonFound |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.