编程,将数据12666以十进制的形式在屏幕的8行3列,用绿色显示出来。
答:assume cs:code,ds:data,ss:stack
data segment
db 10 dup (0)
data ends
stack segment
db 16 dup (0)
stack ends
code segment
start:
mov ax,12666
mov bx,data
mov ds,bx
mov si,0
mov bx,stack
mov ss,bx
mov sp,00ah
call dtoc ‘调用数值转换成字符串子程序
mov dh...


- [游客] 我把题目的数据都输入进去 命令也输入进去 得到的这个答案应该是最准确的. 07/28 14:33
- [游客] -r AX=0000 BX=0000 CX=0000 DX=0000 SP=FFEE B 07/28 14:32
- [lwbfq] 只要调试通过了,就是没问题。博主加油! 07/05 13:05
- [martian] 博主实现的divdw子程序不错,作为一个子程序,建议写上注释,传入的参数,返回的数据等 07/03 19:48
- [tomato] 不错!继续加油! 07/03 14:07
- [游客] cs 06/28 23:04
- [游客] 相当ok 06/28 23:03
- [ppt] 对 06/28 20:41
- [ppt] 对. 06/28 20:40
- [love710510] 谢谢,你说的对,是1010h,我把10进制和16进制混用了 06/28 19:12
[2008-07-04 13:48] 实验10编写子程序(3)数值显示
阅读全文 |
评论次数(1) |
浏览次数(792) |
所属类型(汇编作业)
[2008-07-03 17:16] 实验10编写子程序(2)除法溢出
用子程序divdw编程计算1000000/10(f4240/0ah)
答:
assume cs:code,ss:stack
stack segment
db 16 dup (0)
stack ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,0a0h
mov ax,4240h
mov dx,000fh
mov cx,0ah
call divdw
mov ax,4c00h
int 21h
divdw:
push bx
push ax
mov ax,dx
mov dx,0
div cx
mo...
答:
assume cs:code,ss:stack
stack segment
db 16 dup (0)
stack ends
code segment
start:
mov ax,stack
mov ss,ax
mov sp,0a0h
mov ax,4240h
mov dx,000fh
mov cx,0ah
call divdw
mov ax,4c00h
int 21h
divdw:
push bx
push ax
mov ax,dx
mov dx,0
div cx
mo...
阅读全文 |
评论次数(1) |
浏览次数(843) |
所属类型(汇编作业)
[2008-07-03 07:51] 实验10编写子程序(1)
在屏幕的8行3列,用绿色显示data段中的字符串。
答:
assume cs:code
data segment
db 'welcome to masm!',0
data ends
code segment
start:
mov dh,8
mov dl,3
mov cl,2
mov ax,data
mov ds,ax
mov si,0
call show_str
mov ax,4c00h
int 21h
show_str:
push bx
push si
push es
push di
add dl,dl
mov al,dh
mov...
答:
assume cs:code
data segment
db 'welcome to masm!',0
data ends
code segment
start:
mov dh,8
mov dl,3
mov cl,2
mov ax,data
mov ds,ax
mov si,0
call show_str
mov ax,4c00h
int 21h
show_str:
push bx
push si
push es
push di
add dl,dl
mov al,dh
mov...
阅读全文 |
评论次数(1) |
浏览次数(758) |
所属类型(汇编作业)
[2008-06-28 19:33] 检测点10.5(2)
(2)下面的程序执行后,ax和bx中的数值为多少?
assume cs:code
data segment
dw 2 dup (0)
data ends
code segment
start:mov ax,data
mov ss,ax
mov sp,16
mov word ptr ss:[0],offset s
mov ss:[2],cs
call dword ptr ss:[0]
nop
s:mov ax,offset s
sub ax,ss:[0ch]
mov bx,cs
sub bx,ss:[0eh]
code ends
end start
答:ax...
assume cs:code
data segment
dw 2 dup (0)
data ends
code segment
start:mov ax,data
mov ss,ax
mov sp,16
mov word ptr ss:[0],offset s
mov ss:[2],cs
call dword ptr ss:[0]
nop
s:mov ax,offset s
sub ax,ss:[0ch]
mov bx,cs
sub bx,ss:[0eh]
code ends
end start
答:ax...
阅读全文 |
评论次数(1) |
浏览次数(722) |
所属类型(汇编作业)
[2008-06-28 19:23] 检测点10.5答案
(1)下面得程序执行后,ax中的数值为多少?
assume cs:code
stack segment
dw 8 dup (0)
stack ends
code segment
start:mov ax,stack
mov ss,ax
mov sp,16
mov ds,ax
mov ax,0
call word ptr ds:[0eh]
inc ax
inc ax
inc ax
code ends
end start
答:ax中的数值为0003h...
assume cs:code
stack segment
dw 8 dup (0)
stack ends
code segment
start:mov ax,stack
mov ss,ax
mov sp,16
mov ds,ax
mov ax,0
call word ptr ds:[0eh]
inc ax
inc ax
inc ax
code ends
end start
答:ax中的数值为0003h...
阅读全文 |
评论次数(1) |
浏览次数(889) |
所属类型(汇编作业)
[2008-06-28 16:47] 检测点10.4
下面的程序执行后,ax中的数值为多少?
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,6
1000:2 ff d0 call ax
1000:5 40 inc ax
1000:6 mov bp,sp
add ax,[bp]
答:ax中的数值为11...
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,6
1000:2 ff d0 call ax
1000:5 40 inc ax
1000:6 mov bp,sp
add ax,[bp]
答:ax中的数值为11...
阅读全文 |
评论次数(1) |
浏览次数(538) |
所属类型(汇编作业)
[2008-06-28 07:47] 检测点10.3
下面的程序执行后,ax中的数值为多少?
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,0
1000:3 9a 09 00 00 10 call far ptr s
1000:8 40 inc ax
1000:9 58 s:pop ax
add ax,ax
...
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,0
1000:3 9a 09 00 00 10 call far ptr s
1000:8 40 inc ax
1000:9 58 s:pop ax
add ax,ax
...
阅读全文 |
评论次数(4) |
浏览次数(758) |
所属类型(汇编作业)
[2008-06-28 06:34] 检测点10.2答案
下面的程序执行后,ax中的数值为多少?
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,0
1000:3 e8 01 00 call s
1000:6 40 inc ax
1000:7 58 s:pop ax
答:ax中的数值是3...
内存地址 机器码 汇编指令
1000:0 b8 00 00 mov ax,0
1000:3 e8 01 00 call s
1000:6 40 inc ax
1000:7 58 s:pop ax
答:ax中的数值是3...
阅读全文 |
评论次数(2) |
浏览次数(552) |
所属类型(汇编作业)
[2008-06-27 20:38] 检测点10.1答案
补全程序,实现从内存1000:0000处开始执行指令。
assume cs:code
stack segment
db 16 dup (0)
stack ends
code segment
start:mov ax,stack
mov ss,ax
mov sp,16
mov ax,(1000)
push ax
mov ax,(0)
push ax
retf
code ends
end start...
assume cs:code
stack segment
db 16 dup (0)
stack ends
code segment
start:mov ax,stack
mov ss,ax
mov sp,16
mov ax,(1000)
push ax
mov ax,(0)
push ax
retf
code ends
end start...
阅读全文 |
评论次数(1) |
浏览次数(554) |
所属类型(汇编作业)
[2008-06-27 19:33] 实验9答案
assume cs:code,ds:data
data segment
db 'welcome to masm!'
data ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,0b800h
mov es,ax
mov bx,0
mov bp,0
mov cx,10h
s:mov al,ds:[bx]
mov ah,02h
mov es:[0720h+bp],al
mov es:[0721h+bp],ah
mov ah,024h
mov es:[07c0h+bp],al
mov es:[07c1h+...
data segment
db 'welcome to masm!'
data ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,0b800h
mov es,ax
mov bx,0
mov bp,0
mov cx,10h
s:mov al,ds:[bx]
mov ah,02h
mov es:[0720h+bp],al
mov es:[0721h+bp],ah
mov ah,024h
mov es:[07c0h+bp],al
mov es:[07c1h+...
阅读全文 |
评论次数(1) |
浏览次数(647) |
所属类型(汇编作业)
『 查看更多文章 』