Website Summary Files Commits Branches @commit @diff @stats
path: root / examples / example1.s
blob: b1e38ed34e2d319aa3144c42c0a69f9e2ee323b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; Assembler produces binary files, containing series of big-endian i64 values

; Arguments in the form "%NUMBER" signify absolute addresses

subleq %10, %11, %12

; Higher-order instructions convert to a series of subleq instructions
; https://en.wikipedia.org/wiki/One-instruction_set_computer#Synthesized_instructions

jmp %20      ; subleq %0, %0, %20

add %39, %41 ; subleq %39,  %0, next_address
             ; subleq  %0, %41, next_address
             ; subleq  %0,  %0, next_address