Re: how to compare the string?



"Eric Ahn" <spamtrap@xxxxxxxxxx> wrote:

>following assember :
>it may be gnu asm?
>
>#define KERNEL_BASE 0xC0000000
>#define KERNEL_CS 0x08
>#define KERNEL_DS 0x10
>
>#define GLOBAL_CODE_SEGMENT (KERNEL_CS)
>#define GLOBAL_DATA_SEGMENT (KERNEL_DS)
>
>
> movl 4*4(%esp),%eax\n\t \
> cmpw $" STR(GLOBAL_CODE_SEGMENT) ",%ax\n\t \
> je notswitched\n\t \
>...
>
>I want to convert nasm syntax.
>
>How can i Change it?

In MASM, it would be this, and I suspect NASM would be the same:

KERNEL_CS equ 08h

mov eax, [esp+4*4]
cmp ax, KERNEL_CS
je notswitched
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.