Skip to content

BASIC SAMPLE Statements

Curtis F Kaylor edited this page Jun 5, 2026 · 4 revisions

LOAD SAMPLE

TYPE: BASIC File I/O statement

FORMAT: LOAD SAMPLE @ page , offset

coming soon


FORMAT: LOAD SAMPLE ! ext_address

coming soon


PLAY SAMPLE

TYPE: BASIC System statement

FORMAT: PLAY SAMPLE @ page , offset

Action: Plays an 8-bit digital sample stored stored in paged memory.

  • @page is a number in the range 0 through 63 that specifies the memory page on which the sample data resides.
  • offset is a number in the range 0 through 16383 that specifies the starting address within the memory page.
Examples:
LOAD "file.saq",@40,0 `
PLAY SAMPLE @40,0 `

Plays the audio sample "file.saq" stored on page @40, starting at address 0.


FORMAT: PLAY SAMPLE ! ext_address

Action: As above, but using extended address notation.

  • ext_address is a number in the range 0 through ??? that specifies the sample data address relative to the start of paged RAM.

FORMAT: PLAY SAMPLE filespec

coming soon


Creating a digital sample file:

  1. Open an audio file in Audacity and edit as desired.
  2. Select File --> Export Audio, then options...
    • Format: Other uncompressed files
    • Channels: Mono
    • Sample Rate: 8000, 11025, or 16000
    • Header: RAW
    • Encoding: Unsigned 8-bit PCM
    • ...and click Export
  3. Ensure you have Python3 installed.
  4. At the command line execute raw2saq.py...
    • python raw2saq.py filename.raw filename.saq rate
    • ...where rate is 8000, 11000, or 16000

Clone this wiki locally