Difference between revisions of "CSC231 asm io.inc"
Line 1: | Line 1: | ||
− | < | + | ::<source lang="asm"> |
− | |||
extern read_int, print_int, print_string, print_hex | extern read_int, print_int, print_string, print_hex | ||
extern read_char, print_char, print_nl | extern read_char, print_char, print_nl | ||
Line 31: | Line 30: | ||
call sub_dump_stack | call sub_dump_stack | ||
%endmacro | %endmacro | ||
− | </ | + | </source> |
Latest revision as of 04:49, 9 April 2017
extern read_int, print_int, print_string, print_hex extern read_char, print_char, print_nl extern sub_dump_regs, sub_dump_mem, sub_dump_math, sub_dump_stack %macro dump_regs 1 push dword %1 call sub_dump_regs %endmacro ; ; usage: dump_mem label, start-address, # paragraphs %macro dump_mem 3 push dword %1 push dword %2 push dword %3 call sub_dump_mem %endmacro %macro dump_math 1 push dword %1 call sub_dump_math %endmacro %macro dump_stack 3 push dword %3 push dword %2 push dword %1 call sub_dump_stack %endmacro