flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
By using org 7c50h you are telling the assembler that the code will be loaded at that address in memory. So later when you use align 800h you are telling the assembler to align the next byte at that next 2kB boundary. The next 2kB boundary is 0x8000h.
Code: org 0x7c50 db 1 align 0x800 ;0x3af bytes of padding db 2 |
|||
![]() |
|
Tomasz Grysztar
fasm's ALIGN is by definition memory-wise, thus it is affected by ORG and family. Perhaps it's not stated clearly enough in the manual, I may correct it.
|
|||
![]() |
|
shutdownall
Well sometime it helps to ask a question in the forum to find the answer myself. So in the night after writing my post it got clear to me. Building a general question helps finding the answer sometimes.
Sure ORG has to affect align, what else ??? I thought of a possible error but then I found that i missed exact 50h bytes. This corresponds to my offset ORG xxxx+50h. I wrote first a bootloader and because it's getting to big for putting on a hard disk including partition table I wrote a preloader to load the rest. And loaded it +50h bytes and then made a relocation of code. That caused the problem because the second code has ORG +50h but was loaded in a new sector at address "0". So I missed exact 50h bytes. I correct this with a manual fill "db 50h dup 0". Sorry for disturbing community with this bad question. ![]() |
|||
![]() |
|
zhak
there are no stupid (bad) questions - there are lost (unclear) points.
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.