Commit 348dfea0 authored by joel.guest's avatar joel.guest

Initial commit

parent 37935f93
......@@ -31,24 +31,24 @@ xor rdx,rdx ;sets all value of rdx to 0
mov rax, r9
mov r12, 15 ; r9 = loop counter
DIV r12 ; RDX:RAX/3->RAX Remainder ->RDX
CMP rdx, 0 ; compared rdx to r12
jz test15 ; jump not zero test 15
CMP rdx, 0 ; compared rdx to 0
jz test15 ; jump zero test 15
;sets uptest for bang
xor rdx,rdx ;sets all value of rdx to 0
mov rax, r9
mov r12, 5 ; r9 = loop counter
DIV r12 ; RDX:RAX/3->RAX Remainder ->RDX
CMP rdx, 0 ;compared rdx to r12
jz test5 ; jump not zero test 5
CMP rdx, 0 ;compared rdx to 0
jz test5 ; jump zero test 5
;sets uptest for fizz
xor rdx,rdx ;sets all value of rdx to 0
mov rax, r9
mov r12, 3 ; r9 = loop counter
DIV r12 ; RDX:RAX/3->RAX Remainder ->RDX
CMP RDX, 0 ;compared rdx to r12
Jz test3 ; jump no zero test 5
CMP RDX, 0 ;compared rdx to 0
Jz test3 ; jump zero test 5
jmp number ;jumps to number
......@@ -58,54 +58,54 @@ test15:
;output bang
inc r14
inc r15
mov rax,1
mov rax,1 ; set write command
mov rdi,1
mov rsi,fizzbang
mov rdx,9
syscall
jmp start_loop
mov rsi,fizzbang ; set rsi to location of string
mov rdx,9 ; sets rdx to length of the string
syscall ; invokes system call
jmp start_loop ;jump to start loop
test5:
inc r15
;output bang
mov rax,1
mov rax,1 ; set write command
mov rdi,1
mov rsi,bang
mov rdx,5
syscall
jmp start_loop
mov rsi,bang ; set rsi to location of string
mov rdx,5 ; sets rdx to length of the string
syscall ; invokes system call
jmp start_loop ;jump to start loop
test3:
inc r14
;output fizz
mov rax,1
mov rdi,1
mov rsi,fizz
mov rdx,5
syscall
jmp start_loop
mov rax,1 ; set write command
mov rdi,1 ;
mov rsi,fizz ; set rsi to location of string
mov rdx,5 ; sets rdx to length of the string
syscall ; invokes system call
jmp start_loop ;jump to start loop
fizzcounter:
mov rax, r14
mov rdi,1
mov rdx,1
mov rax, r14 ; move value r14 to rax
mov rdi,1 ; set rsi to location of string
mov rdx,1
mov rcx, 64
jmp loop
jmp loop ;jump to loop
bangcounter:
mov rax,r15
mov rdi, 1
mov rax,r15 ; move value r15 to rax
mov rdi, 1 ; set rsi to location of string
mov rdx,1
mov rcx, 64
jmp loop
jmp loop ;jump to loop
number:
mov rax,r9
mov rdi,1
mov rax,r9 ; move value r9 to rax
mov rdi,1 ; set rsi to location of string
mov rdx,1
mov rcx, 64
jmp loop
jmp loop ;jump to loop
loop:
push rax
......
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment