I have a problem when compiling my kernel with NASM. The problem is related to interrupt vector routines (SetVector, GetVector).
-- GetVector --
...
mov bx, es:[di] ; put low byte in BX
mov ax, es:[di]+2 ; put high byte in AX
...
-- SetVector --
...
mov word es:[al*4], dx ; put low byte first
mov es:[al*4+2], ds ; put high byte then
...
For these 4 lines, compiler says :
intvec.inc:25: error: invalid combination of opcode and operands
intvec.inc:26: error: invalid combination of opcode and operands
intvec.inc:46: error: invalid combination of opcode and operands
intvec.inc:47: error: invalid combination of opcode and operands
Please H E L P :'(
compiling troubles : part 1
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:compiling troubles : part 1
your syntax for get vector is wrong.
you cannot use the "*4" feature with non-32 registers. only
[es:eax*4] will be allowed.
same as above, plus you cannot have mov <mem>,ds. You should expand it into "mov <reg>,ds ; mov <mem>,<reg>".
Code: Select all
mov bx, [es:di]
mov ax, [es:di+2]
Code: Select all
mov word es:[al*4], dx ; put low byte first
[es:eax*4] will be allowed.
Code: Select all
mov es:[al*4+2], ds ; put high byte then