OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Mar 18, 2024 9:57 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Running BASIC code in 32 bit assembly
PostPosted: Sun May 15, 2016 1:44 am 
Offline
Member
Member

Joined: Fri Nov 16, 2012 4:16 am
Posts: 29
Location: Iran
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.


Top
 Profile  
 
 Post subject: Re: Running BASIC code in 32 bit assembly
PostPosted: Sun May 15, 2016 2:00 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
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.

_________________
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


Top
 Profile  
 
 Post subject: Re: Running BASIC code in 32 bit assembly
PostPosted: Sun May 15, 2016 12:11 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
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.

_________________
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.


Top
 Profile  
 
 Post subject: Re: Running BASIC code in 32 bit assembly
PostPosted: Sun May 15, 2016 12:17 pm 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
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.


Top
 Profile  
 
 Post subject: Re: Running BASIC code in 32 bit assembly
PostPosted: Sun May 15, 2016 1:06 pm 
Offline
Member
Member

Joined: Fri Jan 30, 2015 4:57 pm
Posts: 215
Location: Germany
It may also trigger the PXE ROM.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group