mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
docs
This commit is contained in:
parent
1946acc1d8
commit
2d4f81b071
9
playground/nasm/test.s
Normal file
9
playground/nasm/test.s
Normal file
@ -0,0 +1,9 @@
|
||||
section .text
|
||||
global _start
|
||||
|
||||
_start:
|
||||
int 80h ; Call the kernel
|
||||
|
||||
mov eax,1 ; The system call for exit (sys_exit)
|
||||
mov ebx,0 ; Exit with return code of 0 (no error)
|
||||
int 80h
|
33
playground/nasm/wscript
Normal file
33
playground/nasm/wscript
Normal file
@ -0,0 +1,33 @@
|
||||
#! /usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
import sys
|
||||
|
||||
def configure(conf):
|
||||
conf.load('nasm')
|
||||
try:
|
||||
size = sys.maxint
|
||||
except AttributeError:
|
||||
size = sys.maxsize # python 3.2
|
||||
if size < 4**21:
|
||||
conf.fatal('this example is for 64-bit systems only')
|
||||
|
||||
conf.find_program('ld', var='ASLINK')
|
||||
conf.env.ASLINKFLAGS = ['-s']
|
||||
conf.env.CPPPATH_ST = '-I%s'
|
||||
conf.env.ASFLAGS = ['-f', 'elf64']
|
||||
|
||||
def build(bld):
|
||||
|
||||
bld(
|
||||
features = 'asm asmprogram',
|
||||
source = 'test.s',
|
||||
target = 'asmtest',
|
||||
asflags = ['-f', 'elf64'],
|
||||
includes = '.')
|
||||
|
||||
def disp(ctx):
|
||||
node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
|
||||
ctx.exec_command('%s' % node.abspath(), shell=False)
|
||||
bld.add_post_fun(disp)
|
||||
|
Loading…
Reference in New Issue
Block a user