001
2006-08-16 20:41:38 UTC
I'm pretty new to assembly and started off by writing an OS, which is
really a wrong decision I think... but hey, there's nothing cooler than
this;) I entered protected mode, set up a GDT and messed up my screen a
little, now I'm programming the PIC.
My problem now is that standard error that NASM cries once in a while
(as seen in my subject) and it occurs with the 'out' instruction,
something I've never used before but I hoped it would work like this,
and... it doesn't... Can anyone please help me out?
This is what causes the problem and it should be in these lines I think
(unless it's a register)...
out 0x20,al ;Initialization Command Word to PIC1
out 0xA0,ah ;Initialization Command Word to PIC2
out al,0x20 ;Remap IRQ 0-7 to Interrupts 32-39
out bh,0x28 ;Remap IRQ 8-15 to Interrupts 40-47
out al,4 ;IRQ2 connection to slave
out bh,2
out al,0x01 ;Architecture and software/hardware-setting
out bh,0x01
out al,0xFF ;Mask all IRQs
really a wrong decision I think... but hey, there's nothing cooler than
this;) I entered protected mode, set up a GDT and messed up my screen a
little, now I'm programming the PIC.
My problem now is that standard error that NASM cries once in a while
(as seen in my subject) and it occurs with the 'out' instruction,
something I've never used before but I hoped it would work like this,
and... it doesn't... Can anyone please help me out?
This is what causes the problem and it should be in these lines I think
(unless it's a register)...
out 0x20,al ;Initialization Command Word to PIC1
out 0xA0,ah ;Initialization Command Word to PIC2
out al,0x20 ;Remap IRQ 0-7 to Interrupts 32-39
out bh,0x28 ;Remap IRQ 8-15 to Interrupts 40-47
out al,4 ;IRQ2 connection to slave
out bh,2
out al,0x01 ;Architecture and software/hardware-setting
out bh,0x01
out al,0xFF ;Mask all IRQs