下面显示的代码是我读取保存在计算机中的文件的结构。如何让我的程序从硬盘读取它?下面显示的代码是我将在我的程序中使用的代码示例
code segment
main proc far
;Housekeeping section
assume cs:code,ds:data,ss:stacks
mov ax,data ;establish addressability
mov ds,ax ;to data segment
;Main Process Section
xor ax,ax
xor bx,bx
xor cx,cx
xor dx,dx
;open file
mov ah,3Dh
mov al,0
mov dx,offset file
int 21h
;read file
mov bx,ax
mov ah,3Fh
mov cx,40
mov dx,offset buffer
int 21h
jc error
;closing file
mov ah, 3Eh
int 21h
error:
mov ax, 4c00h
int 21h
main endp
code ends
data segment
file db "file.txt",0 <----------- what should i put here to make my codes read file from hard drive
buffer db 42 dup(?) ;data buffer
data ends
stacks segment para stack 'stack'
dw 32 dup(?)
stacks ends
end