Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wondering how feasible my idea is...
#1
I keep getting this idea popping into my head about writing a gui in QuickBASIC. And lately it has been happening more and more often. Among the ideas for it is a way of handling device drivers. I'll explain it a bit.

My idea is not to store the actual device interaction in the source code. Instead I would be storing it in external files (in either a scripting language or as bytecode). Below is an example of what a graphics driver for mode 13h would look like:

Code:
[driver]
type=graphics
resolution=320x200x8

[entermode]
mov ax, 13h
int 10h

[putpixel]
//  Whatever assembly is used to put the pixel

It would work by converting it into whatever Call Absolute can handle and by piping it into it.

My question is... how feasible is this idea?
Reply
#2
heh, its an idea already in use. Windows and linux have these, e.g. windows uses dll's. Its a good idea.
Reply
#3
The only problem I can see is that it would be slow, you would have to load the routine for plotting a pixel into memory or it would be like... slow....


[Somewhat ontopic/offtopic]
If you run 2 or more ASM programs at the same time (multitasked, ie: 1 byte there, 1 byte there) wouldn't they ruin the registers for each other?
[/Somewhat ontopic/offtopic]
Reply
#4
Quote:If you run 2 or more ASM programs at the same time (multitasked, ie: 1 byte there, 1 byte there) wouldn't they ruin the registers for each other?

No, because multiprocessing operating systems do what is called a context switch when changing execution from one process to another. The registers of the process that is being scheduled out are stored somewhere in memory, and can be reloaded the next time the process is scheduled. Its not just assembly programs that this happens for, most programs (if not all useful ones) use registers once compiled.
esus saves.... Passes to Moses, shoots, he scores!
Reply
#5
Its feasible and I think i've seen a program which does something similar. It runs two .exes(or what i dont remember) simultaneously, through QB.

But it utilized the same principle.
Reply
#6
Very very feasible. :*)

In fact. I have done it already 1 1/2 years ago. Its called AF.LIB

The Load from file version that is.

It was used in "Lone wolf" L_O_J's entry to Vplanets minigame contest. :*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#7
rel: Where can you/I find it?
Reply
#8
Yeah, I remember that program that ran two .com files at once. It was something CGI Generic Joe wrote I think (or was it Eric Carr? I dont know).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)