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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 19 additions and 14 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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 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]

Binary file not shown.

BIN
eightball

Binary file not shown.

View File

@ -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 */
emitldi(argbytes); if (argbytes) {
emit(VM_DISCARD); emitldi(argbytes);
//for (j = 0; j < argbytes; ++j) { emit(VM_DISCARD);
// 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);

Binary file not shown.

View File

@ -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);

View File

@ -37,7 +37,7 @@
/* */ /* */
/**************************************************************************/ /**************************************************************************/
#define VERSIONSTR "0.68" #define VERSIONSTR "0.69"
void print(char *str); void print(char *str);

Binary file not shown.

View File

@ -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();

BIN
test.d64

Binary file not shown.

BIN
test.dsk

Binary file not shown.