apple1-videocard-lib/demos/sdcard
2022-06-03 09:57:21 +02:00
..
apple1_sdcard increase to 64 chars buffer, use stack variables 2022-06-03 09:29:03 +02:00
help_dir help command 2022-03-25 14:57:55 +01:00
cmd_asave.h initialize VIA in LOAD and ASAVE for applesoft basic 2022-04-04 09:52:04 +02:00
cmd_chdir.h new CD and PWD commands, new prompt 2022-02-15 17:44:20 +01:00
cmd_del.h
cmd_dir.h pausable dir, improve matching in LOAD 2022-03-21 14:15:53 +01:00
cmd_dump.h SD handle break output by keyboard 2022-02-16 08:58:59 +01:00
cmd_help.h rearrange input buffer and lowram layout to allow longer file names 2022-04-02 10:10:13 +02:00
cmd_load.h initialize VIA in LOAD and ASAVE for applesoft basic 2022-04-04 09:52:04 +02:00
cmd_mkdir.h
cmd_mount.h sd card command MOUNT, SD OS v1.1 2022-03-28 19:26:30 +02:00
cmd_pwd.h new CD and PWD commands, new prompt 2022-02-15 17:44:20 +01:00
cmd_read.h remove loading dots 2022-03-28 17:50:48 +02:00
cmd_rmdir.h
cmd_save.h remove loading dots 2022-03-28 17:50:48 +02:00
cmd_test.h fix TEST command 2022-06-03 09:57:21 +02:00
cmd_type.h SD handle break output by keyboard 2022-02-16 08:58:59 +01:00
cmd_write.h remove loading dots 2022-03-28 17:50:48 +02:00
console.h fix EXIT command bug 2022-06-03 09:33:05 +02:00
m.bat print entry points for applesoft basic 2022-06-03 09:56:39 +02:00
README.md add integer basic warm start reference 2022-06-03 09:29:54 +02:00
sdcard.c remove loading dots 2022-03-28 17:50:48 +02:00

SD CARD

  • all numbers must be provided in hexadecimal format unless specified
  • arguments in [] brackets means they are optional
  • nested paths are allowed with the / character, e.g. /, /foder1/foo
  • no path given implies current working directory

TAGGED FILE NAMES

File names containing a tag # character have a special meaning: the part after the # indicates the file type (two characters) and the hex loading address (4 characters).

#06 for plain binary files #F1 for BASIC programs #F8 for Applesoft BASIC lite programs

E.g.: BASIC#06E000 is binary file named BASIC that loads at address $E000. STARTREK#F10300 is a BASIC program named STARTREK that loads at address $0300. LEMO#F80801 is a AppleSoft BASIC program named LEMO that loads at address $0801.

Tagged file names are used by the LOAD, RUN, SAVE, ASAVE and DIR commands to simplify working with files. For example to execute the above files, it's enough to type:

LOAD BASIC
RUN STARTREK

COMMANDS

READ filename startaddress

Reads a binary file from the SD card and loads it in memory at the specified address.

WRITE filename startaddress endaddress

Writes the memory range from startaddress to endaddress (inclusive) in a file on the SD card.

TYPE filename

Reads the specified ASCII file from the SD card and prints it on the screen. Press any key to stop the printing and return to the command prompt.

DUMP filename [start] [end]

Reads the specified binary file from the SD card and prints it on the screen in hexadecimal format. start and end are optional and are used to print a smaller portion of the file. Press any key to stop the printing and return to the command prompt.

LOAD filename

Loads a file from the SD card. filename refers to a "tagged file name" described above. For convenience, filename can be partially given, the first matching file will be loaded.

SAVE filename [start] [end]

Saves a file to the SD card. If start and end are specified, a binary file with tag #06 will be created with the memory content from the address range start-end (included). If start and end are not specified, the BASIC program currently loaded in memory will be created with the corresponding #F1 tag.

ASAVE filename

Saves a AppleSoft BASIC lite file to the SD card. The program currently loaded in memory will be created with the corresponding #F8 tag.

RUN filename

Same as LOAD but runs the file after loading it. Binary files are exectuted at the starting address specified in the file name tag; BASIC files are RUN from the BASIC interpreter.

DEL filename RM filename

Deletes a file from the SD card.

DIR [path] LS [path]

Lists the files from the specified directory, or from the current directory if no path is given. LS has a shorter but quicker output format. Press any key to stop the file listing and return to the command prompt.

CD path

Changes the current working directory to the specified path. The current directory is also shown in the command prompt.

MD path MKDIR path

Creates the specified directory.

RD path RMDIR path

Removes the specified directory. The directory to remove must be empty (no files or directories within).

PWD

Prints on the screen the current working directory.

BAS

Prints LOMEM and HIMEM pointers from the BASIC program currently loaded in memory.

address R

Runs the program loaded at the specified memory address. Useful addresses: 6000R AppleSoft BASIC cold start (needed at least once) 6003R AppleSoft BASIC warm start (do not destroy the BASIC program in RAM) E000R Integer BASIC cold start E2B3R Integer BASIC warm start EFECR Integer BASIC "RUN" command (can be used as a warm entry point) 8000R SD card OS command prompt

TIME value

Set the internal timeout value used in the I/O operations with the SD cards.

TEST

Internal test.

EXIT

Exits to the WOZ monitor