about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-08-05 08:25:33 -0700
committerKartik Agaram <vc@akkartik.com>2018-08-05 08:25:33 -0700
commit75eb73e0288b1f75a213707b2e7faafc82f5de8a (patch)
tree97703cba039f9a64d880ffc8975050a904656dc4 /subx
parent3e61fd93a3e31df1ab32c2c1fc1e8b354d410c23 (diff)
downloadmu-75eb73e0288b1f75a213707b2e7faafc82f5de8a.tar.gz
4485
Diffstat (limited to 'subx')
-rw-r--r--subx/034discourage_raw_hex.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/subx/034discourage_raw_hex.cc b/subx/034discourage_raw_hex.cc
index e5393bab..22f45b1d 100644
--- a/subx/034discourage_raw_hex.cc
+++ b/subx/034discourage_raw_hex.cc
@@ -14,8 +14,14 @@ void warn_on_raw_jumps(/*const*/ program& p) {
   for (int i = 0;  i < SIZE(code.lines);  ++i) {
     line& inst = code.lines.at(i);
     if (all_hex_bytes(inst) && has_operands(inst)) {
-      warn << "'" << to_string(inst) << "': using raw hex is not recommended.\n" << end();
+      warn << "'" << to_string(inst) << "': using raw hex is not recommended\n" << end();
       break;
     }
   }
 }
+
+:(scenario warn_on_hex_bytes_without_operands)
+% Hide_warnings = true;
+== 0x1
+bb 2a 00 00 00  # copy 0x2a (42) to EBX
++warn: 'bb 2a 00 00 00': using raw hex is not recommended