Page 1 of 1

asm syntax error

Posted: Sat May 20, 2006 9:14 am
by GLneo
hi all, OK, the code mov's something from _running_stack to eax, then mov's it back, but i get: "error: invaled combination of opcode...", i'm not good with asm, but need some for my kernel:

Code: Select all

[BITS 32]

 SECTION .text

 KERNEL_DATA_SEL  equ  0x10

 GLOBAL _curr_task
 GLOBAL _task_timer
 EXTERN _task_timer_c
 EXTERN _running_stack
 EXTERN _TSS

 _task_timer:
    pushad
    push ds
    push es
    push fs
    push gs
    mov ax, 0x10
    mov ds, ax
    mov es, ax
    mov fs, ax
    mov gs, ax
    mov eax, _running_stack
    mov dword [eax], esp
    push eax
    call _task_timer_c
    pop ebx
    test ebx, eax
    je noswitch
    mov _running_stack, ebx <------------- HERE'S THE ERROR!
    cmp dword[ebx], 0x03
    jne notss
    mov ecx, [_TSS]
    mov word [ecx+8], KERNEL_DATA_SEL
    mov edx, [ebx+8]
    add edx, 4096
    mov dword[ecx+4], edx
 notss:
    mov esp, [ebx]
 noswitch:
    pop gs
    pop fs
    pop es
    pop ds
    popad
    iretd
I dont understand what it means?, thx

Re:asm syntax error

Posted: Sat May 20, 2006 9:48 am
by bluecode
GLneo wrote: mov [_running_stack], ebx
I didn't check whether the code makes sense or not :P , but it should assemble now