単純な TSR プログラムを作成していますが、エラーが発生します。
で実行しようとしましたInt 90H
が、何らかの理由でクラッシュしました。
私はTSRを初めて使用するので、問題は単純かもしれません。
TSR:
; Copy non-small letters
.model tiny
.code
ORG 100H
start:
push bp
push si
push cx
push bx
; save registers
mov bp, sp
sub sp, cx
sub sp, 1 ; for $
mov di, bp
mov si, bx
copy:
cmp [si], 'a'
jl bad
; not small letter
cmp [si], 'z'
jg bad
; not small leter
; good
mov ax, [si]
mov [bp], ax
dec bp
bad:
inc si
loop copy
mov [bp-1],'$'
mov ah, 09
mov dx, di
int 21H
install:
mov al, 90H
mov ah, 25H
mov dx, offset start
int 21H
finish:
pop bx
pop cx
pop si
pop bp
; ^ restore registers
mov ah, 31
int 21H
iret
; end
end start
メインプログラム:
.model small
.stack 64
.data
string db "Hey There"
.code
start:
lea bx, string
mov cx, 09
int 90H
; end
mov ah, 4ch
int 21H
end start
私のプログラムがクラッシュする理由を知っていますか?