Greetings. I found interrupt "18h" in 16 bit BIOS interrupts, and it can execute BASIC in ROM. I wanna know is there any possibility of Running BASIC in 32 bit assembly?
P.S : I don't use any syscalls.
Running BASIC code in 32 bit assembly
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: Running BASIC code in 32 bit assembly
You have to have a BASIC ROM in your computer to use this. You probably don't have that.
Traditionally, int 18h was called when the system failed to boot from a disk, and invoked the BASIC ROM. These days, int 18h is still called when disk boot fails but it just displays a message such as "please insert system disk and press enter" rather than invoking a BASIC ROM.
Traditionally, int 18h was called when the system failed to boot from a disk, and invoked the BASIC ROM. These days, int 18h is still called when disk boot fails but it just displays a message such as "please insert system disk and press enter" rather than invoking a BASIC ROM.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Running BASIC code in 32 bit assembly
And by 'traditionally', onlyonemac means 'on the IBM PC and PC/XT, and hardly anywhere else'. The ROM BASIC was one thing that hardly any early clone manufacturers bother to implement, as the whole idea of having a ROM interpreter was sort of a late 1970s thing that was already becoming a thing of the past when the IBM Model 5150 Personal Computer came out in late 1981. It was considered too much work and too much risk of infringement to bother with.
In any case, it was hardly worth having by then - it was mainly used in systems using cheap cassette drive storage, which didn't need a full operating system to interface with, but those were rapidly falling out of favor as 5.25" mini-floppy disk drives dropped in price, pushing out both cassettes and 8" floppies. While the 5150 had a large DIN connector for a cassette drive (similar to the original keyboard DIN, and often mistaken for it), I would be surprised if they sold even one cassette drive system, and AFAIK all original PCs sold had at least one full-height 5.25" Double-Sided, Double-Density 360KB floppy drive.
When you consider how impressive that amount of storage was at the time, it isn't surprising that the cassettes, which were much slower and held between 64K and 128K, fell out of favor rapidly. The interrupts for both ROM BASIC and cassette drive interfacing were rapidly re-purposed starting with the IBM PC/XT, and no one has used either of them for their original purpose since.
In any case, it was hardly worth having by then - it was mainly used in systems using cheap cassette drive storage, which didn't need a full operating system to interface with, but those were rapidly falling out of favor as 5.25" mini-floppy disk drives dropped in price, pushing out both cassettes and 8" floppies. While the 5150 had a large DIN connector for a cassette drive (similar to the original keyboard DIN, and often mistaken for it), I would be surprised if they sold even one cassette drive system, and AFAIK all original PCs sold had at least one full-height 5.25" Double-Sided, Double-Density 360KB floppy drive.
When you consider how impressive that amount of storage was at the time, it isn't surprising that the cassettes, which were much slower and held between 64K and 128K, fell out of favor rapidly. The interrupts for both ROM BASIC and cassette drive interfacing were rapidly re-purposed starting with the IBM PC/XT, and no one has used either of them for their original purpose since.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Running BASIC code in 32 bit assembly
On my two test PCs, INT 0x18 reboots the PC.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: Running BASIC code in 32 bit assembly
It may also trigger the PXE ROM.