commit 224809a83c3833fe5f3d39ec276177782504fabf
parent 85af2114c6d7be7608c93503c8a6f3521f5e981f
Author: Georges Dupéron <georges.duperon@gmail.com>
Date: Sat, 28 Jul 2018 00:10:56 +0200
appveyor: test OS, run os.bat in a nested cmd.exe, fix: MS-DOS was ignoring one line
appveyor:
* test the OS
* run os.bat in a nested cmd.exe as a temporary fix for #12
* fix issue with MS-DOS ignoring one line
Diffstat:
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
@@ -60,8 +60,10 @@ build_script:
- cmd: make all
test_script:
- - cmd: echo test command using batch
- - ps: Write-Host 'or using PowerShell'
+ - cmd: cmd /C os.bat exit
+ - cmd: sh os.bat exit
+ # The next command actually runs the script as a MS-DOS batch file
+ - cmd: sh -c './os.bat exit'
#artifacts:
# - path: path/to/file_or_directory_to_zip
\ No newline at end of file
diff --git a/example-os/os.asm b/example-os/os.asm
@@ -84,7 +84,10 @@ times (34*512)-($-$$) db 0
;;; End of line for MS-DOS, so that it correctly processes the GOTO instruction
db 0x0d, 0x0a
-db "GOTO msdos", 0x0d, 0x0a
+;;; For some reason, MS-DOS seems to ignore this line, so we leave an empty comment there.
+db "::"
+db 0x0d, 0x0a
+db "@GOTO msdos", 0x0d, 0x0a
;;; After the bootsector, close the sh here-document skipped via : <<'EOF'
db 0x0a
@@ -105,8 +108,8 @@ db "while :; do sleep 1; done", 0x0a
db 0x0d, 0x0a
db ":msdos", 0x0d, 0x0a
db "@cls", 0x0d, 0x0a
-db "echo Hello world by the OS, from MS-DOS!", 0x0d, 0x0a
-db "@goto %1 :pause", 0x0d, 0x0a
+db "@echo Hello world by the OS, from MS-DOS!", 0x0d, 0x0a
+db "@GOTO %1 pause", 0x0d, 0x0a
db ":pause", 0x0d, 0x0a
db "@pause", 0x0d, 0x0a
db ":exit", 0x0d, 0x0a