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:
Bobbi Webber-Manners
2018-05-18 21:11:53 -04:00
committed by GitHub
parent 3e68d8e58b
commit 42bbb90acf
15 changed files with 19 additions and 14 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -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
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
# 32 bit so sizeof(int*) = sizeof(int) [I am lazy]
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+4 -6
View File
@@ -3637,12 +3637,10 @@ unsigned char docall()
/* Caller must drop the arguments
* pushed to call stack above */
emitldi(argbytes);
emit(VM_DISCARD);
//for (j = 0; j < argbytes; ++j) {
// emit(VM_POPBYTE);
// emit(VM_DROP);
//}
if (argbytes) {
emitldi(argbytes);
emit(VM_DISCARD);
}
} else {
/* Stash pointer to just after the call stmt */
push_return((int) txtPtr);
BIN
View File
Binary file not shown.
-2
View File
@@ -136,8 +136,6 @@ void getln(char *str, unsigned char buflen)
unsigned char j = 0;
#ifdef A2E
unsigned char key;
unsigned char xpos;
unsigned char ypos;
#endif
do {
i = read(0, str + j, 1);
+1 -1
View File
@@ -37,7 +37,7 @@
/* */
/**************************************************************************/
#define VERSIONSTR "0.68"
#define VERSIONSTR "0.69"
void print(char *str);
BIN
View File
Binary file not shown.
+13 -4
View File
@@ -785,12 +785,17 @@ void load()
fp = fopen("bytecode", "r");
while (!feof(fp)) {
ch = fgetc(fp);
//printhexbyte(ch);
//printchar('\n');
memory[pc++] = ch;
/* Print dot for each page */
if (pc%0xff == 0) {
printchar('.');
}
}
fclose(fp);
pc = RTPCSTART;
#ifdef A2E
printchar(7);
#endif
}
int main()
@@ -799,10 +804,14 @@ int main()
#ifdef STACKCHECKS
print("[Stack Checks ON]\n");
#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: ");
load();
print("Done\n");
#ifdef __GNUC__
print(" Done.\n\n");
#endif
#ifdef A2E
videomode(VIDEOMODE_80COL);
clrscr();
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.