Skip to content

Latest commit

 

History

History
92 lines (81 loc) · 4.1 KB

notes.org

File metadata and controls

92 lines (81 loc) · 4.1 KB

Program location

Defaults to $801 for ROM-based Applesoft. Locations $67/$68 point to the start of the program, and the byte preceding it must be #0.

Details:

Format

DOS stores an additional byte on the end, which should be ignored.

Parsing

See PARSE.INPUT.LINE at http://www.txbobsc.com/scsc/scdocumentor/D52C.html

“AT” is ambiguous: it could also be “ATN” or “A TO”. Applesoft checks by seeing if the character directly after “AT” is “N” OR “O”, and forcing a non-match with “AT” if so. Note that this doesn’t skip blanks.

Data statements and REM statements seem to leave characters completely intact (including storing the space, if any, after the “REM” or “DATA” keyword).

ProDOS and SOS File Types

Beneath Apple ProDOS Table E.1

00bothTypeless file
01bothBad blocks file
02SOSPASCAL code file
03SOSPASCAL text file
04TXTbothASCII text fil
05SOSPASCAL text file
06BINbothBinary file
07SOSFont file
08SOSGraphics screen file
09SOSBusiness BASIC program file
0ASOSBusiness BASIC data file
0BSOSWord processor file
0CSOSSOS system file
0D-0ESOSSOS reserved for future use
0FDIRbothDirectory file
10SOSRPS data file
11SOSRPS index file
12-18SOSSOS reserved for future use
19ADBProDOSAppleWorks data base file
1AAWPProDOSAppleWorks word processing file
1BASPProDOSAppleWorks spreadsheet file
1C-BFSOSSOS reserved for future use
C0-EEProDOSProDOS reserved for future use
EFPASProDOSProDOS PASCAL file
F0CMDProDOSAdded command file
F1-F8ProDOSProDOS user defined file types
FAINTProDOSInteger BASIC program file
FBIVRProDOSInteger BASIC variables file
FCBASProDOSApplesoft BASIC program file
FDVARProDOSApplesoft BASIC variables file
FERELProDOSEDASM relocatable object module file
FFSYSProDOSSystem file

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 60 BIT ${target page} F8 CLD 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 -

Sources

ProDOS

ProDOS boot source