Page 1 of 1

A problem with MASM!

Posted: Sun Sep 07, 2008 10:51 pm
by VRassouli
Hello every body!
as i'm not really good in assembly language, the problem may be easy to solve, but hard for me:-p
there is a piece of code which i found from a tutorial, it works well on NASM but does not in MASM!
the code is for handling IRQs! in fact, its called on an interrupt

Code: Select all

    pusha

    mov ax, ds
    push eax 

    mov ax, 0x10 ; MASM GENERATES AN ERROR FOR THIS LINE:
                         ; error A2206:missing operator in expression
    mov ds, ax
    mov es, ax
    mov fs, ax
    mov gs, ax

    isr_handler

    pop ebx
    mov ds, bx
    mov es, bx
    mov fs, bx
    mov gs, bx

    popa
    add esp, 8
    sti
    iret 

Re: A problem with MASM!

Posted: Mon Sep 08, 2008 12:59 am
by Combuster
Try:
mov ax, 010h

Re: A problem with MASM!

Posted: Mon Sep 08, 2008 10:52 am
by VRassouli
YEEEEES! that was right! it worked:) Thanks Combuster:)

Re: A problem with MASM!

Posted: Mon Sep 08, 2008 7:12 pm
by Troy Martin
Hey, just so you know, you should use NASM instead of MASM, since developing OSes with MASM is strictly forbidden in the EULA.

Just letting you know :)

Re: A problem with MASM!

Posted: Tue Sep 09, 2008 1:53 am
by AJ
Of course, you mean with MASM :)

Re: A problem with MASM!

Posted: Tue Sep 09, 2008 8:25 pm
by Troy Martin
Whoops... Typo...