flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Comand Line Start Goto page Previous 1, 2, 3, 4 Next |
Author |
|
rhyno_dagreat 10 Oct 2006, 01:11
Okay, inside of this quote I will point to it, it's in interrupts.inc.
rhyno_dagreat wrote: Okay, here it goes: |
|||
10 Oct 2006, 01:11 |
|
Dex4u 10 Oct 2006, 01:13
That ok i found it but you need to do the above
|
|||
10 Oct 2006, 01:13 |
|
Dex4u 10 Oct 2006, 01:15
And weres your Done and ret ?
|
|||
10 Oct 2006, 01:15 |
|
rhyno_dagreat 10 Oct 2006, 01:15
Ah, why's that?
|
|||
10 Oct 2006, 01:15 |
|
rhyno_dagreat 10 Oct 2006, 01:16
Between the PrintFunc and ClrScrn Functions
|
|||
10 Oct 2006, 01:16 |
|
Dex4u 10 Oct 2006, 01:20
That to say you have acknowledged the IRQ.
But it still shoud not fill the screen with 1 etc. |
|||
10 Oct 2006, 01:20 |
|
rhyno_dagreat 10 Oct 2006, 01:24
Well, I did what you said and it's still filling the screen with ones. Is it possibly a bug in BOCHs? I'm not using real hardware yet.
|
|||
10 Oct 2006, 01:24 |
|
Dex4u 10 Oct 2006, 01:32
Where do you unmask irq's ?
|
|||
10 Oct 2006, 01:32 |
|
rhyno_dagreat 10 Oct 2006, 01:35
What do you mean unmask?
|
|||
10 Oct 2006, 01:35 |
|
Dex4u 10 Oct 2006, 01:42
Try changing this
Code: ;disable IRQs mov al, 0FFh out 021h, al ret To this Code: ;disable IRQs mov al,255 ; mask all irqs out 0xa1,al out 0x21,al ret And you should call this Code: unmask_irqs: mov al,0 ; unmask irq's out 0xA1,al out 0x21,al sti ret instead of doing just this Code: sti |
|||
10 Oct 2006, 01:42 |
|
rhyno_dagreat 11 Oct 2006, 01:52
Okay, I'm about to give it a shot
|
|||
11 Oct 2006, 01:52 |
|
rhyno_dagreat 11 Oct 2006, 02:02
I've tried it and it's now flashing two ascii characters in the same place continuously, and when I hit enter it stopped (like it should). But instead of creating an unmask_irqs subroutine, this is what I did:
Code: org 0000h use16 cli mov ax, 0060h mov ds, ax add dword [gdt_descriptor+2], 600h lgdt [gdt_descriptor] mov eax, cr0 or eax, 1 mov cr0, eax jmp 08h:clear_pipe gdt: dd 0, 0 gdt_code: db 0FFh, 0FFh, 0, 0, 0, 10011010b, 11001111b, 0 gdt_data: db 0FFh, 0FFh, 0, 0, 0, 10010010b, 11001111b, 0 gdt_end: gdt_descriptor: dw gdt_end - gdt - 1 dd gdt org 0600h+$ use32 clear_pipe: mov ax, 10h mov ds, ax mov ss, ax mov esp, 090000h ;ACTUAL KERNEL CODE STARTS HERE mov si, WelMsg call PrintFunc call Reroute_PICs lidt [idtp] push ax mov al, 0 out 0A1h, al out 21h, al sti pop ax GetInput: int 0x21 cmp bl, 02 je DoClrScrn jmp GetInput DoClrScrn: call ClrScrn call CmdPrintFunc ;KERNEL CODE ENDS HERE infinite_loop: jmp infinite_loop times 561-($-$$) db 0 include 'interrupts.inc' WelMsg db "Welcome to RhynOS! Press 1 To Continue.", 0 |
|||
11 Oct 2006, 02:02 |
|
Dex4u 11 Oct 2006, 16:41
Note: your IRQ1 should be some thing like this
Code: irq1: pushad push es push ds in al,60h mov byte[scan],al mov al,0x20 out 0x20,al pop ds pop es popad mov al,byte[scan] iret scan db 0 |
|||
11 Oct 2006, 16:41 |
|
rhyno_dagreat 11 Oct 2006, 17:20
At the risk of sounding ignorant, I'm going to ask: What are you doing and why do you need to do it?
|
|||
11 Oct 2006, 17:20 |
|
rhyno_dagreat 11 Oct 2006, 17:22
Oh, and one other thing: You do the pushad and then popad and afterwards you still move scan into al. I thought the reason for pushing stuff on the stack and popping it off was to save the value in the register for later?
|
|||
11 Oct 2006, 17:22 |
|
Dex4u 11 Oct 2006, 17:30
Yes we save all regs, but we need return the scan code, so we put it in al, as that is where it is expected to be returned.
|
|||
11 Oct 2006, 17:30 |
|
rhyno_dagreat 11 Oct 2006, 17:33
Ah, I see... so you did pushad just to save all the other regs in a faster, less bulky manner.
|
|||
11 Oct 2006, 17:33 |
|
Dex4u 11 Oct 2006, 18:52
Yes thats right.
|
|||
11 Oct 2006, 18:52 |
|
rhyno_dagreat 11 Oct 2006, 20:22
Thanks for all the help! I'm gonna try it when I get home.
|
|||
11 Oct 2006, 20:22 |
|
Goto page Previous 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.