Module 0392: How to submit TTPASM source code

Tak Auyeung

2023-11-02

Creative Commons License
The work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

1 What is a TTPASM file?

A TTPASM file is a Tak’s Toy Processor ASseMbly source file. It is a plain text file that contains the mnemonic source code of instructions that would be assembled in the “Source” sheet of the assembler.

2 Workflow

2.1 Windows extension hiding

Windows does not allow files to be saved to an extension other than .txt easily. It is best to re-enable extension showing. In File Explorer, go to View, then check File name extensions.

2.2 Source file editing

Use a plain text editor to edit a TTPASM file. In Windows, Notepad works. In MacOS, use TextEdit, but make sure the format is “Plain Text”. You can go to Preferences, then New Documents, then Format, and change the default format. In Linux, vi, nvi, vim, nvim, nano all work fine.

If you use MacOS and TextEdit, you can paste text content in plain text using cmd+shift+V. This is not a problem in Notepad or the mentioned editors in Linux.

If you use Notepad in Windows, in the dialog box to save a file, change the Save as type to All Files, then specify the filename with a .ttpasm extension.

2.3 Assembling the code

In the Source sheet in the assembler, select column A, then press Delete. Copy the code from a text editor to column A using the standard copy-and-paste method.

Try not to do editing in the Assembler Google Sheets as that can easily alter the cell references to the point that the assembler stops working.