Home > other >  INT 0 x10 number 13 h interrupt problem
INT 0 x10 number 13 h interrupt problem

Time:05-16

Why is this show not to come out, consult!!!!!!


; Constants declared
% define BIOS_BOOT_SEG 0 x07c0
; The MBR is the location of the BIOS loads
% define REAL_BOOT_SEG 0 x9000
; The MBR operation address
% define STRACK_SEG 0 xf000
; The stack base address

Org BIOS_BOOT_SEG
; Statement loading position, offset

JMP short entry
The nop
; Three bytes of short back instructions

Entry:
; The MBR memory replication
Mov ax, BIOS_BOOT_SEG
Mov ds, ax
Sub si, si; Ds: x07c0 si=0:0 x0000 source address
Mov ax, REAL_BOOT_SEG
Mov es, ax
Sub di di; Es: x9000 di=0:0 x0000 target address
Mov cx, 512; 512 b
Rep movsb
JMP REAL_BOOT_SEG: (real_start - entry)

Real_start:
; Initialization register
Mov ax, cs
Mov ds, ax
Mov es, ax
Mov ss, ax
Mov dx, STRACK_SEG
Mov sp, dx; The stack pointer
; CLS
Mov ah, 0 x03; Function # 0 x03
Xor bh, bh
Int 0 x10; Read the cursor position
Mov ax, 0 x0600
Mov bx, 0 x0700
Cx, mov 0
Mov dx, 0 x184f; (80, 50)
Int 0 x10; Scroll
Mov ah, 0 x02; Function # 0 x02
Mov bh, 0
Mov dx, 0
Int 0 x10; Place the cursor position (0, 0)
; According to string
Mov ah, 0 x13
Mov al, 0 x01
Cx, mov 26
Mov bx, 0 x0007
Bp, mov bootmsg
Int 0 x10

Bootmsg:
Db 13,
Dd "based OS MBR booting... "

; There are partition table
Times 0 x1be - ($$$) db 0
; Fill the remaining space x1be 0

  • Related