The Observer
Subscribing fiends to broadcasted ripples in the ethereal plane.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Observer
ARCANUM SCHOOL: Necromancy // Ethereal Whispers
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// BARE METAL ARCHITECTURE RUNE //
section .data
observers dq obs_one, obs_two, 0
section .text
global notify_all
notify_all:
mov rsi, observers
.loop:
mov rax, [rsi]
test rax, rax
jz .done
push rsi
call rax
pop rsi
add rsi, 8
jmp .loop
.done:
ret
obs_one:
ret
obs_two:
ret
The Observer pattern manages a registry of listeners. When the state of the central artifact shifts, a pulse is broadcast, iterating over function pointers and triggering the reactive awakening of every subscribed fiend.
Runic Tags:
#observer
#assembly
#behavioral
#necromancy