about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2018-06-27 22:58:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2018-06-27 22:58:08 -0700
commit5cce54ebf3088b0411e4026de0545f3f9eb01828 (patch)
treeecc08ed4eb1dd593789961291308984d6ea63cce
parent582875bf3ae0a9e266fe9b49b93b8b8e1748c918 (diff)
downloadmu-5cce54ebf3088b0411e4026de0545f3f9eb01828.tar.gz
4280 - fix test program to use subx instructions
I don't know how to tell nasm to generate an imm32. It's a minor stepping-stone
anyway; just emit the machine code directly.
-rwxr-xr-xsubx/teensy/test5bin91 -> 99 bytes
-rw-r--r--subx/teensy/test5.s11
2 files changed, 7 insertions, 4 deletions
diff --git a/subx/teensy/test5 b/subx/teensy/test5
index da1c8cd6..a67a5299 100755
--- a/subx/teensy/test5
+++ b/subx/teensy/test5
Binary files differdiff --git a/subx/teensy/test5.s b/subx/teensy/test5.s
index 3049615a..54a79846 100644
--- a/subx/teensy/test5.s
+++ b/subx/teensy/test5.s
@@ -35,9 +35,12 @@ phdr:                                                 ; Elf32_Phdr
 phdrsize  equ  $ - phdr
 
 _start:
-  mov     bl, 42
-  xor     eax, eax
-  inc     eax
-  int     0x80
+  mov ebx, 42
+  xor eax, eax
+  ; add eax, 0x00000001
+    db 0x81  ; op
+    db 0xc0  ; modr/m
+    dd 0x00000001  ; imm32 operand
+  int 0x80
 
 filesize      equ     $ - $$
;dominik@heidler.eu> 2016-05-04 10:00:41 +0200 committer Dominik Heidler <dominik@heidler.eu> 2016-05-04 10:00:41 +0200 Added tray cmd info to CHANGELOG' href='/danisanti/profani-tty/commit/CHANGELOG?id=90c6ba4622c40df8b70273b70ea6d240b9387ad1'>90c6ba46 ^
1ed9580c ^

eeb0f71c ^
1ed9580c ^


841f9073 ^
1ed9580c ^
214eac6e ^

4257ecb1 ^
0269129d ^



9b797f3c ^
0269129d ^
6f1119d2 ^
f1875919 ^
89c7de77 ^
55b3e9d4 ^

89c7de77 ^
a3dccce2 ^
06882c01 ^

0269129d ^
a7de5933 ^


0bf9d324 ^
a7de5933 ^
0bf9d324 ^




a7de5933 ^
0bf9d324 ^





cd084c7e ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59