Routines
Prev:
B9E0
Up:
Map
Next:
B9FB
B9EB: Walking guard: next heading
Used by the routines at
guard_N
,
guard_E
and
guard_S
.
Adds 1 to bits 0 and 1 of +13, wrapping round, and leaves the other bits alone.
next_guard_dir
B9EB
LD A,(IX+$0D)
heading + 1, modulo 4
B9EE
LD C,A
B9EF
INC A
B9F0
AND $03
B9F2
LD B,A
B9F3
LD A,C
B9F4
AND $FC
B9F6
OR B
B9F7
LD (IX+$0D),A
B9FA
RET
Prev:
B9E0
Up:
Map
Next:
B9FB