[求助]TSR驻留程序占用的内存大小是怎么算的?
TSR驻留程序占用的内存大小是怎么算的呢?小弟我是刚开始学写汇编的,做一个驻留内存程序时,看了一些程序资料,
但是有点不明白,
code segment
assume cs:code,ds:code
org 100h
start: jmp install
msg db 'Current time is: '
time0 db ?,?
db ':'
time1 db ?,?
db ':'
time2 db ?,?,0,0
oldint1c dd ?
newint1c: push ax
push bx
push cx
push dx
push si
push di
push es
mov ax,0200h
int 1ah
mov al,ch
lea si,time0
call bcd
mov al,cl
lea si,time1
call bcd
mov al,dh
lea si,time2
call bcd
mov ax,0b800h
mov es,ax
mov di,54*2d
lea si,msg
disp: mov al,cs:[si]
inc si
or al,al
jz disp0
cld
stosb
inc di
jmp disp
disp0: pop es
pop di
pop si
pop dx
pop cx
pop bx
pop ax
jmp cs:oldint1c
bcd: mov ah,al
shr ah,1
shr ah,1
shr ah,1
shr ah,1
and al,0fh
add ax,'00'
xchg ah,al
mov cs:[si],ax
ret
install: push cs
pop ds
mov ax,351ch
int 21h
mov word ptr oldint1c,bx
mov word ptr oldint1c+2,es
lea dx,newint1c
mov ax,251ch
int 21h
mov dx,offset install+120h ;这里驻留的大小为什么要加120H,而有的地方却是加+15呢?
mov cl,04h
shr dx,cl
mov ah,31h
int 21h
code ends
end start
请高手指点我啊!!~~!!