TITLE "mp1.a by Douglas W. Jones, Feb. 16, 2014" ; -- Example solution to mp1 USE "hawk.h" ; we need this for the ALIGN directive NULL = 0 ; value for NULL pointers INT ARRAY ; export ARRAY to the test program ; all array elements but the last point to items. ARRAY: W ITEM1 ; array[0] W ITEM2 ; array[1] W ITEM3 W ITEM4 ; ... W ITEM5 W ITEM6 ; array[5] W NULL ; array[6] ; -- the records all have the same structure, ; -- so we define an item-making macro: MACRO ITEM =x,=y,text W .+8 H x,y ASCII text,0 ALIGN 4 ENDMAC ITEM1: ITEM 1, 1, "Douglas" ITEM2: ITEM 9, 1, "W." ITEM3: ITEM 12, 1, "Jones" ITEM4: ITEM 6, 2, "Machine" ITEM5: ITEM 14, 2, "Problem" ITEM6: ITEM 22, 2, "1"