Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit f5d37ff

Browse files
committed
Minor changes; populate version in A-registger too, create files if missing, and ensure we align our syscall dump
1 parent 38381f0 commit f5d37ff

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cpm/cpm_bdos.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ func BdosSysCallBDOSVersion(cpm *CPM) error {
319319

320320
// HL = 0x0022 -CP/M 2.2
321321
cpm.CPU.States.HL.SetU16(0x0022)
322+
cpm.CPU.States.AF.Hi = 0x22
322323
return nil
323324
}
324325

@@ -484,7 +485,7 @@ func BdosSysCallFileOpen(cpm *CPM) error {
484485
}
485486

486487
// Now we open from the filesystem
487-
file, err := os.OpenFile(fileName, os.O_RDWR, 0644)
488+
file, err := os.OpenFile(fileName, os.O_CREATE|os.O_RDWR, 0644)
488489
if err != nil {
489490
cpm.log = cpm.log.With(slog.Group("error", slog.String("message", err.Error())))
490491
setResult(cpm, 0xFF)

main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ func main() {
164164
if ent.Fake {
165165
fake = "FAKE"
166166
}
167-
fmt.Printf("\t%03d %-20s %s\r\n", int(id), ent.Desc, fake)
167+
if ent.Desc != "" {
168+
fmt.Printf("\t%03d %-25s %s\r\n", int(id), ent.Desc, fake)
169+
}
168170
}
169171
}
170172

0 commit comments

Comments
 (0)