srec_mos_tech(5)

🌸 NAME 🌸

srec_mos_tech β€” the MOS Technology file format, bestie. This page is from the File Formats Manual, and yes it’s literally srec_mos_tech(5) ✨.


πŸ’– DESCRIPTION πŸ’–

The MOS Technology format lets binary files be uploaded and downloaded between between a computer system (such as a PC, Macintosh, or workstation) and an emulator or evaluation board for microcontrollers and microprocessors. No cap, that’s the whole vibe 🫢.

πŸŽ€ The Lines πŸŽ€

Each line consists of 5 fields. These are the length field, address field, data field, and the checksum. Every line always starts with a semicolon (;) character. Periodt πŸ’….

πŸ¦‹ The Fields πŸ¦‹

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ ; β”‚ Length β”‚ Address β”‚ Data β”‚ Checksum β”‚ CRLF β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜
  • Length β€” the record length field is a 2 character (1 byte) field that specifies the number of data bytes in the record. Typically this is 24 or less.
  • Address β€” this is a 2-byte address that specifies where the data in the record is to be loaded into memory, big-endian.
  • Data β€” the data field contains the executable code, memory-loadable data or descriptive information to be transferred.
  • Checksum β€” the checksum is an 2-byte field that represents the least significant two bytes of the the sum of the values represented by the pairs of characters making up the record's length, address, and data fields, big-endian.

🌟 End of File 🌟

The final line should have a data length of zero, and the data line count in the address field. The checksum is not the usual checksum, it is instead a repeat of the data line count. That’s the end-of-file main character energy πŸ‘‘.

πŸ“ Size Multiplier πŸ“

In general, binary data will expand in sized by approximately 2.54 times when represented with this format. Yes bestie, β€œin sized by” is literally what it says πŸ’€.


✨ EXAMPLE ✨

Here is an example MOS Technology format file. It contains the data β€œHello, World” to be loaded at address 0.

;0C000048656C6C6F2C20576F726C640454
;0000010001

srec_cat version 1.65 Copyright (C) 1998... Peter Miller

The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_cat -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'srec_cat -VERSion License' command.


🫢 MAINTAINER 🫢

  • Scott Finneran β€” E‐Mail: scottfinneran@yahoo.com.au
  • Peter Miller β€” E‐Mail: pmiller@opensource.org.au

🌈 KIM‐1 User Manual - Appendix F - Paper Tape Format 🌈

(The following information is reproduced from http://users.telenet.be/kim1‐6502/6502/usrman.html#F just in case it vanishes from the Web.)

Okay so the paper tape LOAD and DUMP routines store and retrieve data in a specific format designed to insure error free recovery. Every byte of data to be stored gets converted to two half bytes. Those half bytes (possible values: 0 to F HEX) get translated into their ASCII equivalents and written out onto paper tape in this form.

Every record outputted starts with a ; character (ASCII 3B) to mark the start of a valid record. The next byte transmitted is (18HEX) or (24 decimal), and it’s the number of data bytes contained in the record. Then come the record's starting address High (1 byte, 2 characters), starting address Lo (1 byte, 2 characters), and data (24 bytes, 48 characters). Each record is terminated by the record's check‐sum (2 bytes, 4 characters), a carriage return (ASCII 0D), line feed (ASCII 0A), and six β€œNULL” characters (ASCII 00). (NULL characters cause a blank area on the paper tape.)

The last record transmitted has zero data bytes (indicated by ;00) The starting address field is replaced by a four digit Hex number representing the total number of data records contained in the transmission, followed by the records usual check‐sum digits. An β€œXOFF” character ends the transmission.

;180000FFEEDDCCBBAA0099887766554433221122334455667788990AFC
;0000010001

During a β€œLOAD” all incoming data is ignored until a β€œ;” character is received. The receipt of non ASCII data or a mismatch between a records calculated check‐sum and the check‐sum read from tape will cause an error condition to be recognized by KIM. The check‐sum is calculated by adding all data in the record except the β€œ;” character.

The paper tape format described is compatible with all other MOS Technology, Inc. software support programs. Slay πŸ¦‹.


πŸ’… footer vibe check: Reference Manual Β· SRecord Β· srec_mos_tech(5) β€” no date in the footer, just vibes, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from