flat assembler
Message board for the users of flat assembler.

flat assembler > OS Construction > IDE bootloader (no BIOS)

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
Shokaku



Joined: 03 Oct 2003
Posts: 1
Do you know this:


http://www.dragonbasic.com/phpBB2/topic.php?t=381

it is a kind of Basic to program the GameBoyAdvance, but it is based on a language TIN that is based on Forth.

Strange: i liked this tiny Basic and at the same time i was very interested in all the Forth ideas and now i know that they are completely related !
Post 09 Oct 2003, 09:07
View user's profile Send private message Reply with quote
XtcC



Joined: 04 Nov 2003
Posts: 2
sorry about this silly question, but here it come:
with this code, is it possible to boot an PC with my Usb memory stick?
(note: i dont know what "FDD stick" is. :-p)
if yes, then it´s cool. Laughing

_________________
/be there you want to be.
Post 04 Nov 2003, 07:16
View user's profile Send private message Reply with quote
AdamMarquis



Joined: 20 Jun 2003
Posts: 22
Location: La Sarre, Quebec, Canada
Shokaku:
There's a page titled mf/tin , search for that on google,
tells a lot of good ideas.

XtcC:
Your memory stick is either identifying itself as a harddrive or a floppy.
Mine thinks he"s a Floppy Disk Drive (FDD), but it got 32 megs...
yeah it should be possible.

I also have a question:
Is 32bit code in real mode
(unreal mode) faster?

Interrupts will also be easier
to setup, play with and faster
to execute, is there any other
advantages?

Adam
Post 12 Nov 2003, 00:09
View user's profile Send private message Reply with quote
Pharabee



Joined: 18 Nov 2003
Posts: 16
Location: Sukabumi,Indonesia
Cool , I've try it on 32-Bit mode. But it only give me value -1 on 1f0-1f1 port.

_________________
How to Get work Fast:
10% Skill, 90% honesty.
Post 21 Nov 2003, 13:48
View user's profile Send private message Visit poster's website Reply with quote
Ralph



Joined: 04 Oct 2003
Posts: 86
Hey Adman,
Regarding your question about 32-bit code in unreal-mode. The only difference between unreal-mode and real-mode is that the segment limits are set to 4gb. Aside from that it should be identical to real mode and thus code should execute at the same speed. However, if you use 32-bit code in real-mode you would need address/register size prefixes before your instructions. This adds 1-2 bytes per instruction that makes use of a 32-bit register and/or address which can only have a negative impact on speed.

Additionally, how would I modify your code to boot from a flash device? I have a 64mb USB mp3 player that I could hook up. Do you know if it might even be possible to boot directly from the usb device? As far as I know, no BIOS currently supports that.
Post 24 Nov 2003, 21:23
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7207
Location: Kraków, Poland
Ralph, you are talking about the flat real mode - some people do call it unreal mode also, but I prefer to use the "unreal mode" name for the real mode that executes native 32-bit code (without prefixes). Current DOS version of fasm uses it, so you can look there to see how does it look like.

AdamMarquis, your question was answered here: http://board.flatassembler.net/topic.php?t=135#1442
Post 24 Nov 2003, 23:12
View user's profile Send private message Visit poster's website Reply with quote
Ralph



Joined: 04 Oct 2003
Posts: 86
Hm, I always wondered if it was possible to do that. I didn't think the 32-bit flag would carry over into real-mode. That's a really cool, although useless, trick. :)
Post 25 Nov 2003, 19:35
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7207
Location: Kraków, Poland
Why useless? On 386 processor unREAL version of fasm is actually the fastest one. And on modern processor it has the same speed as 32-bit protected mode version.
The only problem when executing 32-bit code in real mode are the interrupts - in fasm I deal with them by using the additional IDT solely for 32-bit mode, which redirects all interrupts to 16-bit mode handlers (with quick mode switches). It was the most suprising for me, that even IDT base address for real mode can be moved! This allows to run 32-bit code with interrupts enabled, though all the 32-bit code must still fit in the first 64kB of segment, because high word of EIP is lost when interrupt is executed in real mode (even with 32-bit code enabled), to execute code from higher offsets you have to disable the interrupts first.
Post 25 Nov 2003, 22:02
View user's profile Send private message Visit poster's website Reply with quote
Ralph



Joined: 04 Oct 2003
Posts: 86
Useless because in my opinion 16-bit code died years ago. There is really no excuse for programming anything worthwhile in it anymore, especially not with everyone slowly migrading to 64-bit. Noone uses 16-bit applications, and if they do there is bound to be a 32-bit version available. It might be easier to learn, but that's not really applicable in this case. I can see how the 386 version can run the fastest, but realisticly, who still uses (and I mean uses, not has) a 386? And for anyone planning on responding with "me", go to your local school or computer store and check around the back by the dumpsters. There's bound to be some better hardware there. :)

As for the IDT base thing, I would've never suspected that. That's a neat trick I'm sure someone other than myself can put to good use. :)
Post 26 Nov 2003, 05:15
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7207
Location: Kraków, Poland
This is 32-bit code, so the death of 16-bit one doesn't apply. Wink
And generally unREAL mode gives you many of the advantages of protected mode (like 32-bit code and access to 4GB addressing space), while keeping it much simpler when you need to program some low-level OS-like features. Abillity to call both 16-bit and 32-bit BIOS functions in very simple way and very quickly, no need for the selectors, full control over hardware - that makes the unREAL an ideal solution when you want to programm something really low-level.
Post 26 Nov 2003, 07:22
View user's profile Send private message Visit poster's website Reply with quote
Ralph



Joined: 04 Oct 2003
Posts: 86
Well, I guess you got a point there. However, can't you achieve the same end result with protected mode if you just ignore all the additional bloat intel decided would be cool to throw in? Only use a single segment, run everything at ring0, etc.
You wouldn't get BIOS access, but real men don't need that anyway. :)
Post 27 Nov 2003, 01:03
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7207
Location: Kraków, Poland
Yes, you're right, but you would have to write that everything yourself aswell.
Post 27 Nov 2003, 09:59
View user's profile Send private message Visit poster's website Reply with quote
Ralph



Joined: 04 Oct 2003
Posts: 86
Has anyone tried changing the boot device with that code yet? From what I can tell, port 1F6h will only let you choose between primary and secondary IDE device. I want to boot from floppy among other things.
Post 02 Jan 2004, 00:46
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.