mirror of
https://github.com/ScrelliCopter/TECHNO.COM.git
synced 2025-02-21 01:59:25 +11:00
reorganise and document each file
This commit is contained in:
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
|
||||||
|
[*.asm]
|
||||||
|
indent_style = tab
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{masm.asm,nasm.asm}]
|
||||||
|
charset = latin1
|
||||||
|
end_of_line = crlf
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
[*.gas.asm]
|
||||||
|
end_of_line = lf
|
||||||
|
tab_width = 8
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,6 @@
|
|||||||
|
*.com
|
||||||
|
|
||||||
|
.vs/
|
||||||
|
.idea/
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
27
disassembly/README.md
Normal file
27
disassembly/README.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# TECHNO.COM Disassemblies
|
||||||
|
|
||||||
|
The following are full disassemblies of the (Payload isolated) TECHNO.COM MS-DOS binary, and are intended to be
|
||||||
|
bit-exact with the original.
|
||||||
|
```
|
||||||
|
TECHNO.COM (Payload only)
|
||||||
|
MD5 = 4CB859537BCD7BFB9FC5BFD6D74F4782
|
||||||
|
SHA-1 = A2FB99D873912AC8B7CD05E15659F65DA5D119BF
|
||||||
|
SHA-256 = BA33A41BA51C3D56B27107A94EF7842235B6D80A3A5B8710AEBDD87EB3A1905C
|
||||||
|
```
|
||||||
|
|
||||||
|
### techno.nasm.asm
|
||||||
|
Netwide Assembler syntax, tested to work under [NASM](https://www.nasm.us/), [FASM](https://flatassembler.net/), and
|
||||||
|
[YASM](https://yasm.tortall.net/).
|
||||||
|
|
||||||
|
None of these assemblers have the ability to produce the original opcodes from mnemonics, so `db`'s are used where
|
||||||
|
needed and documented with the actual mnemonic.
|
||||||
|
|
||||||
|
### techno.masm.asm
|
||||||
|
Microsoft Macro Assembler syntax, tested and works under MASM 6.11, [JWasm v2.11](https://www.japheth.de/JWasm.html),
|
||||||
|
and Borland Turbo Assembler 5.0 (in MASM mode).
|
||||||
|
|
||||||
|
This [fork](https://github.com/JWasm/JWasm) of JWasm v2.12pre is recommended for assembling on modern platforms.
|
||||||
|
|
||||||
|
### techno.gas.asm
|
||||||
|
GNU Assembler (AT&T) syntax, tested with [IA-16 DJGPP](https://gitlab.com/tkchia/build-ia16/-/releases),
|
||||||
|
and i386-elf-binutils. mingw's `as` appears to work too but not its `ld`.
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
# TECHNO.COM (payload only) Disassembly by a dinosaur 2022, 2024 (original author unknown)
|
# TECHNO.COM (payload only) Disassembly by a dinosaur 2022, 2024 (original author unknown)
|
||||||
# Binary MD5: 4CB859537BCD7BFB9FC5BFD6D74F4782
|
# Binary MD5: 4CB859537BCD7BFB9FC5BFD6D74F4782
|
||||||
# SHA256: BA33A41BA51C3D56B27107A94EF7842235B6D80A3A5B8710AEBDD87EB3A1905C
|
# SHA256: BA33A41BA51C3D56B27107A94EF7842235B6D80A3A5B8710AEBDD87EB3A1905C
|
||||||
# Assemble with GAS: as technog.asm -o technog.o
|
# Assemble with GAS: as techno.gas.asm -o techno.gas.o
|
||||||
# ld -Ttext 0x100 technog.o -o technog.elf
|
# ld -Ttext 0x100 techno.gas.o -o techno.elf
|
||||||
# objcopy -O binary technog.elf techno.com
|
# objcopy -O binary techno.elf techno.com
|
||||||
|
|
||||||
.code16
|
.code16
|
||||||
.section .text
|
.section .text
|
||||||
@@ -62,7 +62,7 @@ plot_char: # fn plot_char(AX, DI):
|
|||||||
# Arguments: DX = timer2 frequency
|
# Arguments: DX = timer2 frequency
|
||||||
.global beep
|
.global beep
|
||||||
beep:
|
beep:
|
||||||
push %ax
|
push %ax
|
||||||
mov $0b10110110, %al # 0 - 16 bit mode
|
mov $0b10110110, %al # 0 - 16 bit mode
|
||||||
# 1-3 - Mode 3 (Square wave generator)
|
# 1-3 - Mode 3 (Square wave generator)
|
||||||
# 4-5 - Access mode: lobyte/hibyte
|
# 4-5 - Access mode: lobyte/hibyte
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
; Binary MD5: 4CB859537BCD7BFB9FC5BFD6D74F4782
|
; Binary MD5: 4CB859537BCD7BFB9FC5BFD6D74F4782
|
||||||
; SHA256: BA33A41BA51C3D56B27107A94EF7842235B6D80A3A5B8710AEBDD87EB3A1905C
|
; SHA256: BA33A41BA51C3D56B27107A94EF7842235B6D80A3A5B8710AEBDD87EB3A1905C
|
||||||
;
|
;
|
||||||
; Assemble with Microsoft Macro Assembler: ml.exe /W3 technom.asm /Fotechno.com
|
; Assemble with Microsoft Macro Assembler: ml.exe /W3 techno~1.asm /Fotechno.com
|
||||||
; Assemble with JWasm: jwasm.exe -bin -Fo techno.com technom.asm
|
; Assemble with JWasm: jwasmd.exe -bin -Fo techno.com techno~1.asm
|
||||||
; Assemble with Turbo Assembler: tasm.exe technom.asm techno.obj
|
; Assemble with Turbo Assembler: tasm.exe techno~1.asm techno.obj
|
||||||
; tlink.exe /t techno.obj, techno.com
|
; tlink.exe /t techno.obj, techno.com
|
||||||
|
|
||||||
.model tiny
|
.model tiny
|
||||||
@@ -152,7 +152,7 @@ goto_beep:
|
|||||||
dec bl ; Phrase uses 1-based indicies because of the 0 terminator
|
dec bl ; Phrase uses 1-based indicies because of the 0 terminator
|
||||||
; So we need to convert it to 0-indexed
|
; So we need to convert it to 0-indexed
|
||||||
mov bh, 0 ; BX &= 0xFF
|
mov bh, 0 ; BX &= 0xFF
|
||||||
shl bl, 1 ;
|
shl bl, 1 ;
|
||||||
mov dx, [freqtbl + bx] ; Store frequency from note index into DX
|
mov dx, [freqtbl + bx] ; Store frequency from note index into DX
|
||||||
call beep ; Beep with loaded frequency
|
call beep ; Beep with loaded frequency
|
||||||
pop bx
|
pop bx
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
; Binary MD5: 4CB859537BCD7BFB9FC5BFD6D74F4782
|
; Binary MD5: 4CB859537BCD7BFB9FC5BFD6D74F4782
|
||||||
; SHA256: BA33A41BA51C3D56B27107A94EF7842235B6D80A3A5B8710AEBDD87EB3A1905C
|
; SHA256: BA33A41BA51C3D56B27107A94EF7842235B6D80A3A5B8710AEBDD87EB3A1905C
|
||||||
;
|
;
|
||||||
; Assemble with FASM: fasm technon.asm techno.com
|
; Assemble with FASM: fasm techno.nasm.asm techno.com
|
||||||
; Assemble with NASM: nasm technon.asm -fbin -o techno.com
|
; Assemble with NASM: nasm techno.nasm.asm -fbin -o techno.com
|
||||||
; Assemble with YASM: yasm -f bin technon.asm -o techno.com
|
; Assemble with YASM: yasm -f bin techno.nasm.asm -o techno.com
|
||||||
|
|
||||||
use16
|
use16
|
||||||
org 100h
|
org 100h
|
||||||
@@ -146,7 +146,7 @@ goto_beep:
|
|||||||
dec bl ; Phrase uses 1-based indicies because of the 0 terminator
|
dec bl ; Phrase uses 1-based indicies because of the 0 terminator
|
||||||
; So we need to convert it to 0-indexed
|
; So we need to convert it to 0-indexed
|
||||||
mov bh, 0 ; BX &= 0xFF
|
mov bh, 0 ; BX &= 0xFF
|
||||||
shl bl, 1 ;
|
shl bl, 1 ;
|
||||||
mov dx, [freqtbl + bx] ; Store frequency from note index into DX
|
mov dx, [freqtbl + bx] ; Store frequency from note index into DX
|
||||||
call beep ; Beep with loaded frequency
|
call beep ; Beep with loaded frequency
|
||||||
pop bx
|
pop bx
|
||||||
Reference in New Issue
Block a user