Compare commits
No commits in common. "6cb234ec8a2104a3ca880ea10db348df38e149ab" and "4fe311d996b6b8f46c237df5ee90090b2ba582fd" have entirely different histories.
6cb234ec8a
...
4fe311d996
8 changed files with 14 additions and 96 deletions
|
@ -22,3 +22,4 @@ add_executable(yes yes.asm)
|
|||
add_executable(case case.asm)
|
||||
add_executable(diff diff.asm)
|
||||
add_executable(arg arg.asm)
|
||||
|
||||
|
|
12
LICENSE
12
LICENSE
|
@ -1,4 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
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/>.
|
||||
|
||||
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
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
# zombie-core-utils
|
||||
|
||||
## Dependencies
|
||||
|
@ -14,7 +13,4 @@ cd build
|
|||
cmake ..
|
||||
make
|
||||
```
|
||||
=======
|
||||
# zombie-lib
|
||||
>>>>>>> 4239ceeb1ccbbab57aa904c6f3888ef0bf9e6ddb
|
||||
|
||||
|
|
13
arg.asm
13
arg.asm
|
@ -1,27 +1,20 @@
|
|||
extern puts
|
||||
|
||||
|
||||
|
||||
section .data
|
||||
text db "0",0
|
||||
frick dq 0
|
||||
text db 48,0
|
||||
section .text
|
||||
global main
|
||||
|
||||
main:
|
||||
sub rsp, 8 ;enter
|
||||
|
||||
add rsi, 8
|
||||
mov r8, [rsi]
|
||||
mov [frick], r8
|
||||
add [text], rdi
|
||||
|
||||
|
||||
mov rdi, [frick]
|
||||
mov rdi, text
|
||||
cld
|
||||
call puts
|
||||
|
||||
|
||||
|
||||
_end:
|
||||
add rsp, 8 ;exit
|
||||
ret
|
||||
|
|
26
case.asm
26
case.asm
|
@ -4,38 +4,20 @@ global case_func
|
|||
|
||||
|
||||
section .data
|
||||
tempstore db 0
|
||||
argument_error db "Argument Error!... either too many args or too little please fix", 0
|
||||
text db "rEEEeee!EEeeeEeEEeE!EEEEEeEEE$eeeEE)EEeEeEEeeeEeEEEEEeeeEeeEeeEeeeeeEeEeEeeE",0
|
||||
section .text
|
||||
global main
|
||||
|
||||
main:
|
||||
sub rsp, 8 ;enter
|
||||
|
||||
mov rdi, text
|
||||
call case_func
|
||||
|
||||
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]
|
||||
mov rdi, text
|
||||
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
|
||||
|
|
28
diff.asm
28
diff.asm
|
@ -3,9 +3,8 @@ extern puts
|
|||
%include "../inc/diff_func.inc"
|
||||
|
||||
section .data
|
||||
tempstore db 0
|
||||
tempstore2 db 0
|
||||
argument_error db "Argument Error!... either too many args or too little please fix", 0
|
||||
text db "REEEEEEEEEE",0
|
||||
text2 db "REEEEEEErEE",0
|
||||
differ db "they differ",0
|
||||
notdiffer db "they do not differ",0
|
||||
section .text
|
||||
|
@ -14,20 +13,8 @@ section .text
|
|||
main:
|
||||
sub rsp, 8 ;enter
|
||||
|
||||
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]
|
||||
mov rdi, text
|
||||
mov rsi, text2
|
||||
call diff_func
|
||||
|
||||
cmp r10b, 1 ;why tf did i make ut r10b as the return like tf?!?!?!?
|
||||
|
@ -48,10 +35,3 @@ _notdiffer:
|
|||
_end:
|
||||
add rsp, 8 ;exit
|
||||
ret
|
||||
|
||||
_argument_error:
|
||||
mov rdi, argument_error
|
||||
cld
|
||||
call puts
|
||||
|
||||
jmp _end
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
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
|
||||
|
||||
|
|
20
length.asm
20
length.asm
|
@ -10,26 +10,17 @@ 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
|
||||
|
||||
|
||||
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]
|
||||
mov rdi, text
|
||||
call length_func
|
||||
mov [testasd], rax
|
||||
|
||||
|
@ -44,10 +35,3 @@ main:
|
|||
_end:
|
||||
add rsp, 8 ;exit
|
||||
ret
|
||||
|
||||
_argument_error:
|
||||
mov rdi, argument_error
|
||||
cld
|
||||
call puts
|
||||
|
||||
jmp _end
|
||||
|
|
Loading…
Reference in a new issue