." serial " voc: serial serial : init vector ; $3F8 constant COM1 $2F8 constant COM2 $3E8 constant COM3 $2E8 constant COM4 COM2 variable: SERIAL-PORT : com# SERIAL-PORT @ ; : received? com# 5 + p1@ 1 and ; : empty? com# 5 + p1@ $20 and ; : read received? if com# p1@ ;then read ; : write empty? if com# p1! ;then write ; : send for dup c@ write 1+ next drop ; loc: : a $0 com# 1 + p1! $80 com# 3 + p1! ; : b $03 com# 0 + p1! $0 com# 1 + p1! ; : c $03 com# 3 + p1! $C7 com# 2 + p1! ; : d $0B com# 4 + p1! ; here is init ] a b c d ; ;loc ^