Skip to content

Commit

Permalink
Add Linux (ARM 32-bit) version
Browse files Browse the repository at this point in the history
  • Loading branch information
PoroCYon committed Dec 10, 2018
1 parent af00c67 commit 80b0d5d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions e.linux.arm.S
@@ -0,0 +1,36 @@
#define SYS_write 4
#define STDOUT 1
#define PIPE_SIZE 0x10000

.arm
.align 4

.section .text, "ax", %progbits

type _start, %function
globl _start
_start:
mov r1, #PIPE_SIZE

ldr r3, =('e'|('e'<<8)|('e'<<16)|('e'<<24))
mov r4, r3
mov r5, r3
mov r6, r3

.Lloop:
push {r3-r6}
sub r1, #(4*4)
cmp r1, #0
bgt .Lloop

mov r7, #SYS_write
mov r1, sp
mov r2, #PIPE_SIZE

.Lcall:
mov r0, #STDIN
swi #0
b .Lcall

.align 4
.pool

0 comments on commit 80b0d5d

Please sign in to comment.