mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 06:54:04 +09:00
cpu halted flag on vm's mmio
This commit is contained in:
@@ -1 +1 @@
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power");
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power");sys.poke(-90,128)
|
||||
@@ -1 +1 @@
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power");
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power");sys.poke(-90,128)
|
||||
@@ -1 +1 @@
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("The Installation Medium seems to be damaged. Please contact your reseller or system administrators.");else println("TVDOS.SYS not found");println();println("Remove the Installation Medium, close the tray (if any), then shut off and restart the computer to finish the installation.");
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("The Installation Medium seems to be damaged. Please contact your reseller or system administrators.");else println("TVDOS.SYS not found");println();println("Remove the Installation Medium, close the tray (if any), then shut off and restart the computer to finish the installation.");sys.poke(-90,128)
|
||||
@@ -1 +1 @@
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power");
|
||||
let p=_BIOS.FIRST_BOOTABLE_PORT;com.sendMessage(p[0],"DEVRST\x17");com.sendMessage(p[0],'OPENR"tvdos/TVDOS.SYS",'+p[1]);let r=com.getStatusCode(p[0]);if(0==r)if(com.sendMessage(p[0],"READ"),r=com.getStatusCode(p[0]),0==r){let g=com.pullMessage(p[0]);eval(g)}else println("I/O Error");else println("TVDOS.SYS not found");println("Shutting down...");println("It is now safe to turn off the power");sys.poke(-90,128)
|
||||
@@ -1,5 +1,49 @@
|
||||
println("let's install!")
|
||||
|
||||
/* procedure:
|
||||
|
||||
CANCELLED_BY_USER :=
|
||||
println("Installation of TVDOS was cancelled by the user.")
|
||||
exit with errorlevel 1
|
||||
|
||||
|
||||
1. show the list of installable drives. Read-only drives are considered not installable
|
||||
1.1 if there is at least one installable drives, show the following message:
|
||||
select drive to install [B,C,D]:
|
||||
1.2 else, show the following message:
|
||||
No suitable drives were detected for installing TVDOS. The setup program will exit. (exit with errorlevel 2)
|
||||
|
||||
2. check if the drive has boot sector. if there is, show message:
|
||||
This drive appears to be bootable, which means there might be other operation system on this drive.
|
||||
Proceed anyway? [Y/N]:
|
||||
2.1. if read().trim().toLowercase() is not "y", do CANCELLED_BY_USER
|
||||
|
||||
3. show the following message:
|
||||
In order to install TVDOS to the drive ${destDrive}, the drive must be wiped clean first.
|
||||
THIS PROCESS WILL IRREVERSIBLY DESTROY ALL THE DATA IN THE DRIVE ${destDrive}!
|
||||
Type "yes, I consent" to proceed, or type any other text to cancel the installation process:
|
||||
3.1. if read().trim().toLowercase() is not "yes, i consent" or "yes i consent", do CANCELLED_BY_USER
|
||||
|
||||
4. show the following message:
|
||||
Enter the new name for the drive that TVDOS will be installed:
|
||||
|
||||
5. show the following message:
|
||||
The destination disk will be wiped now. Do not turn off the power...
|
||||
|
||||
6. formatDrive(destDrive, newName, driveNum)
|
||||
|
||||
7. show following message:
|
||||
TVDOS will be installed into the drive ${destDrive}...
|
||||
|
||||
8. copyFiles(destDrive)
|
||||
|
||||
9. show following message
|
||||
TVDOS is successfully installed. You may continue using the Live Boot environment.
|
||||
To boot from the newly-installed TVDOS, turn off the computer, remove the installation medium, then start the
|
||||
computer again. (exit with errorlevel 0)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
function copyFiles(destDrive) {
|
||||
function dir(path) {
|
||||
@@ -36,4 +80,15 @@ function copyFiles(destDrive) {
|
||||
com.sendMessage(port, "FLUSH");com.sendMessage(port, "CLOSE")
|
||||
|
||||
|
||||
}
|
||||
|
||||
function formatDrive(destDrive, newName, driveNum) {
|
||||
let [port, poru] = _TVDOS.DRV.FS.SERIAL._toPorts(destDrive)[0]
|
||||
com.sendMessage(port, "FLUSH");com.sendMessage(port, "CLOSE")
|
||||
com.sendMessage(port, `TEVDDISCARDDRIVE"${newName}",${poru}`)
|
||||
let status = com.getStatusCode(port[0])
|
||||
if (status != 0)
|
||||
throw Error("Formatting the disk failed: "+status)
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user