Quick answersby lkt153 (no login)
> Your program works perfectly. I see the errors now... I don't know what was I thinking :(
Common errors, happen all the time to everyone ;)
> With all the bank switching, vesa might be slow for big graphical programs. I think I might go further with this svga and write something neat. And I still gotta learn the basics of asm and fully understand the VGA.
Yes, VESA is "slow" in real mode, specially combined with QB. Playing with mode 13h is easier for starting off. I was looking up some old XMS code today and came up with the idea of making a VESA library... but that's still just an idea, no availability to get it started any time soon
> If this stuff was written in pure assembly, could something like bank& \ 65536 be simplified to SHR bank, 16? I don't know about binary numbers.
Yes it could, I'm not sure if
shr mem32, immed8
exists, but if it does, it is possible. I know
shr reg32, immed8
dos exist, so you could definitely do something along the lines of:
mov eax, dword ptr ds:[longvar]
shr eax, 16
mov dword ptr ds:[longvar]
> And I was trying to put my own qbasic variable into dx for bank switching, but I couldn't. I tried stuff like:
> mov dx,  then replace the 0000 with varptr(var%), and stuff like
> x dw 0, mov dx,[x] and replace with varptr, but nothing worked except:
> mov dx,0000h then POKEing to the 0000 part with my own number. Any ideas on how this is done?
I think so, but I'll have to get back on this later. I don't want to post anything without testing.
> Also wondering about if it would be faster to implement some kind of system that will decide to either switch to next bank or not for optimization, or if switching banks every time would be faster.
Basically, the less interrupt calls, the faster your program is. You should indeed avoid all those bank switches.
> Anyways, thanks for all your help. I'll be reading the vesa documentation and the rest I think I can figure out my self.
It's my pleasure. If you have any more questions, go ahead and ask.
|Response Title||Author and Date|
|real mode||Ben on Feb 15|
|Von Neumann Architeture 101 ;)||lkt153 on Feb 15|
|* PRINT "Hello Neumann."||Jerry Seinfeld on Feb 15|