Skip to main content
added 523 characters in body
Source Link
black4joss
  • 363
  • 1
  • 7

UPD.

I took this code:

seg000:0038                 mov     word ptr ds:loc_79+1, ax
seg000:003B                 mov     word ptr ds:loc_77+1, 7C21h ; DATA XREF: print_msg+Br

In hex view:

A3 7A 00 C7 06 78 00 21 7C

Using C++ write binary, then disassemble it, result is:

seg000:0000                 mov     ds:7Ah, ax
seg000:0003                 mov     word ptr ds:78h, 7C21h

And offset in memory 0h:78h seems is disk parameter table, and what is ds:7Ah I dont know.

UPD.

I took this code:

seg000:0038                 mov     word ptr ds:loc_79+1, ax
seg000:003B                 mov     word ptr ds:loc_77+1, 7C21h ; DATA XREF: print_msg+Br

In hex view:

A3 7A 00 C7 06 78 00 21 7C

Using C++ write binary, then disassemble it, result is:

seg000:0000                 mov     ds:7Ah, ax
seg000:0003                 mov     word ptr ds:78h, 7C21h

And offset in memory 0h:78h seems is disk parameter table, and what is ds:7Ah I dont know.

Source Link
black4joss
  • 363
  • 1
  • 7

Disassemble MS-DOS 2.0 boot sector

I try disassemble boot sector for floppy 360K MS-DOS 2.0. There is code:

;bios parameter block here

seg000:001F                 db    0
seg000:0020                 db  0Ah
seg000:0021                 db 0DFh
seg000:0022                 db    2
seg000:0023                 db  25h ; %
seg000:0024                 db    2
seg000:0025                 db    9
seg000:0026                 db  2Ah ; *
seg000:0027                 db 0FFh
seg000:0028                 db  50h ; P
seg000:0029                 db 0F6h ; ¡
seg000:002A                 db    0
seg000:002B                 db    2
seg000:002C ; ---------------------------------------------------------------------------
seg000:002C
seg000:002C reboot:                                 ; CODE XREF: seg000:loc_77j
seg000:002C                 int     19h             ; DISK BOOT
seg000:002C                                         ; causes reboot of disk system
seg000:002E
seg000:002E msdos_main:                             ; CODE XREF: seg000:0000j
seg000:002E                 cli
seg000:002F                 xor     ax, ax
seg000:0031                 mov     ss, ax
seg000:0033                 mov     sp, 7C00h
seg000:0036                 mov     ds, ax
seg000:0038                 mov     word ptr ds:loc_79+1, ax
seg000:003B                 mov     word ptr ds:loc_77+1, 7C21h ; DATA XREF: print_msg+Br
seg000:0041                 sti
seg000:0042                 int     13h


seg000:0074                 call    read_root_dir_into_memory
seg000:0077
seg000:0077 loc_77:                                 ; DATA XREF: seg000:003Bw
seg000:0077                 jb      short reboot
seg000:0079
seg000:0079 loc_79:                                 ; DATA XREF: seg000:0038w
seg000:0079                 mov     ax, ds:7C13h    ; StartUserData
seg000:007C                 mov     ds:7D7Eh, ax    ; StartUserDataVal
seg000:007F                 mov     ax, 70h ; 'p'   ; location 0h:0700h is for read IBMBIO.COM for MS-DOS
seg000:0082                 mov     es, ax

I dont understand this lines:

seg000:0038                 mov     word ptr ds:loc_79+1, ax
seg000:003B                 mov     word ptr ds:loc_77+1, 7C21h ; DATA XREF: print_msg+Br

What is this? This lines break code seems.