- Code: Select all
.data
HELLO\0
006
sioinit:
mvi a, 003
out 020
mvi a, 021
out 020
016
init:
lxi bc,labeladdr
021
waitforchr:
in 020
rrc
jnc waitforchr
027
chrcmp:
ldax bc
ori 0
jz match
mov d,a
in 021
cmp d
jnz fail
inx bc
jz waitforchr
050
fail:
jmp init
053
match:
jmp match
Assembled:
- Code: Select all
0 1 2 3 4 5 6 7
000: 110 105 114 114 117 000 076 003
010: 323 020 076 021 323 020 001 000
020: 000 333 020 017 322 021 000 012
030: 366 000 312 053 000 127 333 021
040: 272 302 050 000 003 312 021 000
050: 303 016 000 303 053 000
I'm thinking the Altair Clone with its two SIO ports could monitor a serial link to my workstation and look for text-based evidence of an error condition. If it finds it, it'll take some additional action (right now it just sticks itself in a loop at label match:). It'll be the world's coolest dedicated 'grep' machine.