[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:20:28 PST 2022


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

--- Comment #4 from Erdogan Tan <erdogantan at singlix.com> ---
; NASM test (deneme) file
; MSDOS.SYS principle simulation (for testing NASM's response)

; Erdogan Tan - 6/12/2022

; A sample MSDOS '.COM' file
; nasm deneme.asm -l deneme.txt -o deneme.com -Z error.txt
; (DATA section is used for '.SYS' file -like MSDOS kernel- simulation) 

; [BITS 16]     ; (x86 real mode)

; DOS CODE segment simulation

section .text   ; code segment (DOSCODE)

        [org 100h] ; 3DD0h for MSDOS 5.0 kernel (DOSCODE)
                   ; (BIOSCODE+BIOSDATA+DOSDATA size)
start:
        jmp     short kod3
kod1ptr:
        dw      kod1
kod0:
        int     20h
kod1:
        mov     si, [deneme3]
        mov     ah, 0Eh
        sub     bx,bx
        ; CRLF
        mov     al, 0Dh
        int     10h
        mov     al, 0Ah
        int     10h
kod2:
        ; print 'DENEME.' on screen
        lodsb
        int     10h
        cmp     al, '.'
        jne     short kod2
        ;times  130 db 90h
        ;jmp    kod0
        ; CRLF & exit
        mov     al, 0Dh
        int     10h
        mov     al, 0Ah
        int     10h
        jmp     kod0
kod3:
        jmp     word [kod1ptr]

        nop

align 16

; DOS data segment simulation

section .data vstart=0  ; data segment (DOSDATA)

deneme0: dw deneme1
deneme1: dw deneme2
deneme2:
        db 'deneme...'
here:
        burasi equ $
deneme3:
        dw burasi ; dw here
        db 0Dh, 0Ah, 0

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


More information about the Nasm-bugs mailing list