Caling custom interrupt without using "call interrupt"
Posted: Sat Jan 02, 2021 7:19 pm
I was fiddling around with webserv.bas from http://rubbermallet.org/software/webserv.html and am still doing so especially now that it breaks down after each HTTP request. I could partly blame some web browsers because they like to do prefetching.
So now I want to make the software even faster by replacing his routines to "call interrupt" with my own that will use "call absolute" so it works in all versions of DOS Qbasic. (1.1, 4.0, and 4.5).
The problem I have is the assembly language itself. To call an interrupt one would use:
where xx is a fixed interrupt number, but I want to pass a variable to it instead, so I can make a simpler assembler routine like this for Qbasic:
and then execute it in Qbasic like this:
But the problem is nasm (the assembler compiler I use) complains about the INT line because it doesn't want to accept a variable as an interrupt number.
How do I go about fixing this?
So now I want to make the software even faster by replacing his routines to "call interrupt" with my own that will use "call absolute" so it works in all versions of DOS Qbasic. (1.1, 4.0, and 4.5).
The problem I have is the assembly language itself. To call an interrupt one would use:
Code: Select all
Int xx
Code: Select all
PUSH BP
MOV BP, SP
MOV BX, [BP+06h]
Int BL
POP BP
RETF
Code: Select all
d$="(above assembly in binary code)"
dseg%=varseg(d$)
doff%=sadd(d$)
def seg=dseg%
call absolute(intno%,doff%)
def seg=0
How do I go about fixing this?