io.ii
"
for io library functions and file "conv.ii
"
for conversion library functions
// Dynamically allocates size bytes on the heap, consisting of
// a number of elements of elemsize bytes each. The function stores
// the number of allocated elements and returns the address of the
// allocated block.
function _allocate: (int size, int elemsize) -> address
// Concatenates s1 and s2 and returns result string
function _stringcat: (string s1, string s2) -> string
// Compare string s1, s2; return value is 0 if s1 == s2,
// positive if s1 > s2, negative if s1 < s2
function _stringcompare: (string s1, string s2) -> int
// Print message m, then abort program execution
function _icabort: (string m)
hello.ic
, hello.s
call.ic
, call.s
fib.ic
,
fib.s
string.ic
,
string.s
eax
register (not on stack)
eax, ecx, edx
ebx, esi, edi, ebp, esp
nasm
assembler documentation)as
" assembler
(they have the order of operands reversed) Under the cygwin environment, the assembling and linking commands for an assembly file "
file.s
" are:
as -o file.o file.s
ld -o file.exe file.o /lib/crt0.o libic.a -lcygwin -lkernel32The library file
libic.a
is a collection of .o files bundled together, containing the code for the standard modulesio
andconv
that are defined in the language specification, along with run-time support for garbage collection.