; Kira Swab ; Assembly Language Programming ; April 2001 nin macro symbolname local end push ecx push edx push ebx push esp push ebp push esi push edi call Readlong mov bx, type symbolname if bx EQ 1 mov symbolname, al jmp end endif if bx EQ 2 mov symbolname, ax jmp end endif if bx EQ 4 mov symbolname, eax jmp end endif echo Error in number input .err exitm end: pop edi pop esi pop ebp pop esp pop ebx pop edx pop ecx endm nout macro symbolname local string pushad mov dx, offset string call writestring popad .data string db "&symbolname", 0 .code endm cin macro form, symbolname, numchars local end push ecx push edx push ebx push esp push ebp push esi push edi if (form) EQ 63h ;; "c" call Readkey mov symbolname, al jmp end endif if (form) EQ 73h ;; "s" mov dx, offset symbolname mov cx, numchars call readstring jmp end endif echo Error with cin. .err exitm end: pop edi pop esi pop ebp pop esp pop ebx pop edx pop ecx endm cout form, symbolname/literal local end local lit pushad if (form) EQ 63h ;;c call readkey mov symbolname, al jmp end endif if (form) EQ 73h ;; s mov dx, offset symbolname call writestring jmp end endif if (form) EQ 6ch ;;l lit db "&literal", 0 mov dx, offset lit call writestring jmp end endif echo Error with cout .err exitm end: popad endm