Page 1 of 1

Running BASIC code in 32 bit assembly

Posted: Sun May 15, 2016 1:44 am
by Haghiri75
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.

Re: Running BASIC code in 32 bit assembly

Posted: Sun May 15, 2016 2:00 am
by onlyonemac
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.

Re: Running BASIC code in 32 bit assembly

Posted: Sun May 15, 2016 12:11 pm
by Schol-R-LEA
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.

Re: Running BASIC code in 32 bit assembly

Posted: Sun May 15, 2016 12:17 pm
by BrightLight
On my two test PCs, INT 0x18 reboots the PC.

Re: Running BASIC code in 32 bit assembly

Posted: Sun May 15, 2016 1:06 pm
by Techel
It may also trigger the PXE ROM.