어셈블리를 배우고 있으며 물론 고전적인 0x10 BIOS 인터럽트를 실험하고 있습니다. 내가 보았던 자료는 문자열을 출력하기 위해 lodsb
을 사용하여 보여 주므로, opcode를 이해하기 위해 나는 그것의 동작을 모방하려고합니다. 이것은 lodsb
과 잘 작동하지만, 가지고있는 것과는 다릅니다. 내가 잘못 뭐하는 거지?bios 인터럽트를 통해 인쇄 할 문자열 얻기
start: mov ah, 0Eh ;for bios interrupt mov si, text_string ;set source index to begining of text_string .repeat: ;I'm trying to emulate the behavior of lodsb to learn how it works: mov al, [si] ;put character at si in al register add si, 1 ;increment source index cmp al, 0 ;if the character is a zero (end of the string) je done ;end execution int 10h ;bios interrupt to put character on screen jmp .repeat text_string db 'Hello, World!', 0 done: ret