assume cs:codesegcodeseg segmentdw 1h, 2h, 3h, 4h, 5h, 6h, 7h, 8h, 9hdw 9 dup(?)start:; 设置栈段mov ax, csmov ss, ax; 36 = 9 * 2 * 2mov sp, 36sub bx, bxmov cx, 9
s_push:mov ax, cs:[bx]push axadd bx, 2loop s_pushsub bx, bxmov cx, 9
s_pop:pop cs:[bx]add bx, 2loop s_popmov ah, 4chint 21hcodeseg endsend start
复制代码
转载于:https://juejin.im/post/5a73d7d8f265da4e732e9b7e