-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2abb5c7
commit 8e6105d
Showing
72 changed files
with
1,319 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+6.28 MB
Development Tips/Cool Development In Unity EnormousQuickDarklingbeetle.mp4
Binary file not shown.
Binary file added
BIN
+504 KB
Development Tips/Drag With Mouse Screen Shot 2017-10-10 at 5.03.54 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.43 MB
...gly Worded Comment about Serialization Screen Shot 2017-10-30 at 7.11.26 PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "myLibrary.h" | ||
#include <stdio.h> | ||
int foo(int a) { | ||
printf ("\n"); | ||
if (a < 100) { | ||
printf("Number is: %i\n",a); | ||
for (int i = 0; i < a; i++) { | ||
printf("d"); | ||
} | ||
printf("\n"); | ||
} | ||
else { | ||
printf("Number very large: %i\n",a); | ||
} | ||
return 0; | ||
} | ||
int doo(char * a) { | ||
printf("Hey | %s |\n",a); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#ifndef WHATEVER_H_INCLUDED | ||
#define WHATEVER_H_INCLUDED | ||
int foo(int a); | ||
int doo(char * a); | ||
#endif |
Binary file not shown.
18 changes: 18 additions & 0 deletions
18
asm/Calling C from Asm with Int Parameter/myLibraryExample.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; See Readme for instructions | ||
|
||
global _main | ||
extern _foo | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
|
||
mov rdi, 0x55 ; Use this instead of 'mov rdi, message' | ||
call _foo | ||
add rsp, 8 | ||
ret | ||
|
||
section .data | ||
message: | ||
default rel ; Add 'default rel' under label | ||
db 0x2 |
13 changes: 13 additions & 0 deletions
13
asm/Calling C from Asm with Int Parameter/myLibraryExample.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// -------------------------------------------------- | ||
// gcc -c myLibrary.c -o myLibrary.o | ||
// gcc -c myLibraryExample.c -o example.o | ||
// gcc example.o myLibrary.o -o example | ||
// ./example | ||
// -------------------------------------------------- | ||
|
||
#include "myLibrary.h" | ||
|
||
int main() { | ||
foo(11); | ||
return 0; | ||
} |
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
asm/Calling C from Asm with Int Parameter/myLibraryExample2.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; ------------------------------------------------------------------------------ | ||
; gcc -c myLibrary.c -o myLibrary.o | ||
|
||
; /usr/local/bin/nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
; ------------------------------------------------------------------------------ | ||
|
||
global _main | ||
extern _foo | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
|
||
lea rdi, [message] ; Use this instead of 'mov rdi, message' | ||
call _foo | ||
add rsp, 8 | ||
ret | ||
|
||
section .data | ||
message: | ||
default rel ; Add 'default rel' under label | ||
db "Hola, mundo",0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
To Compile the library: | ||
gcc -c myLibrary.c -o myLibrary.o | ||
|
||
For just the C Example: | ||
Compile | ||
gcc -c myLibraryExample.c -o example.o | ||
Link | ||
gcc example.o myLibrary.o -o example | ||
Run | ||
./example | ||
|
||
For just the Asm Example: | ||
Compile | ||
/usr/local/bin/nasm -f macho64 myLibraryExample.asm | ||
Link | ||
gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o | ||
Run: | ||
./exampleAsm | ||
All: | ||
nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
|
||
Compile the library and CLR the asm: | ||
gcc -c myLibrary.c -o myLibrary.o && nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "myLibrary.h" | ||
#include <stdio.h> | ||
int foo(int a) { | ||
printf("Hey %d\n",a); | ||
return 0; | ||
} | ||
int doo(char * a) { | ||
printf("Hey | %s |\n",a); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#ifndef WHATEVER_H_INCLUDED | ||
#define WHATEVER_H_INCLUDED | ||
int foo(int a); | ||
int doo(char * a); | ||
#endif |
Binary file not shown.
18 changes: 18 additions & 0 deletions
18
asm/Calling C from Asm with String Parameter/myLibraryExample.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; See Readme for instructions | ||
|
||
global _main | ||
extern _doo | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
|
||
lea rdi, [message] ; Use this instead of 'mov rdi, message' | ||
call _doo | ||
add rsp, 8 | ||
ret | ||
|
||
section .data | ||
message: | ||
default rel ; Add 'default rel' under label | ||
db "Hey there, World!",0 |
13 changes: 13 additions & 0 deletions
13
asm/Calling C from Asm with String Parameter/myLibraryExample.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// -------------------------------------------------- | ||
// gcc -c myLibrary.c -o myLibrary.o | ||
// gcc -c myLibraryExample.c -o example.o | ||
// gcc example.o myLibrary.o -o example | ||
// ./example | ||
// -------------------------------------------------- | ||
|
||
#include "myLibrary.h" | ||
|
||
int main() { | ||
foo(11); | ||
return 0; | ||
} |
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
asm/Calling C from Asm with String Parameter/myLibraryExample2.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; ------------------------------------------------------------------------------ | ||
; gcc -c myLibrary.c -o myLibrary.o | ||
|
||
; /usr/local/bin/nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
; ------------------------------------------------------------------------------ | ||
|
||
global _main | ||
extern _foo | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
|
||
lea rdi, [message] ; Use this instead of 'mov rdi, message' | ||
call _foo | ||
add rsp, 8 | ||
ret | ||
|
||
section .data | ||
message: | ||
default rel ; Add 'default rel' under label | ||
db "Hola, mundo",0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
To Compile the library: | ||
gcc -c myLibrary.c -o myLibrary.o | ||
|
||
For just the C Example: | ||
Compile | ||
gcc -c myLibraryExample.c -o example.o | ||
Link | ||
gcc example.o myLibrary.o -o example | ||
Run | ||
./example | ||
|
||
For just the Asm Example: | ||
Compile | ||
/usr/local/bin/nasm -f macho64 myLibraryExample.asm | ||
Link | ||
gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o | ||
Run: | ||
./exampleAsm | ||
All: | ||
nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
|
||
Compile the library and CLR the asm: | ||
gcc -c myLibrary.c -o myLibrary.o && nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "myLibrary.h" | ||
#include <stdio.h> | ||
int foo(int a) { | ||
printf("Hey %d\n",a); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#ifndef WHATEVER_H_INCLUDED | ||
#define WHATEVER_H_INCLUDED | ||
int foo(int a); | ||
#endif |
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
asm/Calling My C Library From Assembly/myLibraryExample.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; ------------------------------------------------------------------------------ | ||
; gcc -c myLibrary.c -o myLibrary.o | ||
|
||
; /usr/local/bin/nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
; ------------------------------------------------------------------------------ | ||
|
||
global _main | ||
extern _foo | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
|
||
lea rdi, [message] ; Use this instead of 'mov rdi, message' | ||
call _foo | ||
add rsp, 8 | ||
ret | ||
|
||
section .data | ||
message: | ||
default rel ; Add 'default rel' under label | ||
db "Hola, mundo",0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// -------------------------------------------------- | ||
// gcc -c myLibrary.c -o myLibrary.o | ||
// gcc -c myLibraryExample.c -o example.o | ||
// gcc example.o myLibrary.o -o example | ||
// ./example | ||
// -------------------------------------------------- | ||
|
||
#include "myLibrary.h" | ||
|
||
int main() { | ||
foo(11); | ||
return 0; | ||
} |
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
asm/Calling My C Library From Assembly/myLibraryExample2.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; ------------------------------------------------------------------------------ | ||
; gcc -c myLibrary.c -o myLibrary.o | ||
|
||
; /usr/local/bin/nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm | ||
; ------------------------------------------------------------------------------ | ||
|
||
global _main | ||
extern _foo | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
|
||
lea rdi, [message] ; Use this instead of 'mov rdi, message' | ||
call _foo | ||
add rsp, 8 | ||
ret | ||
|
||
section .data | ||
message: | ||
default rel ; Add 'default rel' under label | ||
db "Hola, mundo",0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
To Compile the library: | ||
gcc -c myLibrary.c -o myLibrary.o | ||
|
||
To Compile the C Example | ||
gcc -c myLibraryExample.c -o example.o | ||
|
||
To Link the C Example | ||
gcc example.o myLibrary.o -o example | ||
|
||
To Run the C Example | ||
./example | ||
|
||
To Compile the Asm Example | ||
/usr/local/bin/nasm -f macho64 myLibraryExample.asm && gcc -arch x86_64 -o exampleAsm myLibraryExample.o myLibrary.o && ./exampleAsm |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; ------------------------------------------------------------------------------ | ||
; Writes "Hola, mundo" to the console using a C library. Runs on Linux or any | ||
; other system that does not use underscores for symbols in its C library. To | ||
; assemble and run: | ||
; | ||
; /usr/local/bin/nasm -f macho64 hola.asm && gcc -arch x86_64 -o hola hola.o && ./hola | ||
; ------------------------------------------------------------------------------ | ||
|
||
global _main | ||
extern _puts | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
|
||
lea rdi, [message] ; Use this instead of 'mov rdi, message' | ||
call _puts | ||
add rsp, 8 | ||
ret | ||
|
||
section .data | ||
message: | ||
default rel ; Add 'default rel' under label | ||
db "Hola, mundo",0 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
global start | ||
section .text | ||
start: | ||
mov rax, 0x2000004 ; write | ||
mov rdi, 1 ; stdout | ||
mov rsi, msg | ||
mov rdx, msg.len | ||
syscall | ||
mov rax, 0x2000001 ; exit | ||
mov rdi, 0 | ||
syscall | ||
section .data | ||
msg: db "Hello, world!", 10 | ||
.len: equ $ - msg |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
; -------------------------------------------------------- | ||
; nasm -f macho64 hw2.asm && gcc -arch x86_64 -o hw2 hw2.o && ./hw2 | ||
; -------------------------------------------------------- | ||
|
||
|
||
global _main | ||
extern _puts | ||
|
||
section .text | ||
_main: | ||
sub rsp, 8 | ||
lea rdi, [message] ; use lea instead of mov rdi | ||
call _puts | ||
add rsp, 8 | ||
ret | ||
section .data | ||
message: | ||
default rel ; put under label when referencing labeled memory | ||
db "Hola, mundo",0 |
Binary file not shown.
Oops, something went wrong.