2018年1月30日

汇编程序32:检测点10.5(二)

摘要: 1 assume cs:code 2 //推算a程序结束前ax与bx的值,使用call dword ptr指令 3 stack segment 4 dw 8 dup(0) 5 stack ends 6 7 code segment 8 start: 9 mov ax,stack 10 mov ss,ax 11 ... 阅读全文

posted @ 2018-01-30 00:44 叶倾仙 阅读(328) 评论(0) 推荐(0) 编辑

汇编程序31:检测点10.5

摘要: 1 assume cs:code 2 //推算程序结束后ax的值,使用call word ptr指令 3 stack segment 4 dw 8 dup(0) 5 stack ends 6 7 code segment 8 start: 9 mov ax,stack 10 mov ss,ax 11 ... 阅读全文

posted @ 2018-01-30 00:34 叶倾仙 阅读(310) 评论(0) 推荐(0) 编辑

2018年1月29日

汇编程序30:检测点10.4

摘要: 1 assume cs:code 2 //推断程序结束后ax的值,使用call reg指令 3 code segment 4 start: 5 mov ax,6 6 call ax //将IP=5压栈,随后修改IP=ax=6并跳到新CS:IP处 7 inc ax 8 mov bp,sp //... 阅读全文

posted @ 2018-01-29 23:41 叶倾仙 阅读(179) 评论(0) 推荐(0) 编辑

汇编程序29:检测点10.3

摘要: 1 assume cs:code 2 //推断程序结束后ax的值,使用call far ptr指令 3 code segment 4 start: 5 mov ax,0 6 call far ptr s //把CS,IP先后压栈,随后转移到标号处 7 inc ax 8 s: 9 ... 阅读全文

posted @ 2018-01-29 23:33 叶倾仙 阅读(558) 评论(0) 推荐(0) 编辑

汇编程序28:检测点10.2

摘要: 1 assume cs:code 2 //判断程序结束后ax的值,使用call 标号指令 3 code segment 4 start: 5 mov ax,0 6 call s //将IP,6压栈,随后跳到标号处 7 inc ax 8 s: 9 pop ax //将栈顶数据取... 阅读全文

posted @ 2018-01-29 23:23 叶倾仙 阅读(274) 评论(0) 推荐(0) 编辑

汇编程序27:检测点10.1

摘要: 1 assume cs:code,ss:stack 2 //实现retf指令,转移到1000:0处指令 3 stack segment 4 dw 8 dup(0) 5 stack ends 6 7 code segment 8 start: 9 mov ax,stack //自定义栈区,共16字节 10 mov ss,a... 阅读全文

posted @ 2018-01-29 23:19 叶倾仙 阅读(159) 评论(0) 推荐(0) 编辑

汇编程序26:实验9 根据材料编程

摘要: 1 assume cs:code,ds:data,ss:stack 2 3 data segment 4 db 'welcome to masm!' 5 db 02h,24h,71h 6 data ends 7 8 stack segment 9 dw 8 dup(0) 10 stack ends 11 12 code segment 13 ... 阅读全文

posted @ 2018-01-29 21:56 叶倾仙 阅读(150) 评论(0) 推荐(0) 编辑

汇编程序25:实验8(分析一个奇怪的程序)

摘要: 程序大致过程: 首先程序进行编译,使指令段与code segment挂钩,编译结束时ip指向入口处,为0005(这里mov ax,4c00h占3字节,int 21h占2字节) 标号s执行结束后,把标号s2处的程序段机器码EBF6(这里F6是计算前后位移获得,s1标号开始mov ax,0占3字节,in 阅读全文

posted @ 2018-01-29 15:29 叶倾仙 阅读(233) 评论(0) 推荐(0) 编辑

汇编程序24:检测点9.3

摘要: 1 assume cs:code 2 3 code segment 4 start: 5 mov ax,2000h 6 mov ds,ax 7 mov bx,0 8 s: 9 mov cl,[bx] 10 mov ch,0 11 in... 阅读全文

posted @ 2018-01-29 15:16 叶倾仙 阅读(162) 评论(0) 推荐(0) 编辑

汇编程序23:检测点9.2

摘要: 1 assume cs:code 2 3 code segment 4 start: 5 mov ax,2000h 6 mov ds,ax 7 mov bx,0 8 s: 9 mov cl,ds:[bx] 10 mov ch,0 11 ... 阅读全文

posted @ 2018-01-29 15:15 叶倾仙 阅读(135) 评论(0) 推荐(0) 编辑

导航