## Name

BINEX — Convert Binary To S-Record File

## Synopsis

`binex` `path1` `path2`

## Description

S-Record files are a type of text file that contains records that represent binary data in hexadecimal character form. This Motorola-standard format is often directly accepted by commercial PROM programmers, emulators, logic analyzers and similar devices that are interfaced RS-232 interfaces. It can also be useful for transmitting files over data links that can only handle character-type data; or to convert OS-9 assembler or compiler-generated programs to load on non-OS-9 systems.

Binex converts “path1”, an OS-9 binary format file, to a new file named “path2” in S-Record format. If invoked on a non-binary load module file, a warning message is printed and the user is asked if binex should proceed anyway. A “Y” response means yes; any other answer will terminate the program. S-Records have a header record to store the program name for informational purposes and each data record has an absolute memory address which is not meaningful to OS-9 since it uses position-independent-code. However, the S-Record format requires them so binex will prompt the user for a program name and starting load address. For example:

    binex /d0/cmds/scanner scanner.S1
    Enter starting address for file: $100
    Enter name for header record: scanner

To download the program to a device such as a PROM programmer (for example using serial port T1) type:

    list scanner.S1 >/T1