On the Subject of Assembly Code

At least this module doesn’t have you interpreting any code.

On the module, there are 3 displays. The left display will have 8 program “codes”, while the top and right display will show the description and the index of the currently selected current code.

There are 3 stages. For each stage:

  • If there are any Lines of code, Scripting, or Brainf--- modules on the bomb, get the 1st code of the left display.
  • Otherwise, if the number of AA batteries is a multiple of 4, take the 3rd code of the left display.
  • Otherwise*, take the 7th code of the left display.
  • Use the arrow buttons to match the index and the description with the retrieved code according to the list below.
  • Press the top display to submit the current stage. Submitting the 3 stages correctly solves the module.

* If the number of AA batteries is not a multiple of 2, then use the original manual for the solving process.

IndexCodeDescription
0AAAASCII adjust AL after addition
1AADASCII adjust AX before division
2AAMASCII adjust AX after multiplication
3AASASCII adjust AL after subtraction
4ADCAdd with carry
5ADDAdd
6ANDLogical AND
7CALLCall procedure
8CBWConvert byte to word
9CLCClear carry flag
10CLDClear direction flag
11CLIClear interrupt flag
12CMCComplement carry flag
13CMPCompare operands
14CMPSBCompare bytes in memory
15CMPSWCompare words
16CWDConvert word to doubleword
17DAADecimal adjust AL after addition
18DASDecimal adjust AL after subtraction
19DECDecrement by 1
20DIVUnsigned divide
21ESCUsed with floating-point unit
22HLTEnter halt state
23IDIVSigned divide
24IMULSigned multiply
25INInput from port
26INCIncrement by 1
27INTCall to interrupt
28INTOCall to interrupt if overflow
29IRETReturn from interrupt
30JccJump if condition
31JCXZJump if CX is zero
32JMPJump
33LAHFLoad FLAGS into AH register
34LDSLoad pointer using DS
35LEALoad Effective Address
36LESLoad ES with pointer
37LOCKAssert BUS LOCK# signal
38LODSBLoad string byte
39LODSWLoad string word
40LOOPLoop control
41MOVMove
42MOVSBMove byte from string to string
43MOVSWMove word from string to string
44MULUnsigned multiply
45NEGTwo’s complement negation
46NOPNo operation
47NOTNegate the operand, logical NOT
48ORLogical OR
49OUTOutput to port
50POPPop data from stack
51POPFPop FLAGS register from stack
52PUSHPush data onto stack
53PUSHFPush FLAGS onto stack
54RCLRotate left (with carry)
55RCRRotate right (with carry)
56REPxxRepeat MOVS/STOS/CMPS/LODS/SCAS
57RETReturn from procedure
58RETNReturn from near procedure
59RETFReturn from far procedure
60ROLRotate left
61RORRotate right
62SAHFStore AH into FLAGS
63SALShift Arithmetically left (signed shift left)
64SARShift Arithmetically right (signed shift right)
65SBBSubtraction with borrow
66SCASBCompare byte string
67SCASWCompare word string
68SHLShift left (unsigned shift left)
69SHRShift right (unsigned shift right)
70STCSet carry flag
71STDSet direction flag
72STISet interrupt flag
73STOSBStore byte in string
74STOSWStore word in string
75SUBSubtraction
76TESTLogical compare (AND)
77WAITWait until not busy
78XCHGExchange data
79XLATTable look-up translation
80XORExclusive OR