diff --git a/makefile b/makefile index 7706e72..431581d 100644 --- a/makefile +++ b/makefile @@ -32,12 +32,7 @@ setup: @ echo "Setting up: ~/{${BIN_DIR},${ROMS_DIR}}" @ mkdir -p ~/${BIN_DIR} ~/${ROMS_DIR} -backup: - @ echo "Backing: ./{${BIN_DIR},${ROM_DIR}}/* to ./${BAK_DIR}" - @ cp ${BIN_DIR}/* ${BAK_DIR} - @ cp ${ROM_DIR}/* ${BAK_DIR} - -build: backup ${ROM} +build: ${ROM} @ echo "Building: ./${ROM}*" @ cd ${SRC_DIR} && ${ASM} ${TAL} ../${ROM} @@ -53,14 +48,14 @@ disassemble: build @ echo "Disassembling: ./${ROM}.dis" @ ${EMU} ${DIS} ${ROM} > ${ROM}.dis -install: setup backup build dump symbols disassemble +install: setup build dump symbols disassemble @ echo "Installing: ./{${BIN_DIR},${ROM_DIR}}/* at ~/{${BIN_DIR},${ROMS_DIR}}" @ cp ${BIN_DIR}/* ~/${BIN_DIR} @ cp ${ROM} ~/${ROMS_DIR} test: install @ echo "Testing: ~/${ROM_DIR}/${ID}.rom" - @ echo "~test/routines.tal \n sierpinski" | ${EMU} ${ROM_DIR}/${ID}.rom + @ echo "~test/routines.tal\nsierpinski\nbye" | ${EMU} ${ROM_DIR}/${ID}.rom cli: install @ echo "Running: ~/${BIN_DIR}/${ID}-cli" diff --git a/src/repl/routines.tal b/src/repl/routines.tal index 045b18f..b9af505 100644 --- a/src/repl/routines.tal +++ b/src/repl/routines.tal @@ -102,10 +102,10 @@ [ LIT &in-esc 01 ] ?{ #01 ,&in-esc STR - DUP LIT \r NEQ ?{ + DUPk LIT \r NEQ SWP LIT \n NEQ AND ?{ ,&multiline LDR #00 EQU ,&multiline STR } } - DUP LIT \r NEQ ?{ + DUPk LIT \r NEQ SWP LIT \n NEQ AND ?{ [ LIT &multiline 01 ] ?{ pstr: \reset-console-style \bold \bg-0 \fg-3 \0 ~logger/info/multiline-prompt.tal