1. NoSolution Virtual Machine
- Posted by No Solution <solutionnone at HOTMAIL.COM> Aug 12, 2000
- 540 views
As the subject suggests.. i'm currently in development of a "virtual machine". Not like the JVM at all however, you write assembly code for the virtual machine and then assemble it and run it thru the virtual machine. The assemble code that can be assembled is pretty much like the Intel implementation of the language. Ie: ; print 'Hello World' to the screen msgstr db 'Hello World!',13,10,0 mov ah, 0 ; File and Device I/O function 0h mov al, 1 ; print to standard output mov eax, 0 ; print a null-terminated string instead of a ; fixed amount of bytes. mov ebx, near msgstr ; memory address of data to write int 1 ; call the interuppt prints 'Hello World' to the console on standard output. Knowing how difficult assembly is to grasp i will try my best to provide a documentation or at least a tutorial. My goals in completing the Virtual machine are as follows: 1) to finally complete one of the many failed applications i've tried to develop (gameboy emulator, interpretor, etc) 2) to see where i stand as far as skill goes 3) to provide a freeware developement enviroment, provided if i write a high level language compiler for the virtual machine. The first binary distribution will definitely be a DOS32 program, however i'm split between writing it in C++,Euphoria or Pascal. Any input would be greatly appriciated! Ian. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
2. Re: NoSolution Virtual Machine
- Posted by Beaumont Furniss <bfurniss at IHUG.CO.NZ> Aug 13, 2000
- 501 views
There's some advantage to being able to do this in most any language, however Euphoria isn't as resource hungry as some other languages. Of course C/C++ already implements some of these concepts , as most any language must. Finding the balance between a multi-platform language and concise low level code that has value for a variety of applications is always a challenge. The C/C++ standards take so long to eventuate , while in the meantime, the capabilities of a particular minicomputer aren't being utilized effectively. Something like a standard C/C++ that lets you construct further assembly level functions , that are called like most any other is one possibility. This could be useful for Euphoria to , one simple example augmenting sequence functions so that extended arithmetic etc , might be performed. A sequence ( of arbitrary length ) , that might be divided by 2 [ or multiplied by 2 ], with inter-bit/byte/word/sequence carry being a particular example. On 2000-08-12 EUPHORIA at LISTSERV.MUOHIO.EDU said: EU>As the subject suggests.. i'm currently in development of a "virtual EU>machine". EU>Not like the JVM at all however, you write assembly code for the EU>virtual machine and then assemble it and run it thru the virtual EU>machine. EU>The assemble code that can be assembled is pretty much like the EU>Intel implementation of the language. EU>Ie: EU>; print 'Hello World' to the screen EU>msgstr db 'Hello World!',13,10,0 EU>mov ah, 0 ; File and Device I/O function 0h EU>mov al, 1 ; print to standard output EU>mov eax, 0 ; print a null-terminated string instead of a EU>; fixed amount of bytes. EU>mov ebx, near msgstr ; memory address of data to write EU>int 1 ; call the interuppt EU>prints 'Hello World' to the console on standard output. EU>Knowing how difficult assembly is to grasp i will try my best to EU>provide a documentation or at least a tutorial. EU>My goals in completing the Virtual machine are as follows: EU>1) to finally complete one of the many failed applications i've EU>tried to develop (gameboy emulator, interpretor, etc) EU>2) to see where i stand as far as skill goes EU>3) to provide a freeware developement enviroment, provided if i EU>write a high level language compiler for the virtual machine. EU>The first binary distribution will definitely be a DOS32 program, EU>however i'm split between writing it in C++,Euphoria or Pascal. EU>Any input would be greatly appriciated! EU>Ian. EU>____________________________________________________________________ EU>____ Get Your Private, Free E-mail from MSN Hotmail at http://www. EU>hotmail.com Net-Tamer V 1.11 - Test Drive
3. Re: NoSolution Virtual Machine
- Posted by "Darth Maul, aka Matt" <Uglyfish87 at HOTMAIL.COM> Aug 13, 2000
- 498 views
I'm curious...will this run just one program or several threads? Note: There's a BIOS way to print strings so that it works before DOS has booted or under a non-DOS OS, though its really complicated(you have to read each char and output it with int 10h). I also developed a library I called ASA(Advanced Screen Access) for Assembly that can print in colors etc, etc, etc. If you want it, pass me your snail-mail address and I'll send you a floppy with ASA and some stuff on it(virus free -- I promise!)
4. Re: NoSolution Virtual Machine
- Posted by No Solution <solutionnone at HOTMAIL.COM> Aug 13, 2000
- 516 views
>I'm curious...will this run just one program or several threads? I have no plans in the future for multi threading, but that is a good idea and demands attention, Maybe a second version as a trial but no promises :) I understand that there are faster ways to print characters to the console screen. If your note has something to do with the sample code i provided, then i guess i should've specified that my virtual machine has it's own set of interuppts, int 0 or whatever would be used for File and Device I/O. Thanks a lot for the idea. Ian. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
5. Re: NoSolution Virtual Machine
- Posted by "Darth Maul, aka Matt" <Uglyfish87 at HOTMAIL.COM> Aug 22, 2000
- 518 views
On Sun, 13 Aug 2000 19:55:35 PDT, No Solution <solutionnone at HOTMAIL.COM> wrote: >If your note has something to do with the sample code i provided, >then i guess i should've specified that my virtual machine has it's own set >of interuppts, int 0 or whatever would be used for File and Device I/O. > >Thanks a lot for the idea. > >Ian. Ummm...I'm not sure that would be safe. Interrupts below 20h are reserved for BIOS, and even then, several interrupts are used by DOS(20, 21, 33, etc). You might try picking random interrupt numbers above 21h using this code: Mov AX,35(interrupt)h Int 21h If ES(the interrupt's code segment) and BX(the interrupt's origin) are 0, you've found a free interrupt.
6. Re: NoSolution Virtual Machine
- Posted by No Solution <solutionnone at HOTMAIL.COM> Aug 22, 2000
- 516 views
>Ummm...I'm not sure that would be safe. Interrupts below 20h are >reserved >for BIOS ... Ok matt, you've missed something about the words "Virtual Machine" i'm not actually re-writing ANY interrupts at all, instructions like mov ax,bx and int 0 would be handled by the virtual machine, there is no native machine code involved whatsoever. and the way the Virtual machine is progressing right now i've removed all the registers so that all "symbols" will be memory locations. this makes writing routines for all the instructions a hell of a lot easier for me and more efficient for the user. Ian. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
7. Re: NoSolution Virtual Machine
- Posted by Kat <gertie at PELL.NET> Aug 22, 2000
- 503 views
On 22 Aug 2000, at 9:34, Darth Maul, aka Matt wrote: > On Sun, 13 Aug 2000 19:55:35 PDT, No Solution <solutionnone at HOTMAIL.COM> > wrote: > > >If your note has something to do with the sample code i provided, > >then i guess i should've specified that my virtual machine has it's own set > >of interuppts, int 0 or whatever would be used for File and Device I/O. > > > >Thanks a lot for the idea. > > > >Ian. > Ummm...I'm not sure that would be safe. Interrupts below 20h are reserved > for BIOS, and even then, several interrupts are used by DOS(20, 21, 33, > etc). You might try picking random interrupt numbers above 21h using this > code: > > Mov AX,35(interrupt)h > Int 21h > > If ES(the interrupt's code segment) and BX(the interrupt's origin) are 0, > you've found a free interrupt. ** i have not been following this thread, but this one caught my eye... Or you could look in the books, MS published a book for each DOS they made, listing all the ints and registers used and what they did. I have the books for versions 4, 5, and 6. Did you know you can link in a device driver as a redirect, so it won't be in the device driver chain, and when you are done with it, you can delete it? That was one of the most underused capabilities in DOS, imho, it's the precursor to the DLL, while it is linked, any app can use it. Once linked with a run command, you can even change it's abilities with software, unlike the device driver chain. Kat
8. Re: NoSolution Virtual Machine
- Posted by "Darth Maul, aka Matt" <Uglyfish87 at HOTMAIL.COM> Aug 26, 2000
- 580 views
On Tue, 22 Aug 2000 10:27:54 PDT, No Solution <solutionnone at HOTMAIL.COM> wrote: >>Ummm...I'm not sure that would be safe. Interrupts below 20h are >reserved >>for BIOS ... > >Ok matt, you've missed something about the words "Virtual Machine" i'm not >actually re-writing ANY interrupts at all, instructions like mov ax,bx and >int 0 would be handled by the virtual machine, there is no native machine >code involved whatsoever. and the way the Virtual machine is progressing >right now i've removed all the registers so that all "symbols" will be >memory locations. this makes writing routines for all the instructions a >hell of a lot easier for me and more efficient for the user. > >Ian. >________________________________________________________________________ >Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com ah, stupid me