A question about computer processors

  • 1 Replies
  • 429 Views
*

FlatAssembler

  • 469
  • Not a FE-er
A question about computer processors
« on: August 05, 2017, 06:08:12 AM »
Imagine the following hypothetical scenario. Suppose I installed MS-DOS 5.55 (the version that NTVDM emulates) on a computer with a modern 64-bit processor. MS-DOS itself is runnable on modern processors, if it's run from a live CD, which you can download here:
http://www.allbootdisks.com/download/iso.html
However, it can't be installed on modern hard drives. But, for the sake of the story, let's say I manage to (this isn't a question about hard drives, but about processors). Now, let's say that I also install DPMI and Flat Assembler (it's doable in DosBox, and it would probably be doable on MS-DOS if I had an access to a compatible hard-drive). So, let's say I compile the following simple Assembler program:
Code: [Select]
format binary as '.COM'
use64
xor rax,rax
int 20h
So, I run the program. What do you think would happen? Would the program simply exit and not output anything, or would it block the whole system (by sending invalid commands to the CPU)? Why?
Fan of Stephen Wolfram.
This is my parody of the conspiracy theorists:
https://www.theflatearthsociety.org/forum/index.php?topic=71184.0

*

FlatAssembler

  • 469
  • Not a FE-er
Re: A question about computer processors
« Reply #1 on: August 05, 2017, 07:25:13 AM »
You don't need to be certain, all the somewhat-reasonable answers are welcome.

I think, for example, that it would exit without a problem, because it would do the same if you used 32-bit registers in a DOS app, if the processor supports them, so why would it be different with 64-bit registers.

Maybe the reason why 64-bit apps don't work on 32-bit Windows, even if the processor is 64-bit, is that Windows checks if something is a valid win32 app before it allows it to be run as one.

Does anyone think differently?
Fan of Stephen Wolfram.
This is my parody of the conspiracy theorists:
https://www.theflatearthsociety.org/forum/index.php?topic=71184.0