私はアセンブリを学び、印刷で問題を解決することに成功しましたhere26行目以降のアセンブリでの印刷で文字が印刷されないのはなぜですか?
私は別の質問があります。
私はemu8086を使用しています。私は、このコードは、背景色を持つスペース文字を使用してミニオンのイメージをビット単位で印刷します。私はそれが1行にイメージを印刷させるように管理しましたが、26行目に達したときに印刷が中止され、「間違った割り込み」というエラーがあります。
誰でも助けてくれますか?
はここで全体のコードです:
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
@ Ped7gこちらもお手伝いします。 –
歴史的に、PCのテキストモードは25行に制限されています。 26行目は、ビデオRAMのメモリ範囲の外に(部分的に)あります。 Emu8086はそれがセグメンテーション違反であると考えるかもしれません。ちなみに、最後には「INT 10h」と呼んでいますが、最初に「AH」を2に設定することはありません。 –
80x25の26行とは何ですか?たぶんもっと多くの行を使って他のテキストモードに切り替えることができますか? 80x50のような? https://en.wikipedia.org/wiki/VGA-compatible_text_mode#PC_common_text_modes ... 80x25では「26行目」が存在しないため、達成したいことがわかりません。 – Ped7g