Compare commits

..

No commits in common. "6cb234ec8a2104a3ca880ea10db348df38e149ab" and "4fe311d996b6b8f46c237df5ee90090b2ba582fd" have entirely different histories.

8 changed files with 14 additions and 96 deletions

View file

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

12
LICENSE
View file

@ -1,4 +1,3 @@
<<<<<<< HEAD
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
@ -231,14 +230,3 @@ 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/>. 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>. 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,4 +1,3 @@
<<<<<<< HEAD
# zombie-core-utils # zombie-core-utils
## Dependencies ## Dependencies
@ -14,7 +13,4 @@ cd build
cmake .. cmake ..
make make
``` ```
=======
# zombie-lib
>>>>>>> 4239ceeb1ccbbab57aa904c6f3888ef0bf9e6ddb

13
arg.asm
View file

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

View file

@ -4,38 +4,20 @@ global case_func
section .data section .data
tempstore db 0 text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0
argument_error db "Argument Error!... either too many args or too little please fix", 0
section .text section .text
global main global main
main: main:
sub rsp, 8 ;enter sub rsp, 8 ;enter
mov rdi, text
call case_func
cmp rdi, 2 mov rdi, text
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 cld
call puts ;this is the puts way of printing a string call puts ;this is the puts way of printing a string
_end: _end:
add rsp, 8 ;exit add rsp, 8 ;exit
ret ret
_argument_error:
mov rdi, argument_error
cld
call puts
jmp _end

View file

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

View file

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

View file

@ -10,26 +10,17 @@ section .rodata
format db "%#d", 10, 0 format db "%#d", 10, 0
section .data section .data
text db "rEE",0
testasd dq 0 testasd dq 0
tempstore db 0
argument_error db "Argument Error!... either too many args or too little please fix", 0
section .text section .text
global main global main
main: main:
sub rsp, 8 ;enter sub rsp, 8 ;enter
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 rdi, text
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 call length_func
mov [testasd], rax mov [testasd], rax
@ -44,10 +35,3 @@ main:
_end: _end:
add rsp, 8 ;exit add rsp, 8 ;exit
ret ret
_argument_error:
mov rdi, argument_error
cld
call puts
jmp _end