Перевод кода NASM в FASM
Код:
[BITS 32]
[EXTERN kernel_main]
[GLOBAL _start]
_start:
mov esp, 0x200000-4
call kernel_main
[EXTERN kernel_main]
[GLOBAL _start]
_start:
mov esp, 0x200000-4
call kernel_main
Код:
format COFF
use32
macro extrn symbol
{
if used symbol
extrn symbol
end if
}
macro global [symbol]
{
local isextrn,isglobal
if defined symbol & ~ defined isextrn
public symbol
else if used symbol & defined isglobal
extrn symbol
isextrn = 1
end if
isglobal = 1
}
extrn kernel_main
global START
START:
call kernel_main
ret
use32
macro extrn symbol
{
if used symbol
extrn symbol
end if
}
macro global [symbol]
{
local isextrn,isglobal
if defined symbol & ~ defined isextrn
public symbol
else if used symbol & defined isglobal
extrn symbol
isextrn = 1
end if
isglobal = 1
}
extrn kernel_main
global START
START:
call kernel_main
ret