https://github.com/amireh/hasm
A SIC/XE assembler, school homework
https://github.com/amireh/hasm
Last synced: 3 months ago
JSON representation
A SIC/XE assembler, school homework
- Host: GitHub
- URL: https://github.com/amireh/hasm
- Owner: amireh
- Created: 2011-11-22T00:58:01.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-28T08:21:06.000Z (over 13 years ago)
- Last Synced: 2024-12-28T14:51:59.966Z (5 months ago)
- Language: C++
- Homepage:
- Size: 1.55 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
1.0 - Hax Assembler Overviw
The Hax Assembler (HASM) translates a hax assembly input (.hasm) file into a SIC/XE
compatible object program (.obj) which can be loaded by the Hax Loader.This software is written for studying purposes.
1.1 - Hax Assembler Specifications
- SIC Format 1 and Format 2 support
- SIC/XE Format 3 and Format 4 support
- Literals support
- Program blocks support
- Relocatable programs only
- SIC/XE Register-to-Register instructions
- Addressing modes supported:
1. Immediate addressing
2. Indirect addressing
3. Base-relative indexing
4. PC-relative indexing
- Multiple-pass assembling
- Expression support1.2 - SIC/XE Format Specifications
Instruction format field lengths are specified within {}, and are 1-bit long when
the braces are omitted.1.2.0 - Format 1
Length: 1 byte
Format: [ opcode{8} ]1.2.1 - Format 2
Length: 2 bytes
Format: [ opcode{8} ][ r1{4} ][ r2{4} ]1.2.2 - Format 3 (SIC upward-compatible)
Length: 3 bytes
Format: [ opcode{6} ][n][i][x][b][p][e][ disp{12} ]1.2.3 - Format 4 (SIC/XE only)
Length: 4 bytes
Format: [ opcode{6} ][n][i][x][b][p][e][ target address{20} ]Notation:
Format 4 (extended) instructions are denoted by prefixing the first operand with '+', ie:
+LDT #MAXLEN