Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Japheth

Homepage

Germany (South),
24.07.2009, 08:57
 

64bit DOS sample (Announce)

Hello,

based on a sample supplied by sinsi + T. Grysztar in the Fasm forum I made a simple DOS 64bit sample. It's a "normal" DOS MZ exe which should be able to run on any DOS on a 64bit-capable machine. If no such machine is available, Qemu64 will do as well.

The user interface is simple: when the program starts, it switches to long-mode and waits for keys. Keys it knows are 'r', which dumps some registers, and ESC, which makes the program switch back to real-mode.

It's written in assembly, in Masm - or more exactly: in JWasm - syntax. To assemble it a 64bit aware version of JWasm is needed ( the "experimental" version )

http://www.japheth.de/Download/Dos64.zip

---
MS-DOS forever!

RayeR

Homepage

CZ,
24.07.2009, 10:25

@ Japheth

64bit DOS sample

Yes it works.
BTW is it possible to start long mode from Virtual86 mode or it's just limitation of the example?
I would rather see 64bit DJGPP compiler with libraries :-D but currently I don't have usage for such big memory model.

---
DOS gives me freedom to unlimited HW access.

Japheth

Homepage

Germany (South),
24.07.2009, 11:57

@ RayeR

64bit DOS sample

> BTW is it possible to start long mode from Virtual86 mode or it's just
> limitation of the example?

Switching directly from V86 mode isn't possible, but you can switch to ring 0 via VCPI and then switch to long mode.

---
MS-DOS forever!

RayeR

Homepage

CZ,
24.07.2009, 14:17

@ Japheth

64bit DOS sample

> Switching directly from V86 mode isn't possible, but you can switch to
> ring 0 via VCPI and then switch to long mode.

Is it then possible to switch back to V86? What structures have to be saved before to be able to succesfull restore? I know nothing yeat about long mode, can you reccomend some simple tutrial about long mode? I'm not going to take assembler and making 64bit programs but just for interest...

---
DOS gives me freedom to unlimited HW access.

Japheth

Homepage

Germany (South),
24.07.2009, 18:53

@ RayeR

64bit DOS sample

> Is it then possible to switch back to V86?

Yes.

> What structures have to be saved before to be able to succesfull restore?

There's nothing special. In fact, it's less complicated, because a VCPI client which switches to long mode won't need the VCPI mode switches and page tables for the first MB.

> I know nothing yeat about
> long mode, can you reccomend some simple tutrial about long mode?

I used the original Intel and/or AMD manuals. I don't know if they are good, but I was - hopefully - able to understand them.

---
MS-DOS forever!

RayeR

Homepage

CZ,
25.07.2009, 00:01

@ Japheth

64bit DOS sample

> I used the original Intel and/or AMD manuals. I don't know if they are
> good, but I was - hopefully - able to understand them.

And how about compatability of 64bit extension between intel and AMD? Will your example work on AMD too or some modifications needed? And I also readed that VIA have some 64bit CPU... What are your future plans of 64bit programming?

---
DOS gives me freedom to unlimited HW access.

Japheth

Homepage

Germany (South),
25.07.2009, 05:43

@ RayeR

64bit DOS sample

> And how about compatability of 64bit extension between intel and AMD? Will
> your example work on AMD too or some modifications needed?

AFAIU it "should" work on both.

> What are your future plans of 64bit programming?

The sample is/was more or less a test case for JWasm. There are no plans for a HDPMI64.

---
MS-DOS forever!

marcov

26.07.2009, 14:03

@ Japheth

64bit DOS sample

> based on a sample supplied by sinsi + T. Grysztar in the Fasm forum I made
> a simple DOS 64bit sample. It's a "normal" DOS MZ exe which should be able
> to run on any DOS on a 64bit-capable machine. If no such machine is
> available, Qemu64 will do as well.
>
> The user interface is simple: when the program starts, it switches to
> long-mode and waits for keys. Keys it knows are 'r', which dumps some
> registers, and ESC, which makes the program switch back to real-mode.
>
> It's written in assembly, in Masm - or more exactly: in JWasm - syntax. To
> assemble it a 64bit aware version of JWasm is needed ( the "experimental"
> version )
>
> http://www.japheth.de/Download/Dos64.zip

Will 32-bit TSRs and hooks keep running? Or is it more a app that can swapout dos, and return to it? (I guess the latter)

Japheth

Homepage

Germany (South),
27.07.2009, 10:49

@ marcov

64bit DOS sample

> Will 32-bit TSRs and hooks keep running? Or is it more a app that can
> swapout dos, and return to it? (I guess the latter)

Yes, it's the latter.

---
MS-DOS forever!

Back to the board
Thread view  Mix view  Order
22074 Postings in 2036 Threads, 396 registered users, 25 users online (0 registered, 25 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum