| | |
An os whith a menu.
Thread Solved |
hello people. I am doing an "os" (small) that's mainly a menu. It just prints some strings and highlights some words when you pres 1,2 or 3. And by pressing enter while a option is selected, it has to do something.
The problem is that the program gets stuck in the beginning ... and i don't know where is the problem. Can't run a debug because it's a bootable bin file. Can some one please tell me where is the error?
I'm using linux+ nasm
The attachment shows the result of the execution. To me, it looks like he executes init then ;print "sound" then gets stuck. Maybe the function that i use to wait for a char isn't the right one?
The problem is that the program gets stuck in the beginning ... and i don't know where is the problem. Can't run a debug because it's a bootable bin file. Can some one please tell me where is the error?
I'm using linux+ nasm
asm Syntax (Toggle Plain Text)
[BITS 16] jmp 07C0h:start snd db 'Sound' lsnd equ $-snd abt db 'About' labt equ $-abt hlp db 'Help' lhlp equ $-hlp start: is1: call init ;print "sound" mov ax,1300h mov bh,0 mov bl,2 mov cx,lsnd mov dx,0 push cs pop es mov bp,snd int 10h wait_: mov ah,00h int 16h cmp ah,13 je make_sound cmp ah,49 je is1 cmp ah,50 je is2 cmp ah,51 je is3 jmp wait_ is2: call init ;print "About" mov ax,1300h mov bh,0 mov bl,2 mov cx,labt mov dl,5 push cs pop es mov bp,abt int 10h jmp wait_ is3: jmp wait_ make_sound: mov ax, 0E07h xor bx, bx int 10h jmp wait_ init: ;print "sound" mov ax,1300h mov bh,0 mov bl,5 mov cx,lsnd mov dx,0 push cs pop es mov bp,snd int 10h ;print "About" mov ax,1300h mov bh,0 mov cx,labt mov dl,5 push cs pop es mov bp,abt int 10h ;print "Help" mov ax,1300h mov bh,0 mov cx,lhlp mov dl,10 push cs pop es mov bp,hlp int 10h ret times 510-($-$$) db 0 dw 0AA55h
The attachment shows the result of the execution. To me, it looks like he executes init then ;print "sound" then gets stuck. Maybe the function that i use to wait for a char isn't the right one?
Last edited by Alex_; 21 Days Ago at 3:16 am.
Fundamental law of life:
do{ ThingsToDo+=me.CompleteTask(ThingsToDo); }while(ThingsToDo); Die(me);
Law of the Spirit:
do{ Rebuke(me); }while(!me.Repented); LiveEternal(me);
PM me to know more why i wrote this or what it means.
do{ ThingsToDo+=me.CompleteTask(ThingsToDo); }while(ThingsToDo); Die(me);
Law of the Spirit:
do{ Rebuke(me); }while(!me.Repented); LiveEternal(me);
PM me to know more why i wrote this or what it means.
0
#3 21 Days Ago
I don't understand: why not setting BL for an attribute? It works fine for me...
I managed to fix my error,however. I was comparing ah when the character returned was in al. *oops*
I managed to fix my error,however. I was comparing ah when the character returned was in al. *oops*
Fundamental law of life:
do{ ThingsToDo+=me.CompleteTask(ThingsToDo); }while(ThingsToDo); Die(me);
Law of the Spirit:
do{ Rebuke(me); }while(!me.Repented); LiveEternal(me);
PM me to know more why i wrote this or what it means.
do{ ThingsToDo+=me.CompleteTask(ThingsToDo); }while(ThingsToDo); Die(me);
Law of the Spirit:
do{ Rebuke(me); }while(!me.Repented); LiveEternal(me);
PM me to know more why i wrote this or what it means.
![]() |
Similar Threads
- JS jump menu location indexing on search engines (JavaScript / DHTML / AJAX)
- Menu does not work (ASP.NET)
- Right Click Menu Options (Windows NT / 2000 / XP)
- Windows New Menu (Windows NT / 2000 / XP)
- Start up Menu problems (Windows NT / 2000 / XP)
- IE 6.0 doesn't show address bar, pull-down menu and shortcut icons when opened (Web Browsers)
- IE 6.0 doesn't show address bar, pull-down menu & short-cut icons when opened (Windows NT / 2000 / XP)
- Canot get file buttons or menu bars to display in i.e. (Web Browsers)
Other Threads in the Assembly Forum
- Previous Thread: Need help with a mips program
- Next Thread: Beginner SPIM Array help
| Thread Tools | Search this Thread |





