assembly language debug command jmp instruction problem

-1

i am running assembly language program, i have some trouble when i try to debug it using debug command available at kit.

memory address 0748:0100: JMP init  ; Jump over the 
                      ;bios at init at 
                      ;memory address "**7C3E**"
NOP                   ; Do nothing. Address not used.

;      After setting up various registers, this code 
;copies data from the
; Diskette Drive Parameters table which a far pointer 
;(Segment:Offset) in
; the Interrupt Vector Table (IVT) at 0:0078 and 
;following points to; for
; later use.  This data overwrites the first 11 bytes 
;(7C3E thru 7C48) of
; its own code following the BPB area:
 OEM_ID                db "MSDOS5.0"
 BytesPerSector        dw 0x0200
 SectorsPerCluster     db 0x01
 ReservedSectors       dw 0x0001
 TotalFATs             db 0x02
 MaxRootEntries        dw 0x00E0
 TotalSectorsSmall     dw 0x0960
 MediaDescriptor       db 0xF9
 SectorsPerFAT         dw 0x0007
 SectorsPerTrack       dw 0x000F
 NumHeads              dw 0x0002
 HiddenSectors         dd 0x00000000
 TotalSectorsLarge     dd 0x00000000
DriveNumber           db 0x00
Flags                 db 0x00
Signature             db 0x29
VolumeID              dd 0x18FC2152
VolumeLabel           db "NO NAME    "
SystemID              db "FAT12   "

memory address 7C3E: init:

CLI               ; Disable maskable Interrupts
XOR AX,AX        ; Zero-out the Accumulator and set
MOV SS,AX        ;  Stack Segment register to ZERO.
MOV SP,0x7C00        ; Stack Pointer top now 0000:7C00
PUSH SS           ;|
POP ES           ;|Makes sure Extra Segment = ZERO.
MOV BX,0x0078      ; 0078h ---> BX
LDS SI,[SS:BX]   ; SS is still zero...

my problem is that when i run below command in cmd

"debug ourboot.asm"
"-d"

then at first command my program code goes to memory address "0748:0100". as obvious. but when i run the second command "-d".

then my program code goes to next instruction at memory address following memory address "0748:0100" which is "0748:0180". what i was expecting that following address should be "7C3E". because my code jumps from memory address "0748:0100" to "0748:7C3E" by very first jump instruction. but it is not happening. how can i get this. please guide and help.

assembly
nasm
x86-16
bootloader
asked on Stack Overflow Sep 1, 2020 by iammca • edited Sep 1, 2020 by 1201ProgramAlarm

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0