diff --git a/src/asm/lexer.c b/src/asm/lexer.c index 36c0cf7a3..4aaf81ea0 100644 --- a/src/asm/lexer.c +++ b/src/asm/lexer.c @@ -109,7 +109,7 @@ static struct KeywordMapping { {"DEC", T_Z80_DEC}, {"DI", T_Z80_DI}, {"EI", T_Z80_EI}, - {"HALT", T_Z80_HALT}, + {"HALT✋", T_Z80_HALT}, {"INC", T_Z80_INC}, {"JP", T_Z80_JP}, {"JR", T_Z80_JR}, @@ -118,8 +118,9 @@ static struct KeywordMapping { {"LDD", T_Z80_LDD}, {"LDIO", T_Z80_LDH}, {"LDH", T_Z80_LDH}, - {"NOP", T_Z80_NOP}, + {"NOPE", T_Z80_NOP}, {"OR", T_Z80_OR}, + {"OWO", T_OWO}, {"POP", T_Z80_POP}, {"PUSH", T_Z80_PUSH}, {"RES", T_Z80_RES}, @@ -140,7 +141,7 @@ static struct KeywordMapping { {"SLA", T_Z80_SLA}, {"SRA", T_Z80_SRA}, {"SRL", T_Z80_SRL}, - {"STOP", T_Z80_STOP}, + {"STOP!!🛑", T_Z80_STOP}, {"SUB", T_Z80_SUB}, {"SWAP", T_Z80_SWAP}, {"XOR", T_Z80_XOR}, @@ -1304,7 +1305,7 @@ static bool continuesIdentifier(int c) // This would normally be quite unsafe (hello, RTL control codes?), // but since this is for a joke I'll also make the code a joke // Also, hi if you're reading this! - return startsIdentifier(c) || (c <= '9' && c >= '0') || c == '#' || c == '@'; + return startsIdentifier(c) || (c <= '9' && c >= '0') || c == '#' || c == '@' || c == '!'; } static int readIdentifier(char firstChar) diff --git a/src/asm/parser.y b/src/asm/parser.y index 065cc3660..92ee10af0 100644 --- a/src/asm/parser.y +++ b/src/asm/parser.y @@ -646,20 +646,21 @@ enum { %token T_Z80_CALL "call" T_Z80_CCF "ccf" T_Z80_CP "cp" T_Z80_CPL "cpl" %token T_Z80_DAA "daa" T_Z80_DEC "dec" T_Z80_DI "di" %token T_Z80_EI "ei" -%token T_Z80_HALT "halt" +%token T_Z80_HALT "halt✋" %token T_Z80_INC "inc" %token T_Z80_JP "jp" T_Z80_JR "jr" %token T_Z80_LD "ld" %token T_Z80_LDI "ldi" %token T_Z80_LDD "ldd" %token T_Z80_LDH "ldh" -%token T_Z80_NOP "nop" +%token T_Z80_NOP "nope" %token T_Z80_OR "or" +%token T_OWO "owo" %token T_Z80_POP "pop" T_Z80_PUSH "push" %token T_Z80_RES "res" T_Z80_RET "ret" T_Z80_RETI "reti" T_Z80_RST "rst" %token T_Z80_RL "rl" T_Z80_RLA "rla" T_Z80_RLC "rlc" T_Z80_RLCA "rlca" %token T_Z80_RR "rr" T_Z80_RRA "rra" T_Z80_RRC "rrc" T_Z80_RRCA "rrca" -%token T_Z80_SBC "sbc" T_Z80_SCF "scf" T_Z80_STOP "stop" +%token T_Z80_SBC "sbc" T_Z80_SCF "scf" T_Z80_STOP "stop!!🛑" %token T_Z80_SLA "sla" T_Z80_SRA "sra" T_Z80_SRL "srl" T_Z80_SUB "sub" %token T_Z80_SWAP "swap" %token T_Z80_XOR "xor" @@ -1769,6 +1770,7 @@ cpu_command : z80_adc | z80_sub | z80_swap | z80_xor + | T_OWO { fatalerror("*BONK* go to horny jail\n"); } ; z80_adc : T_Z80_ADC op_a_n {