mirror of
https://github.com/bobbimanners/EightBall.git
synced 2024-06-15 22:29:27 +00:00
v0.69: Small bug-fixes and improvements
- Compiler: do not emit LDI 0, DISC sequence, which is a no-op. - VM: add GPL info and progress when loading bytecode - Most importantly: a version of Tetris coded in EightBall!
This commit is contained in:
parent
3e68d8e58b
commit
42bbb90acf
BIN
8ball20.prg
BIN
8ball20.prg
Binary file not shown.
BIN
8ball64.prg
BIN
8ball64.prg
Binary file not shown.
BIN
8ballvm20.prg
BIN
8ballvm20.prg
Binary file not shown.
BIN
8ballvm64.prg
BIN
8ballvm64.prg
Binary file not shown.
2
Makefile
2
Makefile
|
@ -13,7 +13,7 @@ APPLECMDR = ~/Desktop/Apple2/AppleCommander-1.3.5.jar
|
||||||
all: eightball eightballvm 8ball20.prg 8ballvm20.prg 8ball64.prg 8ballvm64.prg eightball.system ebvm.system test.d64 test.dsk
|
all: eightball eightballvm 8ball20.prg 8ballvm20.prg 8ball64.prg 8ballvm64.prg eightball.system ebvm.system test.d64 test.dsk
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f eightball eightballvm *.o 8ball20.* 8ball64.* eightball*.s eightball.system test.d64 *.map
|
rm -f eightball eightballvm *.o 8ball20.* 8ball64.* eightball*.s eightball.system test.d64 *.map *.vice
|
||||||
|
|
||||||
eightball.o: eightball.c eightballutils.h eightballvm.h
|
eightball.o: eightball.c eightballutils.h eightballvm.h
|
||||||
# 32 bit so sizeof(int*) = sizeof(int) [I am lazy]
|
# 32 bit so sizeof(int*) = sizeof(int) [I am lazy]
|
||||||
|
|
BIN
ebvm.system
BIN
ebvm.system
Binary file not shown.
|
@ -3637,12 +3637,10 @@ unsigned char docall()
|
||||||
|
|
||||||
/* Caller must drop the arguments
|
/* Caller must drop the arguments
|
||||||
* pushed to call stack above */
|
* pushed to call stack above */
|
||||||
|
if (argbytes) {
|
||||||
emitldi(argbytes);
|
emitldi(argbytes);
|
||||||
emit(VM_DISCARD);
|
emit(VM_DISCARD);
|
||||||
//for (j = 0; j < argbytes; ++j) {
|
}
|
||||||
// emit(VM_POPBYTE);
|
|
||||||
// emit(VM_DROP);
|
|
||||||
//}
|
|
||||||
} else {
|
} else {
|
||||||
/* Stash pointer to just after the call stmt */
|
/* Stash pointer to just after the call stmt */
|
||||||
push_return((int) txtPtr);
|
push_return((int) txtPtr);
|
||||||
|
|
BIN
eightball.system
BIN
eightball.system
Binary file not shown.
|
@ -136,8 +136,6 @@ void getln(char *str, unsigned char buflen)
|
||||||
unsigned char j = 0;
|
unsigned char j = 0;
|
||||||
#ifdef A2E
|
#ifdef A2E
|
||||||
unsigned char key;
|
unsigned char key;
|
||||||
unsigned char xpos;
|
|
||||||
unsigned char ypos;
|
|
||||||
#endif
|
#endif
|
||||||
do {
|
do {
|
||||||
i = read(0, str + j, 1);
|
i = read(0, str + j, 1);
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
/* */
|
/* */
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
#define VERSIONSTR "0.68"
|
#define VERSIONSTR "0.69"
|
||||||
|
|
||||||
void print(char *str);
|
void print(char *str);
|
||||||
|
|
||||||
|
|
BIN
eightballvm
BIN
eightballvm
Binary file not shown.
|
@ -785,12 +785,17 @@ void load()
|
||||||
fp = fopen("bytecode", "r");
|
fp = fopen("bytecode", "r");
|
||||||
while (!feof(fp)) {
|
while (!feof(fp)) {
|
||||||
ch = fgetc(fp);
|
ch = fgetc(fp);
|
||||||
//printhexbyte(ch);
|
|
||||||
//printchar('\n');
|
|
||||||
memory[pc++] = ch;
|
memory[pc++] = ch;
|
||||||
|
/* Print dot for each page */
|
||||||
|
if (pc%0xff == 0) {
|
||||||
|
printchar('.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
pc = RTPCSTART;
|
pc = RTPCSTART;
|
||||||
|
#ifdef A2E
|
||||||
|
printchar(7);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
@ -799,10 +804,14 @@ int main()
|
||||||
#ifdef STACKCHECKS
|
#ifdef STACKCHECKS
|
||||||
print("[Stack Checks ON]\n");
|
print("[Stack Checks ON]\n");
|
||||||
#endif
|
#endif
|
||||||
print("(c)Bobbi, 2018\n\n");
|
print("(c)Bobbi, 2018\n");
|
||||||
|
print("Free Software.\n");
|
||||||
|
print("Licenced under GPL.\n\n");
|
||||||
print("Loading bytecode: ");
|
print("Loading bytecode: ");
|
||||||
load();
|
load();
|
||||||
print("Done\n");
|
#ifdef __GNUC__
|
||||||
|
print(" Done.\n\n");
|
||||||
|
#endif
|
||||||
#ifdef A2E
|
#ifdef A2E
|
||||||
videomode(VIDEOMODE_80COL);
|
videomode(VIDEOMODE_80COL);
|
||||||
clrscr();
|
clrscr();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user