flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Secret instructions...

Author
Thread Post new topic Reply to topic
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 22 Feb 2005, 22:53
Here are a couple (and there are others at Robert Collins excellent asm site, which I assume you all know how to get to) of "secret" or "not-very-well-documented-by-intel" instructions that should be included in FASM. I realize they may not be very important or useful but I think they should be included for the purpose of completeness, as well as compatibility with any code that happens to use them. Here are the some of them:

ICEBP or INT01 - this is opcode 0F1h. It is basically a 1-byte opcode for "INT 01h". It simply generates interrupt 1.

LOADALL - this is opcode 0F05h (286) or 0F07h (386). I don't know if it was included in Intel processors past 386 or 486, but it should be included for completeness, if FASM is truly a Intel x86 assembler (I use x86 to include Pentium and Celeron also, and any other intel 32-bit or 16-bit processors after the 8086, but I especially mean 80x86, 486 or older (or more obsolete Laughing ))

There are a few others, but I believe FASM supports most of them. I tried using these and they didn't work. I also made a ".inc" file with macros for these and every time I tried to compile something that used the ".INC" file FASM crashed, or displayed whole bunch of incomprehensible characters on the screen! Here is my code, please tell me what went wrong, or fix FASM!

;LOADALL - used for dynamic CPU state changes.
loadall macro
{
db 0Fh, 05h
}
;ICE BreakPoint (INT 01h)
icebp macro
{
db 0F1h
}
;INT 01h
int01 macro
{
db 0F1h
}

Thanks, keep it up! FASM rules!!!

_________________
FASM Rules!
OS Dev is fun!
Pepsi tastes nasty!
Some ants toot!
It's over!
Post 22 Feb 2005, 22:53
View user's profile Send private message AIM Address Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 22 Feb 2005, 23:15
fasm supports LOADALL286 and LOADALL386 mnemonics, the latest development releases have also INT1 mnemonic for ICEBP implemented.
Post 22 Feb 2005, 23:15
View user's profile Send private message Visit poster's website Reply with quote
THEWizardGenius



Joined: 14 Jan 2005
Posts: 382
Location: California, USA
THEWizardGenius 22 Feb 2005, 23:22
Good! Then I guess FASM is pretty much perfect... I don't really care about 64-bit programming anyways (well, mainly because I don't have any 64-bit computers...)

_________________
FASM Rules!
OS Dev is fun!
Pepsi tastes nasty!
Some ants toot!
It's over!
Post 22 Feb 2005, 23:22
View user's profile Send private message AIM Address Reply with quote
gumletis



Joined: 18 Dec 2004
Posts: 128
gumletis 28 Feb 2005, 17:18
lool a asm compiler change the asm code to hexe decimal for later use, the asm compiler wont do anything its not made to, fx "mov al,1" easy example, its changed to " B301 ".... and so on

_________________
LOOOL
Post 28 Feb 2005, 17:18
View user's profile Send private message Reply with quote
franka



Joined: 10 Dec 2005
Posts: 12
franka 10 Dec 2005, 05:05
maybe menuet could be sped up by using loadall to switch to realmode for using VESA-BIOS
Post 10 Dec 2005, 05:05
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 10 Dec 2005, 23:45
what does loadall do?
Post 10 Dec 2005, 23:45
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
JMGK



Joined: 26 Aug 2005
Posts: 27
JMGK 11 Dec 2005, 14:40
Post 11 Dec 2005, 14:40
View user's profile Send private message Reply with quote
System86



Joined: 15 Aug 2007
Posts: 77
System86 08 Jan 2008, 01:39
Quote:

maybe menuet could be sped up by using loadall to switch to realmode for using VESA-BIOS

LOADALL doesn't exist on non-386 chips (except for the 286 variant, but that's a different story) and I don't think it will make switching to and from pmode/rmode any faster (the 386 was designed to switch between the modes quickly, just by flipping a bit in CR0, although you also have to set the segment registers to values good for real mode). This pretty much rules out LOADALL for any serious operating system today. About 386 chips, I'm talking about the actual 386, not compatible chips like 486, Pentium, etc.

A good page about the loadall opcode is http://www.x86.org/articles/loadall/tspec_a3_doc.htm
Post 08 Jan 2008, 01:39
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 08 Jan 2008, 08:46
LOADALL is to be read as "not supported" instruction and therefore you can't use it. Especially when later processors have removed it. There are instructions for loading AND saving ALL the XMM/MMX and FPU registers and their flags and MenuetOS is already using it since:
18.02.2007 0.58B Improved protection from Ville
MMX/SSE/SSE2 support from Madis Kalme
I think there's no need for incompatible LOADALL when it doesn't have SAVEALL to go with it and coding some "times 8 mov [reg_save#n],r#n" isn't THAT complicated Razz

Btw, the SSE support means all previous, current and future SSEs, so its already SSE4.1&SSE4.2 ready! Smile
Post 08 Jan 2008, 08:46
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.