[Nasm-bugs] [Bug 3392826] NASM Listing address defect if [org VALUE] not zero

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Tue Dec 6 09:45:11 PST 2022


https://bugzilla.nasm.us/show_bug.cgi?id=3392826

--- Comment #6 from Erdogan Tan <erdogantan at singlix.com> ---
vstart = 0 is needed on data section declarion line... (at the first sample, i
did not use it and data fields contained addresses after end of code section. 
after vstart=0 modification, data fileds contain correct addresses.

Also in the 2nd sample 'mov bx,7' is needed before int 10h loops..

As you see hexrays dissasembler show correct addresses and correct (word)
pointer contents as addresses of labels (in code segment also in data segment).

Please notice that this this multi section (raw) binary file  method which
microsoft used it as kernel (MSDOS.SYS and IO.SYS) file..

And MASM has many files, methods, macros to produce final kernel or dos bios
(io.sys) file.. (MSDOS5.TXT contains comments about them)..

NASM produces MSDOS kernel easily (more clever ans simpler than MASM) via
'incbin' feature and also 'section .code' 'section .data' methods ('vstart=0'
is needed if data section is after the code section in binary/sys file.)

You can add listing option to NASM (option: use addresses as memory layout or
as file offset).

Please add a feature to NASM to assemble source code wsith multiple section 
without using 'incbin'. (So with section declaration, or with repeteive ORG
declarition -NASM does not permit a second ORG in source code file-) 

After that, free-executable-format binary file production will be possible with
NASM (file will not have to ELF file or COFF file etc. And -for some
applications- relocation will not be required. OBJECT file linking will not be
required) 

Regards..

-- 
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.


More information about the Nasm-bugs mailing list