flat assembler
Message board for the users of flat assembler.
Index
> Main > Problem executing code on boot diskette |
Author |
|
LocoDelAssembly 21 Aug 2006, 01:25
Have you noticed that you are using the DOS Int 21 services that are not available at boot time? You should check http://www.ctyme.com/intr/rb-0106.htm or http://www.ctyme.com/intr/rb-0210.htm . Check http://www.ctyme.com/intr/int-10.htm to see all the services that the BIOS provides for text and video handling.
Saludos!! |
|||
21 Aug 2006, 01:25 |
|
fafastrungen 21 Aug 2006, 01:30
I've checked them out, but I didn't realize what you mention.
Thanks a lot, you clarified my mess. |
|||
21 Aug 2006, 01:30 |
|
fafastrungen 21 Aug 2006, 09:04
It's not so clear now, if I build this code portion and write into a boot diskette, it doesn't work. Now I'm using Bios's INT 10 and if I test it on a DOS window it works, but it doesn't works on a boot diskette.
I'd thank any explanation, not just a solution code, I want to understand why this happens. format binary ;use16 org 7C00h ; Int 10 - AH = 0Eh (VIDEO - TELETYPE OUTPUT) ; Escribe un caracter en la posicion del cursor ; actual y actualiza la posicion del cursor ; en AL esta el codigo del caracter a imprimir call .printmsg ; Devuelve el control al DOS mov ah, 4Ch int 21h .printmsg: lea edx, [msg] .start: cmp [edx], byte 0 je .end mov al, byte ptr edx mov ah, 0Eh int 10h add edx, 1 jmp .start .end: ret msg db "Hello world. Using Int 10h", 0 |
|||
21 Aug 2006, 09:04 |
|
LocoDelAssembly 21 Aug 2006, 14:45
Code: format binary use16 org 7C00h ; Int 10 - AH = 0Eh (VIDEO - TELETYPE OUTPUT) ; Escribe un caracter en la posicion del cursor ; actual y actualiza la posicion del cursor ; en AL esta el codigo del caracter a imprimir xor ax, ax push ax pop ds ; Importante porque sino estarias leyendo datos de cualquier parte y no desde 0:7c00h push ax pop es cli mov sp, 7c00h mov ss, ax sti call .printmsg ; Devuelve el control al DOS pero ahora mejor devolvasemoslo al BIOS xor dx, dx ; tal vez no sea necesario int 19h .printmsg: lea edx, [msg] .start: cmp [edx], byte 0 je .end mov al, byte ptr edx mov ah, 0Eh int 10h add edx, 1 jmp .start .end: ret msg db "Hello world. Using Int 10h", 0 Please the next time enclose the code with the tags [code] and [ /code] (without the space) Note that the message "Hello world. Using Int 10h" will be repeated until you remove the floppy disk (because of the Int 19h call). |
|||
21 Aug 2006, 14:45 |
|
fafastrungen 21 Aug 2006, 19:20
Thanks again. DS were missing.
PS: Sorry for the /untags |
|||
21 Aug 2006, 19:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.