
'---------------
'MACRO OPERATORS
'===============

'PARTIAL DEMO / 32bit ASSEMBLER CODING

  type int32i
    int i
  end type

  macro int32i_"move"(a)
    mov eax,a.i
  end macro

  macro int32i_"save"(a)
    mov a.i,eax
  end macro

  macro int32i_"neg"(a)
    mov eax,a.i
    neg eax
  end macro

  macro int32i_"+"(a)
    add eax,a.i
  end macro

  macro int32i_"-"(a)
    sub eax,a.i
  end macro

  macro int32i_"*"(a)
    imul a.i
  end macro

  macro int32i_"/"(a)
    idiv a.i
  end macro
  '  
  function str(int32i*a) as string
    return str(a.i)
  end function

'TESTS
'#recordof int32i_+
'#recordof int32i_/
dim int32i A={1}
dim int32i B={10}
dim int32i C={100}
print str(A)
print str(B)
'#show {
print str(A+B)
'}
print str(C*(A+B))



