Displaying the Vector Tabe in MASM

Hello,

I am currently working on displaying the first 40 vectors in the Vector table and am a bit clueless as to how to proceed.

Here is the code that I have so far. I am using MASM.

display MACRO object, seperator
INVOKE &HEX 16, OBJECT, OFFSET POINTER
@stdout POINTER
@stdout seperator
ENDM


.STACK 100H

.DATA

.CODE

start:
mov ax, @data
mov ds, ax

main:

xor si, si ; si is used to hold the Vector Number
mov ax, si
mov ah, 35h ; what is the reason behind this instruction?
; This is what was suggested.
int 21h

Comments

  • [b][red]This message was edited by Bitdog at 2004-3-3 8:58:46[/red][/b][hr]
    XOR SI,SI
    MOV DS,SI ; DS:DI points to the first 1024 bytes of conventional memory
    MOV CX,256 ; there are 256 Dword interrupt address
    ZZTOP:
    LODSW ; get OFFSET address of interrupt into AX
    MOV DX,AX ; save in DX
    LODSW ; get SEGMENT address of interrupt into AX
    CALL WRITHEX ;print the Dword address to: screen,file,memory,etc
    LOOP ZZTOP ;loop untill CX=0 = all INT vector seg:offset adr's




  • Thanks for your response! I haven't had the chance to test it yet, but will let you know how it goes.

    :
    : XOR SI,SI
    : MOV DS,SI ; DS:DI points to the first 1024 bytes of conventional memory
    : MOV CX,256 ; there are 256 Dword interrupt address
    : ZZTOP:
    : LODSW ; get OFFSET address of interrupt into AX
    : MOV DX,AX ; save in DX
    : LODSW ; get SEGMENT address of interrupt into AX
    : CALL WRITHEX ;print the Dword address to: screen,file,memory,etc
    : LOOP ZZTOP ;loop untill CX=0 = all INT vector seg:offset adr's
    :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories