Skip to content

Commit

Permalink
I guess I consider myself ready for a release
Browse files Browse the repository at this point in the history
Have a template library for fun
  • Loading branch information
Stvff committed Mar 23, 2022
1 parent c0a4c81 commit 49f3ea9
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
60 changes: 60 additions & 0 deletions aasm_exalib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// This is the template for everything a library needs
#ifndef AASM_EXALIB
#define AASM_EXALIB 3
#include <stdio.h>
#include "aasm_global.h"

//############################################### <example globals>
//############################################### </example globals>
//############################################### <example internal functions>
//############################################### </example internal functions>
//############################################### <example surroundings>
int init_example(GLOBAL* mainptrs){

if(mainptrs->debug == 'v') printf("exalib initted\n");
return 0;
}

int update_example(GLOBAL* mainptrs){

if(mainptrs->debug == 'v') printf("exalib updated\n");
return 0;
}

int free_example(GLOBAL* mainptrs){

if(mainptrs->debug == 'v') printf("exalib freed\n");
return 0;
}

int instructhandler_example(GLOBAL* mainptrs){

if(mainptrs->debug == 'v') printf("exalib instructed\n");
return 0;
}

int argumenthandler_example(GLOBAL* mainptrs){

if(mainptrs->debug == 'v') printf("exalib argumented\n");
return 0;
}

int executehandler_example(GLOBAL* mainptrs){

if(mainptrs->debug == 'v') printf("exalib executed\n");
return 0;
}

int libFuncPtrs_AASM_EXALIB(){
initfuncs[AASM_EXALIB] = &init_example;
instructhandlers[AASM_EXALIB] = &instructhandler_example;
argumenthandlers[AASM_EXALIB] = &argumenthandler_example;
executehandlers[AASM_EXALIB] = &executehandler_example;
updatefuncs[AASM_EXALIB] = &update_example;
freefuncs[AASM_EXALIB] = &free_example;

return 0;
}
//############################################### </example surroundings>

#endif
8 changes: 4 additions & 4 deletions aasm_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

void printversion(){
printf("\n");
// printf(" Arbitrary Assembly pVfa \n");
printf(" Arbitrary Assembly pVfa.ea \n");
printf(" Arbitrary Assembly pVfa \n");
// printf(" Arbitrary Assembly pVfa.fa \n");
printf(" x-------x \n");
printf(" | A r b | \n");
printf(" | A s m | \n");
// printf(" | V f a | \n");
printf(" |pVfa.ea| \n");
printf(" | V f a | \n");
// printf(" |pVfa.fa| \n");
printf(" x-------x \n");
printf(" github.com/StevenClifford/ArbAsm\n\n");
printf(" Libraries:\n");
Expand Down
2 changes: 1 addition & 1 deletion aasm_stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "aasm_global.h"
#include "arbnum.h"

//############################################### </Std globals>
//############################################### <Std globals>
enum CompiletimeConstantsStdlib {
initialstackSize = 64
};
Expand Down

0 comments on commit 49f3ea9

Please sign in to comment.