macro 宏定义¶
语法¶
macro name {parameters}
...
endmacro
范例¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | //z = x + y macro m_add_h_h zh, zl, xh, xl, yh, yl mov A, xl //zl = xl + yl add A, yl mov zl, A mov A, xh //zh = xh + yh + C addc A, yh mov zh, A endmacro cseg //代码段 f_add_h_h: //调用macro宏 m_add_h_h 0x85, 0x84, 0x83, 0x82, 0x81, 0x80 ret //子程序返回 |