picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

emu.code.l (805B)


      1 # 13oct12abu
      2 # (c) Software Lab. Alexander Burger
      3 
      4 # System macros
      5 (push '*SysFun
      6    "void errno_A(void) {A.n = (uint64_t)errno;}" )
      7 
      8 (code 'errno_A 0)
      9    cc errno_A()  # Get 'errno' into A
     10    ret
     11 
     12 
     13 (push '*SysFun
     14    "void errnoC(void) {errno = (int)C.n;}" )
     15 
     16 (code 'errnoC 0)
     17    cc errnoC()  # Store 'errno'
     18    ret
     19 
     20 
     21 (push '*SysFun
     22    '"void wifstoppedS_F(void) {Result = !WIFSTOPPED(*(int*)(S.p + 8));}" )
     23 
     24 (code 'wifstoppedS_F 0)  # WIFSTOPPED
     25    cc wifstoppedS_F()
     26    ret
     27 
     28 
     29 (push '*SysFun
     30    '"void wifsignaledS_F(void) {Result = WIFSIGNALED(*(int*)(S.p + 8));}" )
     31 
     32 (code 'wifsignaledS_F 0)  # WIFSIGNALED
     33    cc wifsignaledS_F()
     34    ret
     35 
     36 
     37 (push '*SysFun
     38    '"int wtermsigS_A(void) {return WTERMSIG(*(int*)(S.p + 8));}" )
     39 
     40 (code 'wtermsigS_A 0)  # WTERMSIG
     41    cc wtermsigS_A()
     42    ret
     43 
     44 # vi:et:ts=3:sw=3