#comment This file is part of Z80 Scheme Interpreter Z80 Scheme Interpreter is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Copyright 2007, Spencer Putt #endcomment .echo > "breakpoints.brk" "\n" #define break() .echo >> "breakpoints.brk" $,"\n" .nolist #include "ti83plus.inc" #include "z80ext.inc" .list #include "app.inc" #include "def.inc" #include "fileinput.inc" .defpage 0, "Scheme" start: bcall(_grBufClr) bcall(_clrLCDFull) ld sp,heap + heap_size + stack_size call heap_initialize call symbols_initialize call repl_initialize di call repl_initialize ; Read in primitives ld hl,scheme_primitives call include_file ; First read in the include file ;ld hl,expr1 ;call include_file call do_repl wait_exit: bcall(_getkey) jp exit scheme_primitives = $+96 #import "primitives.ss" .db 0 expr1 = $+96 #import "program.ss" .db 0 exit: ei call heap_deinitialize bjump(_JForceCmdNoChar) ; input ; hl - file pointer ; output ; none include_file: include_file_loop: call next_char jp z,include_file_done push hl ld de,(global_env) xor a call evaluate call repl_print pop hl call next_arg jp z,include_file_loop include_file_done: ret #include "heap.z80" #include "eval.z80" #include "work.z80" #include "env.z80" #include "list.z80" #include "symbol.z80" #include "closure.z80" #include "utilities.z80" #include "math.z80" #include "print.z80" #include "error.z80" #include "repl.z80" #include "fixnum.z80" #include "vector.z80" #include "type.z80" ;; Data #include "keywords.z80" .validate