From 5cce54ebf3088b0411e4026de0545f3f9eb01828 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 27 Jun 2018 22:58:08 -0700 Subject: 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. --- subx/teensy/test5 | Bin 91 -> 99 bytes subx/teensy/test5.s | 11 +++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'subx/teensy') diff --git a/subx/teensy/test5 b/subx/teensy/test5 index da1c8cd6..a67a5299 100755 Binary files a/subx/teensy/test5 and b/subx/teensy/test5 differ diff --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 $ - $$ -- cgit 1.4.1-2-gfad0