Compare commits

...

2 commits

8 changed files with 96 additions and 14 deletions

View file

@ -22,4 +22,3 @@ add_executable(yes yes.asm)
add_executable(case case.asm)
add_executable(diff diff.asm)
add_executable(arg arg.asm)

12
LICENSE
View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
@ -230,3 +231,14 @@ The hypothetical commands `show w' and `show c' should show the appropriate part
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
=======
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>>>>>>> 4239ceeb1ccbbab57aa904c6f3888ef0bf9e6ddb

View file

@ -1,3 +1,4 @@
<<<<<<< HEAD
# zombie-core-utils
## Dependencies
@ -13,4 +14,7 @@ cd build
cmake ..
make
```
=======
# zombie-lib
>>>>>>> 4239ceeb1ccbbab57aa904c6f3888ef0bf9e6ddb

13
arg.asm
View file

@ -1,20 +1,27 @@
extern puts
section .data
text db 48,0
text db "0",0
frick dq 0
section .text
global main
main:
sub rsp, 8 ;enter
add [text], rdi
add rsi, 8
mov r8, [rsi]
mov [frick], r8
mov rdi, text
mov rdi, [frick]
cld
call puts
_end:
add rsp, 8 ;exit
ret

View file

@ -4,20 +4,38 @@ global case_func
section .data
text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0
tempstore db 0
argument_error db "Argument Error!... either too many args or too little please fix", 0
section .text
global main
main:
sub rsp, 8 ;enter
mov rdi, text
call case_func
mov rdi, text
cmp rdi, 2
jne _argument_error ;if its not exactly 2 then exit
add rsi, 8 ;get the second argument because the first argument is the path
mov r8, [rsi] ;this block here fenagles the pointer into memeory instead of a register
mov [tempstore], r8 ; i also really with i had the abilty to mov [thing1], [thing2]
mov rdi, [tempstore]
call case_func ;case_func modifies the text you send it
mov rdi, [tempstore]
cld
call puts ;this is the puts way of printing a string
_end:
add rsp, 8 ;exit
ret
_argument_error:
mov rdi, argument_error
cld
call puts
jmp _end

View file

@ -3,8 +3,9 @@ extern puts
%include "../inc/diff_func.inc"
section .data
text db "REEEEEEEEEE",0
text2 db "REEEEEEErEE",0
tempstore db 0
tempstore2 db 0
argument_error db "Argument Error!... either too many args or too little please fix", 0
differ db "they differ",0
notdiffer db "they do not differ",0
section .text
@ -13,8 +14,20 @@ section .text
main:
sub rsp, 8 ;enter
mov rdi, text
mov rsi, text2
cmp rdi, 3
jne _argument_error
add rsi, 8
mov r8, [rsi]
mov [tempstore], r8
add rsi, 8
mov r8, [rsi]
mov [tempstore2], r8
mov rdi, [tempstore]
mov rsi, [tempstore2]
call diff_func
cmp r10b, 1 ;why tf did i make ut r10b as the return like tf?!?!?!?
@ -35,3 +48,10 @@ _notdiffer:
_end:
add rsp, 8 ;exit
ret
_argument_error:
mov rdi, argument_error
cld
call puts
jmp _end

View file

@ -1,9 +1,15 @@
diff_func:
xor rcx, rcx ;we do this to clear garbage in rcx (i have had garbage in it before)
mov r8, rdi
mov r9, rsi
_loopwasp12bsharknado:
;loop tings
mov rdi, r8
mov rsi, r9
add rdi, rcx
add rsi, rcx

View file

@ -10,17 +10,26 @@ section .rodata
format db "%#d", 10, 0
section .data
text db "rEE",0
testasd dq 0
tempstore db 0
argument_error db "Argument Error!... either too many args or too little please fix", 0
section .text
global main
main:
sub rsp, 8 ;enter
cmp rdi, 2
jne _argument_error ;if its not exactly 2 then exit
mov rdi, text
add rsi, 8 ;get the second argument because the first argument is the path
mov r8, [rsi] ;this block here fenagles the pointer into memeory instead of a register
mov [tempstore], r8 ; i also really with i had the abilty to mov [thing1], [thing2]
mov rdi, [tempstore]
call length_func
mov [testasd], rax
@ -35,3 +44,10 @@ main:
_end:
add rsp, 8 ;exit
ret
_argument_error:
mov rdi, argument_error
cld
call puts
jmp _end