home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / FOXPRO / FCT1_12 / FC_MEM.HDR < prev    next >
Text File  |  1990-12-24  |  3KB  |  144 lines

  1. #output Force Tools 1.1 - Memory functions
  2.  
  3. *--- input word from port xx
  4. function int in prototype
  5.    params value int port_adress
  6.  
  7. *--- out word to port xx
  8. procedure out prototype
  9.    params value int port_adress, value int word_value
  10.  
  11. *
  12. * return the segment in memory of a var/field/function/procedure
  13. *
  14. function int seg prototype
  15.    params untyped some_thing
  16.    
  17. *
  18. * return the offset in memory of a var/field/function/procedure
  19. *
  20. function int offs prototype
  21.    params untyped some_thing
  22.    
  23. *
  24. * convert a segment and an offset to a full pointer
  25. *
  26. function long get_ptr prototype
  27.    params value int offs, value int seg
  28.  
  29. *
  30. * return a full pointer to a var/field/function/procedure
  31. *
  32. function long ptr prototype
  33.    params untyped some_thing
  34.    
  35. *
  36. * move bytes in memory
  37. *
  38. procedure move prototype
  39.    params value long source_ptr, value long target_ptr, value uint move_len
  40.    
  41. *
  42. * call a procedure without params wich is an untyped param
  43. *
  44. procedure call_untyped prototype
  45.    params untyped proc_ptr
  46.  
  47. *
  48. * call a procedure / function using a pointer (use proc/func without params)
  49. *
  50. procedure call_ptr prototype
  51.    params value long ptr
  52.    
  53. *
  54. * call a logical function using an untyped param
  55. *
  56. function logical lg_fcall prototype
  57.    params untyped func_ptr
  58.  
  59. *
  60. * jmp to a procedure / function using a pointer (use proc/func without params)
  61. *
  62. procedure jump_ptr prototype
  63.    params value long ptr
  64.  
  65. *
  66. * return a asciiz memory location as a char
  67. *
  68. function char ret_char_ptr prototype
  69.    params value long ptr
  70.    
  71. *
  72. * return a non asciiz memory location as a char
  73. *
  74. function char ret_data_ptr prototype
  75.    params value long ptr, value uint ret_length
  76.    
  77. *
  78. * return a memory location as a byte
  79. *
  80. function byte ret_byte_ptr prototype
  81.    params value long ptr   
  82.    
  83. *
  84. * return a memory location as a int
  85. *
  86. function int ret_int_ptr prototype
  87.    params value long ptr
  88.  
  89. *
  90. * return a memory location as a uint
  91. *
  92. function uint ret_uint_ptr prototype
  93.    params value long ptr
  94.  
  95. *
  96. * return a memory location as a long
  97. *
  98. function long ret_long_ptr prototype
  99.    params value long ptr   
  100.  
  101. *
  102. * return a memory location as a ulong
  103. *
  104. function ulong ret_ulong_ptr prototype
  105.    params value long ptr
  106.  
  107. *
  108. * return a memory location as a real
  109. *
  110. function dbl ret_dbl_ptr prototype
  111.    params value long ptr
  112.    
  113. *
  114. * return a memory location as a date
  115. *
  116. function date ret_date_ptr prototype
  117.    params value long ptr   
  118.  
  119. *
  120. * perform an interrupt using regs_ptr, returns filled regs_ptr and carry_flag
  121. *
  122. procedure interrupt prototype
  123.    params value byte int_no, untyped regs_ptr
  124.    
  125. *--- standard register definition
  126. *
  127. * usage : interrupt(0x??, al), logical carry_flag is set at return
  128.  
  129. vardef extern
  130.    *--- registers
  131.    byte al, ah
  132.    uint ax     based al
  133.    byte bl, bh
  134.    uint bx     based bl
  135.    byte cl, ch
  136.    uint cx     based cl
  137.    byte dl, dh
  138.    uint dx     based dl
  139.    *--- segments / pointers
  140.    uint si, di, bp, ds, es
  141.    logical carry_flag
  142. enddef   
  143.    
  144. * eof - fc_mem.hdr