picolisp

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

x86-64.sunOs.code.l (705B)


      1 # 19may10
      2 # zonick <nikolai@zobnin.ru>
      3 # (c) Software Lab. Alexander Burger
      4 
      5 # System macros
      6 (code 'errno_A 0)
      7    call ___errno  # Get address of 'errno'
      8    ld A (A)  # Load value
      9    ret
     10 
     11 (code 'errnoC 0)
     12    call ___errno  # Get address of 'errno'
     13    ld (A) C  # Store new value
     14    ret
     15 
     16 (code 'wifstoppedS_F 0)  # WIFSTOPPED
     17    ld A (S I)  # Get status
     18    cmp B `(hex "7F")  # (((status) & 0xff) == 0x7f)
     19    ret
     20 
     21 (code 'wifsignaledS_F 0)  # WIFSIGNALED
     22    ld A (S I)  # Get status
     23    and B `(hex "7F")  # (((status) & 0x7f) + 1) >> 1) > 0)
     24    inc B
     25    shr B 1
     26    ret
     27 
     28 (code 'wtermsigS_A 0)  # WTERMSIG
     29    ld A (S I)  # Get status
     30    and B `(hex "7F")  # ((status) & 0x7f)
     31    zxt
     32    ret
     33 
     34 # vi:et:ts=3:sw=3