flat assembler
Message board for the users of flat assembler.

Index > Main > "Undocumented" LOADALL instruction

Author
Thread Post new topic Reply to topic
neonz



Joined: 02 Aug 2003
Posts: 62
Location: Latvia
neonz 02 May 2004, 12:09
FASM does not support neither 286 variation of LOADALL, neither 386+ variation. Maybe it should be added?

Info: http://www.nondot.org/sabre/os/files/ProtectedMode/LOADALL.txt
Post 02 May 2004, 12:09
View user's profile Send private message Visit poster's website Reply with quote
ShortCoder



Joined: 07 May 2004
Posts: 105
ShortCoder 07 May 2004, 04:40
Interesting.---this seems like it would be a useful thing to use if you were coding your own x86 OS, except for you would have to have different versions of this OS for a 286 or 386 through pentiums. Also, does this undocumented function work in 64-bit processors?

Hmm...maybe the mnemonics could be LOADALL286 and LOADALL386 since there are two different ones there.

Perhaps, instead of adding the undocumented opcodes to FASM, a new include file could be made which equates the undocumented opcodes to their values with some sort of macro?
Post 07 May 2004, 04:40
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 07 May 2004, 04:58
maybe loadall 386 version with "use32" directive used and 286 version otherwise

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 07 May 2004, 04:58
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 07 May 2004, 05:33
Both LOADALL286 and LOADALL386 are supported since ages.
Post 07 May 2004, 05:33
View user's profile Send private message Visit poster's website Reply with quote
Adam Kachwalla



Joined: 01 Apr 2006
Posts: 150
Adam Kachwalla 26 Apr 2006, 08:21
Does anyone know how to do this?:

Mark Dixon wrote:
THE PROCEDURE FOR USING LOADALL
(the ultra-safe, long procedure)

1. Save the original machine state, so you have a state to return to.
This information can be saved in a Loadall table, which is the most
convenient form for later use.

2. Disable interrupts. Just in case. We want a clean copy of area 80.

3. Save the 102-byte (33h words) block of data located at 80:0h. Ver-
sions of DOS (both PC- and MS-) earlier than 3.3 use this area for
critical system code, and as of DOS 3.3, RamDrive.Sys, and Himem.Sys use
this area for their own Loadall tables.

4. Re-enable interrupts. Let the clock ticks, or whatever, through,
while we do the following step.

5. Set up the new Loadall table (new_reg_buf), which defines the new
state we want to warp to.

6. Disable Interrupts.

7. Copy the new Loadall table to 80:0h.

8. Execute a Loadall.

9. Do something or other with your new machine state. Read or write
extended memory, run code upstairs, or whatever.

10. Copy the "old" Loadall table, containing the saved machine state,
down to 80:0.

11. Do another Loadall (Un-Loadall.) This restores the original
machine state.

12. Copy the block of saved data back to 80:0h.

13. Re-enable interrupts.



I guess Mark means something like:

Code:
...             ;Step I
CLI             ;Step II
...             ;Step III
STI             ;Step IV
...             ;Step V
CLI             ;Step VI
...             ;Step VII
LOADALL286      ;Step VIII
STI             ;No other step: I added this in (I don't see the point of leaving INTs disabled)
,,,             ;Step IX (Don't know if this is where the code is executed...)
CLI             ;No other step: just re-disabling interrupts for the next instructions (See Step VI)
...             ;Step X
LOADALL286      ;Step XI
...             ;Step XII
STI             ;Step XIII
,,,
;I am not sure if the code was meant to go here.
;I have a feeling Mark must have said something wrong
;He starts to restore the machine state in Step X, and interrupts are enabled in Step XIII    
Post 26 Apr 2006, 08:21
View user's profile Send private message Reply with quote
El Tangas



Joined: 11 Oct 2003
Posts: 120
Location: Sunset Empire
El Tangas 01 May 2006, 19:47
I you want to play with loadall, check this link too:
http://www.rcollins.org/articles/loadall/tspec_a3_doc.html

There is lots of good reading in that site, but unfortunately it is no longer updated.
Post 01 May 2006, 19:47
View user's profile Send private message Reply with quote
Adam Kachwalla



Joined: 01 Apr 2006
Posts: 150
Adam Kachwalla 02 May 2006, 06:34
Maybe there is a way to add "LOADALL" to FASM. If LOADALL was executed instead of LOADALL286 or LOADALL386, it will do one of the following?:

1. Find out which CPU you have and execute the corresponding LOADALL function

2. Execute both LOADALL functions (Only one of them can be correct).
Post 02 May 2006, 06:34
View user's profile Send private message 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.