; ; gates for both 16-bit and 32-bit code ; UserGateVm MACRO gate_nr db 0Fh db 0Bh cmpsw dw gate_nr ENDM UserGate16 MACRO gate_nr db 9Ah dw 0 dw 2003h + (gate_nr SHL 4) ENDM UserGate32 MACRO gate_nr db 66h db 9Ah dw 0 dw 200Bh + (gate_nr SHL 4) ENDM UserGateForce32 MACRO gate_nr db 9Ah dw 0 dw 200Bh + (gate_nr SHL 4) ENDM UserGate MACRO gate_nr IF GateSize EQ 16 UserGate16 gate_nr ELSE IF GateSize EQ 32 UserGate32 gate_nr ELSE UserGateVm gate_nr ENDIF ENDIF ENDM ; EAX ANTAL BYTE ; ES LINEAR BASE ADDRESS AllocateDosMem MACRO UserGate allocate_dos_mem_nr ENDM ; EAX ANTAL BYTE ; ES LINEAR BASE ADDRESS AllocateLocalMem MACRO UserGate allocate_local_mem_nr ENDM ; EAX ANTAL BYTE ; ES LINEAR BASE ADDRESS AllocateMem MACRO UserGate allocate_mem_nr ENDM ; EAX ANTAL BYTE ; ES LINEAR BASE ADDRESS AllocateStackMem MACRO UserGate allocate_stack_mem_nr ENDM ; ES SELECTOR FreeMem MACRO UserGate free_mem_nr ENDM ; EAX SIZE ; EDX FLAT OFFSET ADDRESS AllocateFlatLinear MACRO UserGate allocate_flat_linear_nr ENDM ; EAX SIZE ; EDX FLAT OFFSET ADDRESS FreeFlatLinear MACRO UserGate free_flat_linear_nr ENDM ; EAX SIZE ; EDX FLAT OFFSET ADDRESS ; NC OK ReserveFlatLinear MACRO UserGate reserve_flat_linear_nr ENDM ; EAX ANTAL BYTE ; EDX FLAT OFFSET ADDRESS SetFlatLinearValid MACRO UserGate set_flat_linear_valid_nr ENDM ; EAX ANTAL BYTE ; EDX FLAT OFFSET ADDRESS SetFlatLinearInvalid MACRO UserGate set_flat_linear_invalid_nr ENDM ; EAX ANTAL BYTE ; EDX FLAT OFFSET ADDRESS SetFlatLinearRead MACRO UserGate set_flat_linear_read_nr ENDM ; EAX ANTAL BYTE ; EDX FLAT OFFSET ADDRESS SetFlatLinearReadWrite MACRO UserGate set_flat_linear_readwrite_nr ENDM ; EAX ANTAL BYTE AvailableLocalLinear MACRO UserGate available_local_linear_nr ENDM ; EAX ANTAL BYTE UsedLocalLinear MACRO UserGate used_local_linear_nr ENDM ; EAX ANTAL BYTE AvailableVMLinear MACRO UserGate available_vm_linear_nr ENDM ; EAX ANTAL BYTE UsedVMLinear MACRO UserGate used_vm_linear_nr ENDM ; AX ANTAL MILLISEKUNDER WaitMilliSec MACRO UserGate wait_milli_nr ENDM ; AX ANTAL MIKROSEKUNDER WaitMicroSec MACRO UserGate wait_micro_nr ENDM ; EDX:EAX TIDPUNKT F™R ¸TERSTART WaitUntil MACRO UserGate wait_until_nr ENDM ; ES:(E)DI NAMN P¸ MAILBOX ; BX MAILBOX ID OpenLocalMailbox MACRO UserGate open_local_mailbox_nr ENDM ; ES:(E)DI NAMN P¸ MAILBOX ; BX MAILBOX ID OpenGlobalMailbox MACRO UserGate open_global_mailbox_nr ENDM ; AL NODE # ; ES:(E)DI NAMN P¸ MAILBOX ; BX MAILBOX ID OpenNetMailbox MACRO UserGate open_net_mailbox_nr ENDM ; BX MAILBOX ID CloseMailbox MACRO UserGate close_mailbox_nr ENDM ; BX MAILBOX ID ; ES:(E)DI ADDRESS OF MAIL ; CX SIZE OF MAIL SendMailbox MACRO UserGate send_mailbox_nr ENDM ; BX MAILBOX ID ; ES:(E)DI ADDRESS OF MAIL ReceiveMailbox MACRO UserGate receive_mailbox_nr ENDM ; ES:DI MAILBOX NAME ; AL NODE # ; BX MAILBOX ID ReplyNetMailbox MACRO UserGate reply_net_mailbox_nr ENDM ; BX PSP SELECTOR GetPspSel MACRO UserGate get_psp_sel_nr ENDM ; AL PRIORITET ; AH MODE, 0=PM, 1=VM ; (E)CX STACK SIZE ; DS:(E)SI ADDRESS TO START AT ; ES:(E)DI PROCESS NAME CreateProcess MACRO UserGate create_process_nr ENDM ; AL PRIORITET ; AH MODE, 0=PM, 1=VM ; (E)CX STACK SIZE ; DS:(E)SI ADDRESS TO START AT ; ES:(E)DI THREAD NAME CreateThread MACRO UserGate create_thread_nr ENDM TerminateThread MACRO UserGate terminate_thread_nr ENDM ; AX AKTUELL TR¸D GetThread MACRO UserGate get_thread_nr ENDM ; ES:(E)DI STATE RETURNED ; AX THREAD # ; NC THREAD EXISTS GetState MACRO UserGate get_state_nr ENDM ; AX THREAD # ; NC PAUSED Pause MACRO UserGate pause_nr ENDM ; ES:(E)DI TSS DATA RETURNED ; AX THREAD ID GetDebugTss MACRO UserGate get_debug_tss_nr ENDM ; AX THREAD ID GetDebugThread MACRO UserGate get_debug_thread_nr ENDM ; BX THREAD ID ; AX SELECTOR / ORDINAL SEGMENT # TranslateSymbolSegment MACRO UserGate translate_symbol_segment_nr ENDM ; BX THREAD ID ; AX FILE HANDLE GetSymbolHandle MACRO UserGate get_symbol_handle_nr ENDM ; BX THREAD ID ; ES SYMBOL DIR ; CX NUMBER OF DIRS GetSymbolDirs MACRO UserGate get_symbol_dir_nr ENDM ; BX THREAD ID ; ES SYMBOL SEGMENTS ; CX NUMBER OF SEGMENTS GetSymbolSegments MACRO UserGate get_symnol_segment_nr ENDM ; BX THREAD ID ; ES SYMBOL LINES ; CX NUMBER OF LINENUMBERS GetSymbolLines MACRO UserGate get_symnol_line_nr ENDM ; BX THREAD ID ; ES SYMBOL PROCEDURES ; CX NUMBER OF PROCEDURES GetSymboProcedures MACRO UserGate get_symnol_procedure_nr ENDM ; BX THREAD ID ; ES SYMBOL TYPES ; CX NUMBER OF TYPES GetSymboTypes MACRO UserGate get_symnol_type_nr ENDM DebugTrace MACRO UserGate debug_trace_nr ENDM DebugPace MACRO UserGate debug_pace_nr ENDM DebugGo MACRO UserGate debug_go_nr ENDM DebugNext MACRO UserGate debug_next_nr ENDM ; ES:(E)DI NAME OF SECTION InitSection MACRO section mov section.cs_value,0 mov section.cs_list,0 ENDM EnterSection MACRO section LOCAL enter_section_done sub section.cs_value,1 jc enter_section_done push esi lea esi,section UserGate enter_section_nr pop esi enter_section_done: ENDM LeaveSection MACRO section LOCAL leave_section_done add section.cs_value,1 jc leave_section_done push esi lea esi,section UserGate leave_section_nr pop esi leave_section_done: ENDM InitReadWriteSection MACRO section mov section.ssync_value,0 mov section.ssync_list,0 mov section.sread_value,0 mov section.swrite_value,0 mov section.swrite_list,0 ENDM EnterReadSection MACRO section LOCAL enter_sync_ok,enter_read_ok,enter_read_do sub section.ssync_value,1 jc enter_sync_ok push esi mov esi,OFFSET section.ssync_value UserGate enter_section_nr pop esi enter_sync_ok: sub section.sread_value,1 jnc enter_read_ok sub section.swrite_value,1 jc enter_read_ok push esi mov esi,OFFSET section.swrite_value UserGate enter_section_nr pop esi enter_read_ok: add section.ssync_value,1 jc enter_read_done push esi mov esi,OFFSET section.ssync_value UserGate leave_section_nr pop esi enter_read_done: ENDM LeaveReadSection MACRO section LOCAL leave_sync_ok,leave_read_ok,leave_read_do sub section.ssync_value,1 jc leave_sync_ok push esi mov esi,OFFSET section.ssync_value UserGate leave_section_nr pop esi leave_sync_ok: add section.sread_value,1 jnc leave_read_ok add section.swrite_value,1 jc leave_read_ok push esi mov esi,OFFSET section.swrite_value UserGate leave_section_nr pop esi leave_read_ok: add section.ssync_value,1 jc leave_read_done push esi mov esi,OFFSET section.ssync_value UserGate leave_section_nr pop esi leave_read_done: ENDM EnterWriteSection MACRO section LOCAL enter_section_done sub section.swrite_value,1 jc enter_section_done push esi mov esi,OFFSET section.swrite_value UserGate enter_section_nr pop esi enter_section_done: ENDM LeaveWriteSection MACRO section LOCAL leave_section_done add section.swrite_value,1 jc leave_section_done push esi mov esi,OFFSET section.swrite_value UserGate leave_section_nr pop esi leave_section_done: ENDM ; DS:ESI SECTION DATA ; FS:EDI LIST LeaveSectionSleep MACRO UserGate leave_section_sleep_nr ENDM InitFarSection MACRO seg, section mov seg:section.cs_value,0 mov seg:section.cs_list,0 ENDM EnterFarSection MACRO seg, section LOCAL enter_section_done sub seg:section.cs_value,1 jc enter_section_done push ds push esi mov si,seg mov ds,si lea esi,seg:section UserGate enter_section_nr pop esi pop ds enter_section_done: ENDM LeaveFarSection MACRO seg, section LOCAL leave_section_done add seg:section.cs_value,1 jc leave_section_done push ds push esi mov si,seg mov ds,si lea esi,seg:section UserGate leave_section_nr pop esi pop ds leave_section_done: ENDM Swap MACRO UserGate swap_nr ENDM ; AL EXCEPTION NR ; ES:(E)DI EXCEPTION PROCEDURE GetException MACRO UserGate get_exception_nr ENDM ; AL EXCEPTION NR ; ES:(E)DI EXCEPTION PROCEDURE SetException MACRO UserGate set_exception_nr ENDM ; AL INT NR ; ES:(E)DI INT PROCEDURE GetPMInt MACRO UserGate get_pm_int_nr ENDM ; AL INT NR ; ES:(E)DI INT PROCEDURE SetPMInt MACRO UserGate set_pm_int_nr ENDM ; AL INT NUMMER ; DX:BX ADDRESS GetVMInt MACRO UserGate get_vm_int_nr ENDM ; DX:BX ADDRESS ; AL INT NUMMER SetVMInt MACRO UserGate set_vm_int_nr ENDM ; AL INT NUMBER ; CX WORDS TO COPY ; DS:(E)SI OFFSET TO PARAMETERS ; ES:(E)DI OFFSET TO VM_CALL_STRUC DpmiInt MACRO UserGate dpmi_int_nr ENDM ; CX WORDS TO COPY ; DS:(E)SI OFFSET TO PARAMETERS ; ES:(E)DI OFFSET TO VM_CALL_STRUC DpmiCallInt MACRO UserGate dpmi_call_int_nr ENDM ; CX WORDS TO COPY ; DS:(E)SI OFFSET TO PARAMETERS ; ES:(E)DI OFFSET TO VM_CALL_STRUC DpmiCall MACRO UserGate dpmi_call_nr ENDM ; DS:(E)SI CALLBACK PROCEDURE ; ES:(E)DI OFFSET TO VM_CALL_STRUC ; DX:AX VM CALL ADDRESS AllocateVMCallback MACRO UserGate allocate_vm_callback_nr ENDM ; DX:AX VM CALL ADDRESS FreeVMCallback MACRO UserGate free_vm_callback_nr ENDM ; EDX:EAX System time GetSystemTime MACRO UserGate get_system_time_nr ENDM ; EDX:EAX Real time GetTime MACRO UserGate get_time_nr ENDM ; EDX:EAX Real time / System time TimeToSystemTime MACRO UserGate time_to_system_time_nr ENDM ; EDX:EAX System time / Real time SystemTimeToTime MACRO UserGate system_time_to_time_nr ENDM ; DX YEAR ; CH MONTH ; AL DAYS IN MONTH DaysInMonth MACRO UserGate days_in_month_nr ENDM ; DX YEAR ; CH MONTH ; CL DAY ; BH HOUR ; BL MINUTE ; AH SECONDS AdjustTime MACRO UserGate adjust_time_nr ENDM ; DX YEAR ; CH MONTH ; CL DAY ; AX ANTAL DAGAR PassedDays MACRO UserGate passed_days_nr ENDM ; DX YEAR ; CH MONTH ; CL DAY ; BH HOUR ; BL MINUTE ; AH SECONDS ; EDX:EAX BINARY TIME TimeToBinary MACRO UserGate time_to_binary_nr ENDM ; DX YEAR ; CH MONTH ; CL DAY ; BH HOUR ; BL MINUTE ; AH SECONDS ; EDX:EAX BINARY TIME BinaryToTime MACRO UserGate binary_to_time_nr ENDM ; AL CHAR ; AH ATTRIBUTE ; DL ROW ; DH KOLUMN DisplayChar MACRO UserGate display_char_nr ENDM SetTextMode MACRO UserGate set_text_mode_nr ENDM TextMode MACRO UserGate text_mode_nr ENDM SetVgaMode MACRO UserGate set_vga_mode_nr ENDM ; AL Page number SetPage MACRO UserGate set_page_nr ENDM ShowMouse MACRO UserGate show_mouse_nr ENDM HideMouse MACRO UserGate hide_mouse_nr ENDM ; CX x ; DX y GetMousePosition MACRO UserGate get_mouse_position_nr ENDM ; CX x ; DX y SetMousePosition MACRO UserGate set_mouse_position_nr ENDM ; AX start x ; BX start y ; CX end x ; DX end y SetMouseWindow MACRO UserGate set_mouse_window_nr ENDM ; CX mickeys in x-direction ; DX mickeys in y-direction SetMouseMickey MACRO UserGate set_mouse_mickey_nr ENDM ; NC button is pressed GetLeftButton MACRO UserGate get_left_button_nr ENDM ; NC button is pressed GetRightButton MACRO UserGate get_right_button_nr ENDM ; CX x ; DX y GetLeftButtonPressPosition MACRO UserGate get_left_button_press_position_nr ENDM ; CX x ; DX y GetRightButtonPressPosition MACRO UserGate get_right_button_press_position_nr ENDM ; CX x ; DX y GetLeftButtonReleasePosition MACRO UserGate get_left_button_release_position_nr ENDM ; CX x ; DX y GetRightButtonReleasePosition MACRO UserGate get_right_button_release_position_nr ENDM ; CX Column number (x) ; DX Row number (y) SetCursorPosition MACRO UserGate set_cursor_position_nr ENDM ; CX Column number (x) ; DX Row number (y) GetCursorPosition MACRO UserGate get_cursor_position_nr ENDM ; AL Color number SetForeColor MACRO UserGate set_forecolor_nr ENDM ; AL Color number. 0FFh is transparent SetBackColor MACRO UserGate set_backcolor_nr ENDM ; AX Requested font height SetFont MACRO UserGate set_font_nr ENDM ; AL Char to ask about ; CX Width of char GetCharWidth MACRO UserGate get_char_width_nr ENDM ; ES:E(DI) String to ask about ; CX Width of string GetStringWidth MACRO UserGate get_string_width_nr ENDM ; AX start x ; BX start y ; CX end x ; DX end y FillRect MACRO UserGate fill_rect_nr ENDM ; AX start x ; BX start y ; CX end x ; DX end y ; ES:EDI bitmap DrawMono MACRO UserGate draw_mono_nr ENDM ; AL char ; CX x position ; DX y position DrawChar MACRO UserGate draw_char_nr ENDM ; CX x position ; DX y position ; ES:(E)DI String to draw DrawString MACRO UserGate draw_string_nr ENDM ; AL Char WriteChar MACRO UserGate write_char_nr ENDM ; ES:DI Null terminerad str„ng WriteAsciiz MACRO UserGate write_asciiz_nr ENDM ; ES:DI Str„ng ; CX Antal tecken WriteSizeString MACRO UserGate write_size_string_nr ENDM ; AX = CHAR ReadKeyboard MACRO UserGate read_keyboard_nr ENDM ; NC CHAR IN BUFFER ; CY BUFFER EMPTY PollKeyboard MACRO UserGate poll_keyboard_nr ENDM FlushKeyboard MACRO UserGate flush_keyboard_nr ENDM ; (E)CX NUMBER OF CHARS ; ES:(E)DI BUFFER ; (E)AX NUMBER OF CHARS READ ReadConsole MACRO UserGate read_con_nr ENDM ; AL SWITCH KEY EnableFocus MACRO UserGate enable_focus_nr ENDM ; AL SWITCH KEY SetFocus MACRO UserGate set_focus_nr ENDM ; ; gates for 16-bit code ; RawSwitch MACRO UserGate raw_switch_nr ENDM DpmiSaveRestore MACRO UserGate save_restore_nr ENDM ; AX EVENT NR ; DS:DI NAME OF EVENT RegisterEvent MACRO UserGate register_event_nr ENDM ; CX SIZE OF EVENT LIST SEG InitEventThread MACRO UserGate init_event_thread_nr ENDM ; AX EVENT_NR ; BX HANDLE / ID RegisterEventThread MACRO UserGate register_event_thread_nr ENDM WaitEvent MACRO UserGate wait_event_nr ENDM ; AX EVENT NR ; EDX DATA GlobalEvent MACRO UserGate global_event_nr ENDM ; AX EVENT NR ; BX THREAD ID ; EDX DATA FireEvent MACRO UserGate fire_event_nr ENDM LockCd MACRO UserGate lock_cd_nr ENDM UnlockCd MACRO UserGate unlock_cd_nr ENDM EjectCd MACRO UserGate eject_cd_nr ENDM InsertCd MACRO UserGate insert_cd_nr ENDM ; ES:(E)DI Buffer of data to send SendSerial MACRO UserGate send_serial_nr ENDM ; ES:(E)DI Buffer for received data ReceiveSerial MACRO UserGate receive_serial_nr ENDM ResetSerial MACRO UserGate reset_serial_nr ENDM ; AL NODE # GetSerialNode MACRO UserGate get_serial_node_nr ENDM ; AL Serial state GetSerialState MACRO UserGate get_serial_state_nr ENDM ; AL Serial activity GetSerialActivity MACRO UserGate get_serial_activity_nr ENDM ; ES Serial mail received ReceiveSerialMail MACRO UserGate receive_serial_mail_nr ENDM ; DS:SI NAME OF FILE ; ES:DI PARAMETER BLOCK ; NC OK ; CY FAIL LoadExe MACRO UserGate load_exe_nr ENDM ; ES:DI NAME OF FILE SpawnExe MACRO UserGate spawn_exe_nr ENDM ; ES:DI NAME OF DLL FILE ; BX HANDLE OF DLL LoadDll MACRO UserGate load_dll_nr ENDM ; BX HANDLE OF DLL FreeDll MACRO UserGate free_dll_nr ENDM ; IN AL DRIVE NR ; OUT EAX FREE UNITS ; OUT CX BYTES / UNIT ; OUT EDX TOTAL # OF UNITS ; OUT NC SUCCESS GetDriveInfo MACRO UserGate get_drive_info_nr ENDM ; IN AL DRIVE NR SetCurDrive MACRO UserGate set_cur_drive_nr ENDM ; OUT AL DRIVE NR GetCurDrive MACRO UserGate get_cur_drive_nr ENDM ; IN ES:(E)DI PATH NAME SetCurDir MACRO UserGate set_cur_dir_nr ENDM ; IN AL DRIVE ; IN ES:(E)DI PATH NAME GetCurDir MACRO UserGate get_cur_dir_nr ENDM ; IN ES:(E)DI PATH NAME MakeDir MACRO UserGate make_dir_nr ENDM ; IN ES:(E)DI PATH NAME RemoveDir MACRO UserGate remove_dir_nr ENDM ; IN DS:(E)SI CURRENT NAME ; IN ES:(E)DI NEW NAME RenameFile MACRO UserGate rename_file_nr ENDM ; IN ES:(E)DI PATH NAME DeleteFile MACRO UserGate delete_file_nr ENDM ; IN ES:(E)DI PATH NAME ; IN CX FILE ATTRIBUTE GetFileAttribute MACRO UserGate get_file_attribute_nr ENDM ; IN ES:(E)DI PATH NAME ; IN CX FILE ATTRIBUTE SetFileAttribute MACRO UserGate set_file_attribute_nr ENDM ; IN ES:(E)DI PATH NAME ; OUT BX HANDLE TO DIR OpenDir MACRO UserGate open_dir_nr ENDM ; IN BX HANDLE TO DIR CloseDir MACRO UserGate close_dir_nr ENDM ; IN BX HANDLE TO DIR ; IN DX ENTRY # ; IN CX MAX SIZE OF FILENAME ; IN ES:(E)DI BUFFER ; OUT ECX FILE SIZE ; OUT BX FILE ATTRIBUTE ; OUT EDX:EAX FILE TIME/DATE ReadDir MACRO UserGate read_dir_nr ENDM ; IN ES:(E)DI FILENAME ; IN CL ACCESS CODE ; OUT BX FILE HANDLE OpenFile MACRO UserGate open_file_nr ENDM ; IN ES:(E)DI FILENAME ; IN CX ATTRIBUTE ; OUT BX HANDLE CreateFile MACRO UserGate create_file_nr ENDM ; IN BX HANDLE CloseFile MACRO UserGate close_file_nr ENDM ; IN AX OLD FILE HANDLE ; OUT BX NEW FILE HANDLE DuplFile MACRO UserGate dupl_file_nr ENDM ; IN BX HANDLE ; OUT DX DEVICE DATA GetIoctlData MACRO UserGate get_ioctl_data_nr ENDM ; IN BX HANDLE ; OUT EAX FILE SIZE GetFileSize MACRO UserGate get_file_size_nr ENDM ; IN BX HANDLE ; IN EAX FILE SIZE SetFileSize MACRO UserGate set_file_size_nr ENDM ; IN BX HANDLE ; IN EAX FILE POSITION GetFilePos MACRO UserGate get_file_pos_nr ENDM ; IN BX HANDLE ; IN EAX FILE POSITION SetFilePos MACRO UserGate set_file_pos_nr ENDM ; IN BX FILE HANDLE ; OUT EDX:EAX CURRENT FILE TIME GetFileTime MACRO UserGate get_file_time_nr ENDM ; IN BX FILE HANDLE ; IN EDX:EAX CURRENT FILE TIME SetFileTime MACRO UserGate set_file_time_nr ENDM ; IN ES:(E)DI BUFFER ; IN BX HANDLE ; IN (E)CX NUMBER OF BYTES TO READ ; OUT (E)AX NUMBER OF BYTES READ ReadFile MACRO UserGate read_file_nr ENDM ; IN ES:(E)DI BUFFER ; IN BX HANDLE ; IN (E)CX NUMBER OF BYTES TO WRITE ; OUT (E)AX NUMBER OF BYTES WRITTEN WriteFile MACRO UserGate write_file_nr ENDM ; DX PRINTER # ; NC OK InitPrinter MACRO UserGate init_printer_nr ENDM ; DX PRINTER # ; AL PRINTER STATUS CheckPrinter MACRO UserGate check_printer_nr ENDM ; DX PRINTER # ; AL CHARACTER ; NC OK WritePrinter MACRO UserGate write_printer_nr ENDM ; DX basadress till com port ; AL irq till com port ; AH # of data bits ; BL # of stop bits ; BH parity ('N', 'E' or 'O') ; CX baudrate divisor ; SI size of transmit buffer ; DI size of receive buffer ; BX port handle OpenCom MACRO UserGate open_com_nr ENDM ; BX port handle CloseCom MACRO UserGate close_com_nr ENDM ; BX port handle FlushCom MACRO UserGate flush_com_nr ENDM ; BX port handle ; AX number of char in buffer PollCom MACRO UserGate poll_com_nr ENDM ; BX port handle ; EAX timeout in ms WaitForCom MACRO UserGate wait_for_com_nr ENDM ; BX port handle ; AX data read or -1 ReadCom MACRO UserGate read_com_nr ENDM ; BX port handle ; AL data to send WriteCom MACRO UserGate write_com_nr ENDM ; BX port handle SetDtr MACRO UserGate set_dtr_nr ENDM ; BX port handle ResetDtr MACRO UserGate reset_dtr_nr ENDM ; DX basadress till cbus port ; AL irq till cbus port OpenCbus MACRO UserGate open_cbus_nr ENDM CloseCbus MACRO UserGate close_cbus_nr ENDM FlushCbus MACRO UserGate flush_cbus_nr ENDM PollCbus MACRO UserGate poll_cbus_nr ENDM ReadCbus MACRO UserGate read_cbus_nr ENDM ; AL char to write WriteCbus MACRO UserGate write_cbus_nr ENDM OpenInternet MACRO UserGate open_internet_nr ENDM CloseInternet MACRO UserGate close_internet_nr ENDM ; EAX timeout in ms ; BX destination port ; EDX IP-address ; (E)CX Number of bytes to send ; ES:(E)DI Data buffer ; NC Ok ; ES:(E)DI Answer buffer ; (E)CX Number of bytes received QueryUdp MACRO UserGate query_udp_nr ENDM ; EAX Timeout in seconds for connection ; ECX buffer size ; EDX ip address ; SI local port ; DI remote port ; NC ok ; BX connection handle OpenTcpConnection MACRO UserGate open_tcp_connection_nr ENDM ; ECX buffer size ; SI local port ListenTcpPort MACRO UserGate listen_tcp_port_nr ENDM ; SI local port ; BX connection handle WaitForTcpConnection MACRO UserGate wait_for_tcp_connection_nr ENDM ; BX connection handle CloseTcpConnection MACRO UserGate close_tcp_connection_nr ENDM ; BX connection handle AbortTcpConnection MACRO UserGate abort_tcp_connection_nr ENDM ; EAX timeout in ms for receive ; BX connection handle ; (E)CX wanted number of bytes ; ES:E(DI) data buffer ; NC ok ; (E)AX size of received data ; CY connection closed ReadTcpConnection MACRO UserGate read_tcp_connection_nr ENDM ; BX connection handle ; (E)CX buffer size ; ES:(E)DI data buffer ; NC ok ; CY connection closed WriteTcpConnection MACRO UserGate write_tcp_connection_nr ENDM ; BX connection handle PushTcpConnection MACRO UserGate push_tcp_connection_nr ENDM ; ES:(E)DI Host name ; EDX IP address NameToIP MACRO UserGate name_to_ip_nr ENDM SyncTime MACRO UserGate sync_time_nr ENDM