Assembly 为什么我在汇编中的打印不是在第26行之后打印字符?
我正在学习组装,并成功地解决了我在印刷方面的问题 现在我还有一个问题 我用的是emu8086。我让这段代码使用背景色的空格字符以位打印一个仆从的图像。我设法让它每行打印一张图像,但当它到达第26行时,它停止了打印,出现了“错误中断”的错误 有人能帮我吗 以下是完整的代码:Assembly 为什么我在汇编中的打印不是在第26行之后打印字符?,assembly,emu8086,Assembly,Emu8086,我正在学习组装,并成功地解决了我在印刷方面的问题 现在我还有一个问题 我用的是emu8086。我让这段代码使用背景色的空格字符以位打印一个仆从的图像。我设法让它每行打印一张图像,但当它到达第26行时,它停止了打印,出现了“错误中断”的错误 有人能帮我吗 以下是完整的代码: org 100h name "charchar" org 100h ;buhok line 1 (Grey) mov ax,0B800h mov es,ax mov di,56;<target_addres
org 100h
name "charchar"
org 100h
;buhok line 1 (Grey)
mov ax,0B800h
mov es,ax
mov di,56;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
;buhok line 2
mov ax,0B800h
mov es,ax
mov di,200;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,202;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,208;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,210;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,214;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,216;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,218;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,222;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,226;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,230;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,047 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,234;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,047 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
;buhok line 3
mov ax,0B800h
mov es,ax
mov di,352;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,354;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,356;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,358;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,360;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,362;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,364;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,366;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,092 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,368;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,370;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,372;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,374;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,376;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,378;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,382;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,384;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,386;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,179 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,388;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,47 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,390;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,47 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,392;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,47 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,394;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,47 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,396;<target_address = y*160 + x*2> ; es:di set up
mov ah,00001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,47 ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
........
;line 26 Hand, Body blue
mov ax,0B800h
mov es,ax
mov di,4172;<target_address = y*160 + x*2> ; es:di set up
mov ah,10001000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,' ' ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov al,' ' ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov al,' ' ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov al,' ' ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov ax,0B800h
mov es,ax
mov di,4188;<target_address = y*160 + x*2> ; es:di set up
mov ah,11101000b;<color_attribute_for_whole_string>
; now the print by letter gets here
mov al,' ' ; al = letter, ah = attribute (ax set up)
stosw ; [es:di] = ax, di += 2
mov dl,0 ;X (SCREEN COORDINATE).
mov dh,5 ;Y (SCREEN COORDINATE).
int 10h ;BIOS SCREEN SERVICES.
;FINISH THE PROGRAM PROPERLY.
mov ax,4c00h
int 21h
ret
org 100h
名称“charchar”
组织100小时
;布霍克1号线(灰色)
mov ax,0B800h
斧头
莫夫·迪,56岁;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
;布霍克2号线
mov ax,0B800h
斧头
莫夫迪,200;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,202;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,208;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,210;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,214;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,216;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,218;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,222;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,226;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,230;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,047;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,234;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,047;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
;布霍克3号线
mov ax,0B800h
斧头
莫夫迪,352 ;;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,354;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,356;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,358;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,360;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,362;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,364;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,366;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,092;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,368;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,370;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,372;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,374;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,376;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,378;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
斧头
莫夫迪,382;es:di设置
mov ah,00001000b;
; 现在,通过信件打印到这里
mov al,179;al=字母,ah=属性(ax设置)
stosw;[es:di]=ax,di+=2
mov ax,0B800h
mov dl, 0 ;X (SCREEN COORDINATE).
mov dh, 5 ;Y (SCREEN COORDINATE).
mov ah, 2
int 10h ;BIOS SetCursor.
;line 26 Hand, Body blue
3840 -> 3999 line 25
4000 -> 4159 line 26
4160 -> 4319 line 27 <-- 4172 and 4188 belong here!
mov ax,0B800h
mov es,ax