Compare commits

...

3 Commits

Author SHA1 Message Date
andromeda
34b11aabe5 improve readme a bit 2026-04-04 10:49:40 +02:00
andromeda
767453bd55 save stack in tokenise 2026-04-04 10:26:15 +02:00
andromeda
df8e04ce63 mask smth 2026-04-04 09:50:40 +02:00
2 changed files with 70 additions and 0 deletions

View File

@@ -526,3 +526,70 @@ hlt
0xF4 ; HLT
```
#### program output with the function `print`, each comma-seperated `db` value put onto its own line
editted output of `x/512xb 0x00070000` in [gdb](https://www.sourceware.org/gdb/)
the following is somewhat correct! I just need to a) null-terminate 8-byte chars and b) define all the addresses currently represented as `0xff 0xff 0xff 0xff`
```
0x48 0xff 0xf2
0x48 0xff 0xf0
0x48 0xff 0xf6
0xc7 0xc2 0xf8 0x03 0x00 0x00
0x8a 0x06
0x80 0xf8 0x00
0x0f 0x84 0xff 0xff 0xff 0xff
0x66 0xee
0x48 0xff 0xc6
0xe9 0xff 0xff 0xff 0xff
0x48 0x8f 0xc6
0x48 0x8f 0xc0
0x48 0x8f 0xc2
0xc3
0x48 0xff 0xf6
0xc7 0xc6 0xff 0xff 0xff 0xff
0xe8 0xff 0xff 0xff 0xff
0x48 0x8f 0xc6
0xe9 0xff 0xff 0xff 0xff
0x48 0xff 0xf6
0xc7 0xc6 0xff 0xff 0xff 0xff
0xe8 0xff 0xff 0xff 0xff
0x48 0x8f 0xc6
0xe9 0xff 0xff 0xff 0xff
0x48 0xff 0xf6
0xc7 0xc6 0xff 0xff 0xff 0xff
0xe8 0xff 0xff 0xff 0xff
0x48 0x8f 0xc6
0xe9 0xff 0xff 0xff 0xff
0x48 0xff 0xf6
0xc7 0xc6 0xff 0xff 0xff 0xff
0xe8 0xff 0xff 0xff 0xff
0x48 0x8f 0xc6
0xe9 0xff 0xff 0xff 0xff
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x33 0x36 0x6d 0x00 0x00 0x00 0x00
0x7b 0x44 0x45 0x42 0x55 0x47 0x5d 0x3a
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x30 0x6d 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x31 0x3b 0x33 0x31 0x6d 0x00 0x00
0x7b 0x45 0x52 0x52 0x4f 0x52 0x5d 0x3a
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x30 0x6d 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x31 0x3b 0x33 0x33 0x6d 0x00 0x00
0x5b 0x54 0x45 0x53 0x54 0x5d 0x3a 0x20
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x30 0x6d 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x31 0x3b 0x33 0x35 0x6d 0x00 0x00
0x5b 0x57 0x41 0x52 0x4e 0x5d 0x3a 0x20
0x1b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x5b 0x30 0x6d 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
```

View File

@@ -1302,6 +1302,7 @@ get_opcode:
.found:
shl eax, 4
mov dl, [esi + 8 + opcodes.by_id + eax]
and edx, 0xFF
mov al, [esi + 2 + opcodes.by_id + eax]
and eax, 0xFF
ret
@@ -1347,6 +1348,7 @@ get_reg_bits:
; ------------------------------------------------------------------------------
tokenise:
mov rbp, rsp
; rdi -> current byte of program
xor eax, eax ; rax = number of tokens processed
xor edx, edx ; dl = current byte of program
@@ -1653,6 +1655,7 @@ tokenise:
jmp .loop
.break:
mov rsp, rbp
ret
; state