From bf77cdc029993b51c698616360272380e6d8154d Mon Sep 17 00:00:00 2001 From: Zellyn Hunter Date: Mon, 5 Dec 2016 22:21:01 -0500 Subject: [PATCH] Remove debug prints and add FHELLO FWORLD notes --- lib/notes.org | 29 ++++++++++++++++++++++++++--- lib/supermon/supermon.go | 2 -- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/lib/notes.org b/lib/notes.org index 559234c..12bb8d5 100644 --- a/lib/notes.org +++ b/lib/notes.org @@ -55,10 +55,33 @@ Beneath Apple ProDOS Table E.1 | FD | VAR | ProDOS | Applesoft BASIC variables file | | FE | REL | ProDOS | EDASM relocatable object module file | | FF | SYS | ProDOS | System file | -** NakedOS FHELLO +** NakedOS FHELLO + FWORLD +This is the simplest possible example of a FHELLO program that loads +another program (FWORLD) at $6000, then jumps to it. The placeholder +FWORLD below clears the screen, prints "HELLO WORLD", then spins +forever. + +*** FHELLO 20 40 03 JSR NAKEDOS 6D 01 DC ADC NKRDFILE 2C 02 DF BIT ${filename} -2C 00 E0 BIT ${target page} +2C 00 60 BIT ${target page} F8 CLD -4C 00 E0 JMP ${target page} +4C 00 60 JMP ${target page} + +*** FWORLD +6000-G 20 58 FC JSR HOME +6003-H A2 00 LDX #00 +6005-I BD 13 60 LDA -O,X +6008-J F0 06 BEQ -N +600A-K 20 ED FD JSR COUT +600D-L E8 INX +600E-M D0 F5 BNE -I +6010-N 4C 10 60 JMP * +6013- C8 C5 CC CC CF HELLO +6018- AC A0 D7 CF D2 CC C4 00 , WORLD. + +*** diskii commands + +echo -n -e '\x20\x40\x03\x6D\x01\xDC\x2C\x02\xDF\x2C\x00\x60\xF8\x4C\x00\x60' | diskii put -f ./lib/supermon/testdata/chacha20.dsk DF01:FHELLO - +echo -n -e '\x20\x58\xFC\xA2\x00\xBD\x13\x60\xF0\x06\x20\xED\xFD\xE8\xD0\xF5\x4C\x10\x60\xC8\xC5\xCC\xCC\xCF\xAC\xA0\xD7\xCF\xD2\xCC\xC4\x00' | diskii put -f ./lib/supermon/testdata/chacha20.dsk DF02:FWORLD - diff --git a/lib/supermon/supermon.go b/lib/supermon/supermon.go index 040d3d9..ea82b04 100644 --- a/lib/supermon/supermon.go +++ b/lib/supermon/supermon.go @@ -754,7 +754,6 @@ func (o operator) PutFile(fileInfo disk.FileInfo, overwrite bool) (existed bool, if err != nil { return false, err } - fmt.Printf("PLUGH: numFile: %v, namedFile: %v, symbol: %v\n", numFile, namedFile, symbol) if symbol != "" { if o.st == nil { return false, fmt.Errorf("cannot use symbolic names on disks without valid symbol tables in files 0x03 and 0x04") @@ -777,7 +776,6 @@ func (o operator) PutFile(fileInfo disk.FileInfo, overwrite bool) (existed bool, if err := o.st.AddSymbol(symbol, 0xDF00+uint16(numFile)); err != nil { return existed, err } - fmt.Println("PLUGH: about to write symbol table: %v", o.st) if err := o.sm.WriteSymbolTable(o.sd, o.st); err != nil { return existed, err }