diff --git a/kernel/branches/net/applications/netcfg/drivers.inc b/kernel/branches/net/applications/netcfg/drivers.inc new file mode 100644 index 0000000000..11c74ebaeb --- /dev/null +++ b/kernel/branches/net/applications/netcfg/drivers.inc @@ -0,0 +1,89 @@ +driverlist: +db 'RTL8139',0 +dd 0x813910ec +dd 0x813810ec +dd 0x12111113 +dd 0x13601500 +dd 0x13604033 +dd 0x13001186 +dd 0x13401186 +dd 0xab0613d1 +dd 0xa1171259 +dd 0xa11e1259 +dd 0xab0614ea +dd 0xab0714ea +dd 0x123411db +dd 0x91301432 +dd 0x101202ac +dd 0x0106018a +dd 0x1211126c +dd 0x81391743 +dd 0x8139021b +dd 0x0 ; end + +db 'RTL8029',0 +dd 0x802910ec +dd 0x0 + +db 'I8255X',0 +dd 0x12098086 +dd 0x10298086 +dd 0x12298086 +dd 0x10308086 +dd 0x24498086 +dd 0x0 + +db 'RTL8169',0 +dd 0x816810ec +dd 0x816910ec +dd 0x011616ec +dd 0x43001186 +dd 0x0 + +db '3C59X',0 +dd 0x590010b7 +dd 0x592010b7 +dd 0x597010b7 +dd 0x595010b7 +dd 0x595110b7 +dd 0x595210b7 +dd 0x900010b7 +dd 0x900110b7 +dd 0x900410b7 +dd 0x900510b7 +dd 0x900610b7 +dd 0x900A10b7 +dd 0x905010b7 +dd 0x905110b7 +dd 0x905510b7 +dd 0x905810b7 +dd 0x905A10b7 +dd 0x920010b7 +dd 0x980010b7 +dd 0x980510b7 +dd 0x764610b7 +dd 0x505510b7 +dd 0x605510b7 +dd 0x605610b7 +dd 0x5b5710b7 +dd 0x505710b7 +dd 0x515710b7 +dd 0x525710b7 +dd 0x656010b7 +dd 0x656210b7 +dd 0x656410b7 +dd 0x450010b7 +dd 0x0 + +db 'SIS900',0 +dd 0x09001039 +dd 0x70161039 +dd 0x0 + +db 'PCNET32',0 +dd 0x20001022 +dd 0x26251022 +dd 0x20011022 +dd 0x0 + +dd 0x0 ; driverlist end \ No newline at end of file diff --git a/kernel/branches/net/applications/netcfg/macros.inc b/kernel/branches/net/applications/netcfg/macros.inc new file mode 100644 index 0000000000..c40830e8a9 --- /dev/null +++ b/kernel/branches/net/applications/netcfg/macros.inc @@ -0,0 +1,543 @@ +@^ fix macro comment { +^@ fix } + +; ------------------------- +macro library [lname,fname] +{ + forward + dd __#lname#_library_table__,__#lname#_library_name__ + common + dd 0 + forward + align 4 + __#lname#_library_name__ db fname,0 +} + +macro import lname,[name,sname] +{ + common + align 4 + __#lname#_library_table__: + forward + if used name + name dd __#name#_import_name__ + end if + common + dd 0 + forward + if used name + align 4 + __#name#_import_name__ db sname,0 + end if +} + +macro export [name,sname] +{ + forward + dd __#name#_export_name__,name + common + dd 0 + forward + align 4 + __#name#_export_name__ db sname,0 +} +; ------------------------- + +macro m2m dest,src { + push src + pop dest +} + + +macro iglobal { + IGlobals equ IGlobals, + macro __IGlobalBlock { } + +macro uglobal { + UGlobals equ UGlobals, + macro __UGlobalBlock { } + +endg fix } ; Use endg for ending iglobal and uglobal blocks. + + +macro IncludeIGlobals{ + macro IGlobals dummy,[n] \{ __IGlobalBlock + purge __IGlobalBlock \} + match I, IGlobals \{ I \} } + +macro IncludeUGlobals{ + macro UGlobals dummy,[n] \{ + \common + \local begin, size + begin = $ + virtual at $ + \forward + __UGlobalBlock + purge __UGlobalBlock + \common + size = $ - begin + end virtual + rb size + \} + match U, UGlobals \{ U \} } + +uglobal +endg + +iglobal +endg + + +; new application structure +macro meos_app_start + { + use32 + org 0x0 + + db 'MENUET01' + dd 0x01 + dd __start + dd __end + dd __memory + dd __stack + + if used __params & ~defined __params + dd __params + else + dd 0x0 + end if + + dd 0x0 + } +MEOS_APP_START fix meos_app_start + +macro code + { + __start: + } +CODE fix code + +macro data + { + __data: + IncludeIGlobals + } +DATA fix data + +macro udata + { + if used __params & ~defined __params + __params: + db 0 + __end: + rb 255 + else + __end: + end if + __udata: + IncludeUGlobals + } +UDATA fix udata + +macro meos_app_end + { + align 32 + rb 2048 + __stack: + __memory: + } +MEOS_APP_END fix meos_app_end + + +; macro for defining multiline text data +struc mstr [sstring] + { + forward + local ssize + virtual at 0 + db sstring + ssize = $ + end virtual + dd ssize + db sstring + common + dd -1 + } + +; macro for defining multiline text data +struc mls [sstring] + { + forward + local ssize + virtual at 0 + db sstring ; mod + ssize = $ + end virtual + db ssize + db sstring + common + db -1 ; mod + } + + + +; strings +macro sz name,[data] { ; from MFAR [mike.dld] + common + if used name + name db data + .size = $-name + end if +} + +macro lsz name,[lng,data] { ; from MFAR [mike.dld] + common + if used name + label name + forward + if lang eq lng + db data + end if + common + .size = $-name + end if +} + +macro szc name,elsz,[data] { ; from MFAR [mike.dld] + common + local s,m + m = 0 + if used name + label name + forward + virtual at 0 + db data + s = $ + end virtual + d#elsz s + if m < s + m = s + end if + db data + common + .size = $-name + .maxl = m + end if +} + +macro lszc name,elsz,[lng,data] { ; from MFAR [mike.dld] + common + local s,m,c + m = 0 + c = 0 + if used name + label name + forward + if lang eq lng + virtual at 0 + db data + s = $ + end virtual + d#elsz s + if m < s + m = s + end if + db data + c = c+1 + end if + common + .size = $-name + .maxl = m + .count = c + end if +} + + +; easy system call macro +macro mpack dest, hsrc, lsrc +{ + if (hsrc eqtype 0) & (lsrc eqtype 0) + mov dest, (hsrc) shl 16 + lsrc + else + if (hsrc eqtype 0) & (~lsrc eqtype 0) + mov dest, (hsrc) shl 16 + add dest, lsrc + else + mov dest, hsrc + shl dest, 16 + add dest, lsrc + end if + end if +} + +macro __mov reg,a,b { ; mike.dld + if (~a eq)&(~b eq) + mpack reg,a,b + else if (~a eq)&(b eq) + mov reg,a + end if +} + + +__CPU_type equ p5 +SYSENTER_VAR equ 0 + +macro mcall a,b,c,d,e,f { ; mike.dld, updated by Ghost for Fast System Calls + local ..ret_point + __mov eax,a + __mov ebx,b + __mov ecx,c + __mov edx,d + __mov esi,e + __mov edi,f + + if __CPU_type eq p5 + int 0x40 + else + if __CPU_type eq p6 + push ebp + mov ebp, esp + push ..ret_point ; it may be 2 or 5 byte + sysenter + ..ret_point: + pop edx + pop ecx + + else + if __CPU_type eq k6 + push ecx + syscall + pop ecx + else + display 'ERROR : unknown CPU type (set to p5)', 10, 13 + __CPU_type equ p5 + int 0x40 + end if + end if + end if +} + + +; ------------------------- +macro header a,[b] { + common + use32 + org 0 + db 'MENUET',a + forward + if b eq + dd 0 + else + dd b + end if } +macro section name { align 16 + label name } +macro func name { + if ~used name + display 'FUNC NOT USED: ',`name,13,10 + else + align 4 + name: + ;diff16 `name,0,name +;pushad +;pushfd +;dps `name +;newline +;mcall 5,1 +;popfd +;popad +} +macro endf { end if } + +macro diff16 title,l1,l2 + { + local s,d + s = l2-l1 + display title,': 0x' + repeat 8 + d = '0' + s shr ((8-%) shl 2) and $0F + if d > '9' + d = d + 'A'-'9'-1 + end if + display d + end repeat + display 13,10 + } + +macro diff10 title,l1,l2 + { + local s,d,z,m + s = l2-l1 + z = 0 + m = 1000000000 + display title,': ' + repeat 10 + d = '0' + s / m + s = s - (s/m)*m + m = m / 10 + if d <> '0' + z = 1 + end if + if z <> 0 + display d + end if + end repeat + display 13,10 + } + +; optimize the code for size +__regs fix + +macro add arg1,arg2 + { + if (arg2 eqtype 0) + if (arg2) = 1 + inc arg1 + else + add arg1,arg2 + end if + else + add arg1,arg2 + end if + } + +macro sub arg1,arg2 + { + if (arg2 eqtype 0) + if (arg2) = 1 + dec arg1 + else + sub arg1,arg2 + end if + else + sub arg1,arg2 + end if + } + +macro mov arg1,arg2 + { + if (arg1 in __regs) & ((arg2 eqtype 0) | (arg2 eqtype '0')) + if (arg2) = 0 + xor arg1,arg1 + else if (arg2) = 1 + xor arg1,arg1 + inc arg1 + else if (arg2) = -1 + or arg1,-1 + else if (arg2) > -128 & (arg2) < 128 + push arg2 + pop arg1 + else + mov arg1,arg2 + end if + else + mov arg1,arg2 + end if + } + + +macro RGB [a] { + common + match (r=,g=,b),a \{ + \dd ((r) shl 16) or ((g) shl 8) or (b) + \} +} + + +struc POINT _t,_dx,_dy { + .x _t _dx + .y _t _dy +} + +; structure definition helper +include 'struct.inc' + +struct RECT + left dd ? + top dd ? + right dd ? + bottom dd ? +ends + +struct BOX + left dd ? + top dd ? + width dd ? + height dd ? +ends + +; structures used in MeOS +struct process_information + cpu_usage dd ? ; +0 + window_stack_position dw ? ; +4 + window_stack_value dw ? ; +6 + dw ? ; +8 + process_name rb 12 ; +10 + memory_start dd ? ; +22 + used_memory dd ? ; +26 + PID dd ? ; +30 + box BOX ; +34 + slot_state dw ? ; +50 + dw ? ; +52 + client_box BOX ; +54 + wnd_state db ? ; +70 + rb (1024-71) +ends + +struct system_colors + frame dd ? + grab dd ? + grab_button dd ? + grab_button_text dd ? + grab_text dd ? + work dd ? + work_button dd ? + work_button_text dd ? + work_text dd ? + work_graph dd ? +ends + +struct FILEDATE + Second db ? + Minute db ? + Hour db ? + db ? + Day db ? + Month db ? + Year dw ? +ends + +struct FILEINFO + Attributes dd ? + IsUnicode db ? + db 3 dup(?) + DateCreate FILEDATE + DateAccess FILEDATE + DateModify FILEDATE + Size dq ? +ends + +; constants + +; events +EV_IDLE = 0 +EV_TIMER = 0 +EV_REDRAW = 1 +EV_KEY = 2 +EV_BUTTON = 3 +EV_EXIT = 4 +EV_BACKGROUND = 5 +EV_MOUSE = 6 +EV_IPC = 7 +EV_STACK = 8 + +; event mask bits for function 40 +EVM_REDRAW = 1b +EVM_KEY = 10b +EVM_BUTTON = 100b +EVM_EXIT = 1000b +EVM_BACKGROUND = 10000b +EVM_MOUSE = 100000b +EVM_IPC = 1000000b +EVM_STACK = 10000000b + diff --git a/kernel/branches/net/applications/netcfg/netcfg.asm b/kernel/branches/net/applications/netcfg/netcfg.asm new file mode 100644 index 0000000000..fe8bbc9b6a --- /dev/null +++ b/kernel/branches/net/applications/netcfg/netcfg.asm @@ -0,0 +1,466 @@ +include 'macros.inc' +MEOS_APP_START + +type_ethernet equ 1 + +CODE + call draw_window + +still: mcall 10 ; wait here for event + dec eax ; redraw request ? + jz red + dec eax ; key in buffer ? + jz key + dec eax ; button in buffer ? + jz button + jmp still + +red: ; redraw + mcall 9, Proc_Info, -1 ; window redraw requested so get new window coordinates and size + mov eax, [Proc_Info.box.left]; store the window coordinates into the Form Structure + mov [Form + 2], ax ; x start position + mov eax, [Proc_Info.box.top]; + mov [Form + 6], ax ; ystart position + mov eax, [Proc_Info.box.width] ; + mov [Form], ax ; window width + mov eax, [Proc_Info.box.height] ; + mov [Form + 4] ,ax ; window height + call draw_window ; go redraw window now + jmp still + +key: ; key + mcall 2 ; just read it and ignore + jmp still +button: ; button + mcall 17 ; get id + + cmp ah, 1 ; button id = 1 ? + jne @f + mcall -1 ; close this program + @@: + cmp eax,0x0000fe00 + jg @f + + cmp ah, 4 + je hook + + jmp still + @@: + shr eax, 16 + mov dword[MAC],0 + mov word [MAC+4],0 + mov word [selected], ax + + call load_drv + call draw_window + + jmp still + +load_drv: +; mov ax , [selected] + test ax , ax + jz still + + mov bl , 6 ; get a dword + mov bh , ah ; bus + mov ch , al ; dev + mov cl , 0 ; offset to device/vendor id + mcall 62 ; get ID's + + mov word [PCI_Vendor], ax + shr eax, 16 + mov word [PCI_Device], ax + call get_drv_ptr + + mov ecx, eax + mcall 68, 16 + + mov [IOCTL.handle], eax + + ret + +hook: + mov ax , [selected] + test ax , ax + jz still + + mov [hardwareinfo.pci_dev], al + mov [hardwareinfo.pci_bus], ah + + mov [IOCTL.io_code], 1 ; SRV_HOOK + mov [IOCTL.inp_size], 3 + mov [IOCTL.input], hardwareinfo + mov [IOCTL.out_size], 0 + mov [IOCTL.output], 0 + + mcall 68, 17, IOCTL + + mov byte[drivernumber], al + +printhdwaddr: + + call draw_window + + jmp still + +draw_window: + mcall 12, 1 ; start of draw + mcall 0, dword [Form], dword [Form + 4], 0x13ffffff, 0x805080d0, title + + mcall 73, 0 + mov ecx, eax + mcall 47, 1 shl 18, , 50 shl 16 + 10, 0x00000000 + + call Get_PCI_Info ; get pci version and last bus, scan for and draw each pci device + + cmp edx, 20 shl 16 + 110 + je .nonefound + + mcall 4, 20 shl 16 + 100, 1 shl 31 + 0x00000000 , caption + + mcall 8, 122 shl 16 + 100, 50 shl 16 + 18, 0x00000004, 0x00007f00 + mcall ,, 70 shl 16 + 18, 0x00000005, 0x007f0000 + + mcall 4, 137 shl 16 + 57, 1 shl 31 + 0x00ffffff , btn_start + mcall , 140 shl 16 + 77, , btn_stop + + mcall , 240 shl 16 + 77, 1 shl 31 + 0x00000000 , lbl_hdw_addr + mcall , 312 shl 16 + 57, , lbl_type + add ebx, 38 shl 16 + cmp byte [type],type_ethernet + jne @f + mcall , , 1 shl 31 + 0x00000000, lbl_ethernet + + mcall 8,345 shl 16 + 17, 73 shl 16 + 14, 0x00000006, 0x00aaaa00 + mcall ,365 shl 16 + 17, , 0x00000007 + mcall ,385 shl 16 + 17, , 0x00000008 + mcall ,405 shl 16 + 17, , 0x00000009 + mcall ,425 shl 16 + 17, , 0x0000000a + mcall ,445 shl 16 + 17, , 0x0000000b + movzx ecx,byte[MAC] + mcall 47, 1 shl 17 + 1 shl 8,,349 shl 16 + 77, 0x000022cc + movzx ecx,byte[MAC+1] + add edx, 20 shl 16 + mcall + movzx ecx,byte[MAC+2] + add edx, 20 shl 16 + mcall + movzx ecx,byte[MAC+3] + add edx, 20 shl 16 + mcall + movzx ecx,byte[MAC+4] + add edx, 20 shl 16 + mcall + movzx ecx,byte[MAC+5] + add edx, 20 shl 16 + mcall + + jmp .done + + @@: + mcall 4, , 1 shl 31 + 0x00ff0000, lbl_unknown + jmp .done + +.nonefound : + mcall 4, 20 shl 16 + 30, 1 shl 31 + 0x00ff0000 , nonefound +.done: + mcall 12, 2 ; end of draw + ret + + +;------------------------------------------------------------------ +;* Gets the PCI Version and Last Bus +Get_PCI_Info: + mcall 62, 0 + mov word [PCI_Version], ax + mcall 62, 1 + mov byte [PCI_LastBus], al + ;---------------------------------------------------------- + ;* Get all devices on PCI Bus + mov edx, 20 shl 16 + 110 ; set start write position + cmp al , 0xff ; 0xFF means no pci bus found + jne Pci_Exists ; + ret ; if no bus then leave +Pci_Exists: + mov byte [V_Bus], 0 ; reset varibles + mov byte [V_Dev], 0 ; +Start_Enum: + mov bl , 6 ; get a dword + mov bh , byte [V_Bus] ; bus of pci device + mov ch , byte [V_Dev] ; device number/function + mov cl , 0 ; offset to device/vendor id + mcall 62 ; get ID's + + cmp ax, 0 ; Vendor ID should not be 0 or 0xFFFF + je nextDev ; check next device if nothing exists here + cmp ax, 0xffff ; + je nextDev ; + + mov word [PCI_Vendor], ax ; There is a device here, save the ID's + shr eax, 16 ; + mov word [PCI_Device], ax ; + mov bl , 4 ; Read config byte + mov bh , byte [V_Bus] ; Bus # + mov ch , byte [V_Dev] ; Device # on bus + mov cl , 0x08 ; Register to read (Get Revision) + mcall 62 ; Read it + mov byte [PCI_Rev], al ; Save it + mov cl , 0x0b ; Register to read (Get class) + mcall 62 ; Read it + + mov byte [PCI_Class], al ; Save it + mov cl , 0x0a ; Register to read (Get Subclass) + mcall 62 ; Read it + mov byte [PCI_SubClass], al ; Save it + mov cl , 0x09 ; Register to read (Get Interface) + mcall 62 ; Read it + mov [PCI_Interface], al ; Save it + mov cl , 0x3c ; Register to read (Get IRQ) +@@: mcall 62 ; Read it + mov [PCI_IRQ], al ; Save it +; +; inc byte [total] ; one more device found + + cmp byte [PCI_Class],2 + jne nextDev + + call Print_New_Device ; print device info to screen +nextDev: + add byte [V_Dev], 8 ; lower 3 bits are the function number + + jnz Start_Enum ; jump until we reach zero + mov byte [V_Dev], 0 ; reset device number + inc byte [V_Bus] ; next bus + mov al , byte [PCI_LastBus] ; get last bus + cmp byte [V_Bus], al ; was it last bus + jbe Start_Enum ; if not jump to keep searching + ret + +;------------------------------------------------------------------ +;* Print device info to screen +Print_New_Device: + + push edx ; Magic ! (to print a button...) + + mov ebx, 18 shl 16 + mov bx , [Form] + sub bx , 36 + + mov cx , dx + dec cx + shl ecx, 16 + add ecx, 9 + + movzx edx, byte [V_Bus] + shl dx , 8 + mov dl , byte [V_Dev] + + mov esi, 0x0000c0ff ; color: yellow if selected, blue otherwise + cmp word [selected], dx + jne @f + mov esi, 0x00c0c000 + @@: + + shl edx, 8 + or dl , 0xff + + mcall 8 + pop edx + + xor esi, esi ; Color of text + movzx ecx, word [PCI_Vendor] ; number to be written + mcall 47, 0x00040100 ; Write Vendor ID + + add edx, (4*6+18) shl 16 + movzx ecx, word [PCI_Device] ; get Vendor ID + mcall ; Draw Vendor ID to Window + + add edx, (4*6+18) shl 16 + movzx ecx, byte [V_Bus] ; get bus number + mcall ,0x00020100 ; draw bus number to screen + + add edx, (2*6+18) shl 16 + movzx ecx, byte [V_Dev] ; get device number + shr ecx, 3 ; device number is bits 3-7 + mcall ; Draw device Number To Window + + add edx, (2*6+18) shl 16 + movzx ecx, byte [PCI_Rev] ; get revision number + mcall ; Draw Revision to screen + + add edx, (2*6+18) shl 16 + movzx ecx, [PCI_IRQ] + cmp cl , 0x0f ; IRQ must be between 0 and 15 + ja @f + mcall +@@: +; + ;Write Names + movzx ebx, dx ; Set y position + or ebx, 230 shl 16 ; set Xposition + +;------------------------------------------------------------------ +; Prints the Vendor's Name based on Vendor ID +;------------------------------------------------------------------ + mov edx, VendorsTab + mov cx , word[PCI_Vendor] + +.fn: mov ax , [edx] + add edx, 6 + test ax , ax + jz .find + cmp ax , cx + jne .fn +.find: mov edx, [edx - 4] + mcall 4,, 0x80000000 ; lets print the vendor Name + +;------------------------------------------------------------------ +; Get description based on Class/Subclass +;------------------------------------------------------------------ + mov eax, dword [PCI_Class] + and eax, 0xffffff + xor edx, edx + xor esi, esi +.fnc: inc esi + mov ecx, [Classes + esi * 8 - 8] + cmp cx , 0xffff + je .endfc + cmp cx , ax + jne .fnc + test ecx, 0xff000000 + jz @f + mov edx, [Classes + esi * 8 - 4] + jmp .fnc +@@: cmp eax, ecx + jne .fnc + xor edx, edx +.endfc: test edx, edx + jnz @f + mov edx, [Classes + esi * 8 - 4] +@@: + add ebx, 288 shl 16 + mcall 4,, 0x80000000,, 32 ; draw the text + movzx edx, bx ; get y coordinate + add edx, 0x0014000A ; add 10 to y coordinate and set x coordinate to 20 + +;------------------------------------------------------------------ +; Print Driver Name +;------------------------------------------------------------------ + push edx + add ebx, 120 shl 16 + push ebx + + call get_drv_ptr + mov edx, eax + pop ebx + mcall 4,,0x80000000 ; lets print the vendor Name + pop edx + ret + +get_drv_ptr: + mov eax, driverlist ; eax will be the pointer to latest driver title + mov ebx, driverlist ; ebx is the current pointer + mov ecx, dword[PCI_Vendor] ; the device/vendor id of we want to find + + driverloop: + inc ebx + + cmp byte[ebx],0 + jne driverloop + + inc ebx ; the device/vendor id list for the driver eax is pointing to starts here. + + deviceloop: + cmp dword[ebx],0 + je nextdriver + + cmp dword[ebx],ecx + je driverfound + + add ebx,4 + jmp deviceloop + + nextdriver: + add ebx,4 + + cmp dword[ebx],0 + je nodriver + + mov eax,ebx + jmp driverloop + + nodriver: + mov eax, lbl_none ; lets print the vendor Name + ret + + driverfound: + ret + +include 'VENDORS.INC' +include 'DRIVERS.INC' +;------------------------------------------------------------------ +; DATA AREA +DATA + + +Form: dw 800 ; window width (no more, special for 800x600) + dw 100 ; window x start + dw 220 ; window height + dw 100 ; window y start + +title db 'Network Driver Control Center', 0 + +caption db 'Vendor Device Bus Dev Rev IRQ Company Description DRIVER',0 +lbl_1 db 'Hardware control',0 +nonefound db 'No compatible devices were found!',0 +btn_start db 'Start driver',0 +btn_stop db 'Stop driver',0 +lbl_hdw_addr db 'hardware address:',0 +lbl_type db 'type:',0 +lbl_none db 'none',0 +lbl_unknown db 'unknown',0 +lbl_ethernet db 'ethernet',0 + + +IOCTL: + .handle dd ? + .io_code dd ? + .input dd ? + .inp_size dd ? + .output dd ? + .out_size dd ? + +drivernumber db ? +MAC dp ? + +hardwareinfo: + .type db 1 ; pci + .pci_bus db ? + .pci_dev db ? + + +;------------------------------------------------------------------ +; UNINITIALIZED DATA AREA +UDATA + +type db ? +selected dw ? +V_Bus db ? +V_Dev db ? +PCI_Version dw ? +PCI_LastBus db ? +PCI_Vendor dw ? +PCI_Device dw ? +PCI_Bus db ? +PCI_Dev db ? +PCI_Rev db ? +; don`t change order!!! +PCI_Class db ? +PCI_SubClass db ? +PCI_Interface db ? +PCI_IRQ db ? + +Proc_Info process_information + + +MEOS_APP_END \ No newline at end of file diff --git a/kernel/branches/net/applications/netcfg/proc32.inc b/kernel/branches/net/applications/netcfg/proc32.inc new file mode 100644 index 0000000000..aa3ffc9702 --- /dev/null +++ b/kernel/branches/net/applications/netcfg/proc32.inc @@ -0,0 +1,270 @@ + +; Macroinstructions for defining and calling procedures + +macro stdcall proc,[arg] ; directly call STDCALL procedure + { common + if ~ arg eq + reverse + pushd arg + common + end if + call proc } + +macro invoke proc,[arg] ; indirectly call STDCALL procedure + { common + if ~ arg eq + reverse + pushd arg + common + end if + call [proc] } + +macro ccall proc,[arg] ; directly call CDECL procedure + { common + size@ccall = 0 + if ~ arg eq + reverse + pushd arg + size@ccall = size@ccall+4 + common + end if + call proc + if size@ccall + add esp,size@ccall + end if } + +macro cinvoke proc,[arg] ; indirectly call CDECL procedure + { common + size@ccall = 0 + if ~ arg eq + reverse + pushd arg + size@ccall = size@ccall+4 + common + end if + call [proc] + if size@ccall + add esp,size@ccall + end if } + +macro proc [args] ; define procedure + { common + match name params, args> + \{ define@proc name, \{ prologue name,flag,parmbytes,localbytes,reglist \} + macro locals + \{ virtual at ebp-localbytes+current + macro label def \\{ match . type,def> \\\{ deflocal@proc .,label, + \\\{ epilogue name,flag,parmbytes,localbytes,reglist \\\} \\} \} + macro finish@proc \{ localbytes = (((current-1) shr 2)+1) shl 2 + end if \} } + +macro defargs@proc [arg] + { common + if ~ arg eq + forward + local ..arg,current@arg + match argname:type, arg + \{ current@arg equ argname + label ..arg type + argname equ ..arg + if dqword eq type + dd ?,?,?,? + else if tbyte eq type + dd ?,?,? + else if qword eq type | pword eq type + dd ?,? + else + dd ? + end if \} + match =current@arg,current@arg + \{ current@arg equ arg + arg equ ..arg + ..arg dd ? \} + common + args@proc equ current@arg + forward + restore current@arg + common + end if } + +macro deflocal@proc name,def,[val] + { common + match vars, all@vars \{ all@vars equ all@vars, \} + all@vars equ all@vars name + forward + local ..var,..tmp + match =label,def \{ ..tmp equ \} + match tmp,..tmp \{ ..var def val \} + match ,..tmp \{ label ..var val \} + match =?, val \{ ..tmp equ \} + match any =dup (=?), val \{ ..tmp equ \} + match tmp : value, ..tmp : val + \{ tmp: end virtual + initlocal@proc ..var,def value + virtual at tmp\} + common + match first rest, ..var, \{ name equ first \} } + +macro initlocal@proc name,def + { virtual at name + def + size@initlocal = $ - name + end virtual + position@initlocal = 0 + while size@initlocal > position@initlocal + virtual at name + def + if size@initlocal - position@initlocal < 2 + current@initlocal = 1 + load byte@initlocal byte from name+position@initlocal + else if size@initlocal - position@initlocal < 4 + current@initlocal = 2 + load word@initlocal word from name+position@initlocal + else + current@initlocal = 4 + load dword@initlocal dword from name+position@initlocal + end if + end virtual + if current@initlocal = 1 + mov byte [name+position@initlocal],byte@initlocal + else if current@initlocal = 2 + mov word [name+position@initlocal],word@initlocal + else + mov dword [name+position@initlocal],dword@initlocal + end if + position@initlocal = position@initlocal + current@initlocal + end while } + +macro endp + { purge ret,locals,endl + finish@proc + purge finish@proc + restore regs@proc + match all,args@proc \{ restore all \} + restore args@proc + match all,all@vars \{ restore all \} } + +macro local [var] + { common + locals + forward done@local equ + match varname[count]:vartype, var + \{ match =BYTE, vartype \\{ varname rb count + restore done@local \\} + match =WORD, vartype \\{ varname rw count + restore done@local \\} + match =DWORD, vartype \\{ varname rd count + restore done@local \\} + match =PWORD, vartype \\{ varname rp count + restore done@local \\} + match =QWORD, vartype \\{ varname rq count + restore done@local \\} + match =TBYTE, vartype \\{ varname rt count + restore done@local \\} + match =DQWORD, vartype \\{ label varname dqword + rq count+count + restore done@local \\} + match , done@local \\{ virtual + varname vartype + end virtual + rb count*sizeof.\#vartype + restore done@local \\} \} + match :varname:vartype, done@local:var + \{ match =BYTE, vartype \\{ varname db ? + restore done@local \\} + match =WORD, vartype \\{ varname dw ? + restore done@local \\} + match =DWORD, vartype \\{ varname dd ? + restore done@local \\} + match =PWORD, vartype \\{ varname dp ? + restore done@local \\} + match =QWORD, vartype \\{ varname dq ? + restore done@local \\} + match =TBYTE, vartype \\{ varname dt ? + restore done@local \\} + match =DQWORD, vartype \\{ label varname dqword + dq ?,? + restore done@local \\} + match , done@local \\{ varname vartype + restore done@local \\} \} + match ,done@local + \{ var + restore done@local \} + common + endl } diff --git a/kernel/branches/net/applications/netcfg/struct.inc b/kernel/branches/net/applications/netcfg/struct.inc new file mode 100644 index 0000000000..557d293643 --- /dev/null +++ b/kernel/branches/net/applications/netcfg/struct.inc @@ -0,0 +1,180 @@ +; Macroinstructions for defining data structures + +macro struct name + { fields@struct equ name + match child parent, name \{ fields@struct equ child,fields@\#parent \} + sub@struct equ + struc db [val] \{ \common fields@struct equ fields@struct,.,db, \} + struc dw [val] \{ \common fields@struct equ fields@struct,.,dw, \} + struc du [val] \{ \common fields@struct equ fields@struct,.,du, \} + struc dd [val] \{ \common fields@struct equ fields@struct,.,dd, \} + struc dp [val] \{ \common fields@struct equ fields@struct,.,dp, \} + struc dq [val] \{ \common fields@struct equ fields@struct,.,dq, \} + struc dt [val] \{ \common fields@struct equ fields@struct,.,dt, \} + struc rb count \{ fields@struct equ fields@struct,.,db,count dup (?) \} + struc rw count \{ fields@struct equ fields@struct,.,dw,count dup (?) \} + struc rd count \{ fields@struct equ fields@struct,.,dd,count dup (?) \} + struc rp count \{ fields@struct equ fields@struct,.,dp,count dup (?) \} + struc rq count \{ fields@struct equ fields@struct,.,dq,count dup (?) \} + struc rt count \{ fields@struct equ fields@struct,.,dt,count dup (?) \} + macro db [val] \{ \common \local anonymous + fields@struct equ fields@struct,anonymous,db, \} + macro dw [val] \{ \common \local anonymous + fields@struct equ fields@struct,anonymous,dw, \} + macro du [val] \{ \common \local anonymous + fields@struct equ fields@struct,anonymous,du, \} + macro dd [val] \{ \common \local anonymous + fields@struct equ fields@struct,anonymous,dd, \} + macro dp [val] \{ \common \local anonymous + fields@struct equ fields@struct,anonymous,dp, \} + macro dq [val] \{ \common \local anonymous + fields@struct equ fields@struct,anonymous,dq, \} + macro dt [val] \{ \common \local anonymous + fields@struct equ fields@struct,anonymous,dt, \} + macro rb count \{ \local anonymous + fields@struct equ fields@struct,anonymous,db,count dup (?) \} + macro rw count \{ \local anonymous + fields@struct equ fields@struct,anonymous,dw,count dup (?) \} + macro rd count \{ \local anonymous + fields@struct equ fields@struct,anonymous,dd,count dup (?) \} + macro rp count \{ \local anonymous + fields@struct equ fields@struct,anonymous,dp,count dup (?) \} + macro rq count \{ \local anonymous + fields@struct equ fields@struct,anonymous,dq,count dup (?) \} + macro rt count \{ \local anonymous + fields@struct equ fields@struct,anonymous,dt,count dup (?) \} + macro union \{ fields@struct equ fields@struct,,union,< + sub@struct equ union \} + macro struct \{ fields@struct equ fields@struct,,substruct,< + sub@struct equ substruct \} + virtual at 0 } + +macro ends + { match , sub@struct \{ restruc db,dw,du,dd,dp,dq,dt + restruc rb,rw,rd,rp,rq,rt + purge db,dw,du,dd,dp,dq,dt + purge rb,rw,rd,rp,rq,rt + purge union,struct + match name=,fields,fields@struct \\{ fields@struct equ + make@struct name,fields + fields@\\#name equ fields \\} + end virtual \} + match any, sub@struct \{ fields@struct equ fields@struct> \} + restore sub@struct } + +macro make@struct name,[field,type,def] + { common + if $ + display 'Error: definition of ',`name,' contains illegal instructions.',0Dh,0Ah + err + end if + local define + define equ name + forward + local sub + match , field \{ make@substruct type,name,sub def + define equ define,.,sub, \} + match any, field \{ define equ define,.#field,type, \} + common + match fields, define \{ define@struct fields \} } + +macro define@struct name,[field,type,def] + { common + local list + list equ + forward + if ~ field eq . + name#field type def + sizeof.#name#field = $ - name#field + else + rb sizeof.#type + end if + local value + match any, list \{ list equ list, \} + list equ list + common + sizeof.#name = $ + restruc name + match values, list \{ + struc name value \\{ + match any, fields@struct \\\{ fields@struct equ fields@struct,.,name, \\\} + match , fields@struct \\\{ label . + forward + match , value \\\\{ field type def \\\\} + match any, value \\\\{ field type value + if ~ field eq . + rb sizeof.#name#field - ($-field) + end if \\\\} + common \\\} \\} \} } + +macro enable@substruct + { macro make@substruct substruct,parent,name,[field,type,def] + \{ \common + \local define + define equ parent,name + \forward + \local sub + match , field \\{ match any, type \\\{ enable@substruct + make@substruct type,name,sub def + purge make@substruct + define equ define,.,sub, \\\} \\} + match any, field \\{ define equ define,.\#field,type, \\} + \common + match fields, define \\{ define@\#substruct fields \\} \} } + +enable@substruct + +macro define@union parent,name,[field,type,def] + { common + virtual at 0 + forward + if ~ field eq . + virtual at 0 + parent#field type def + sizeof.#parent#field = $ - parent#field + end virtual + if sizeof.#parent#field > $ + rb sizeof.#parent#field - $ + end if + else if sizeof.#type > $ + rb sizeof.#type - $ + end if + common + sizeof.#name = $ + end virtual + struc name [value] \{ \common + label .\#name + last@union equ + forward + match any, last@union \\{ virtual at .\#name + field type def + end virtual \\} + match , last@union \\{ match , value \\\{ field type def \\\} + match any, value \\\{ field type value \\\} \\} + last@union equ field + common rb sizeof.#name - ($ - .\#name) \} } + +macro define@substruct parent,name,[field,type,def] + { common + virtual at 0 + forward + if ~ field eq . + parent#field type def + sizeof.#parent#field = $ - parent#field + else + rb sizeof.#type + end if + local value + common + sizeof.#name = $ + end virtual + struc name value \{ + label .\#name + forward + match , value \\{ field type def \\} + match any, value \\{ field type value + if ~ field eq . + rb sizeof.#parent#field - ($-field) + end if \\} + common \} } + diff --git a/kernel/branches/net/applications/netcfg/vendors.inc b/kernel/branches/net/applications/netcfg/vendors.inc new file mode 100644 index 0000000000..54f5ab7c5b --- /dev/null +++ b/kernel/branches/net/applications/netcfg/vendors.inc @@ -0,0 +1,1071 @@ +; AUTHOR: Victor Alberto Gil Hancco Laquita +; This list might content mistakes, plz report it +; There are 865 Lists of Vendors' Names +; Date: 8/14/2005 +; +; maybe this list is outdated... +; (the source was from 2004 list) + +; changed 11/05/2006: + 3 vendors and no more label 'PREVIOUSVERSIONLIST' +; so the total quantity of vendors is 875 now (changes by Sergey Kuzmin) + +; changed 16/08/2006: + 122 vendors +; so the total quantity of vendors is 987 now (changes by Sergey Kuzmin) + +; changed ??/04/2007: +; size optimezed +; total quantity of vendors is 997 now (changes by Mihailov Ilia) + + +macro VendorID a,b { ; by mike.dld + dw a + dd _vtmp#a + \iglobal + _vtmp#a db b + db 0 + \};endg +} + +macro ClassID a,b,c,d { + db a + db b + local tt + + if c eq + db 0 + db 1 + tt = 'x' + else + db c + db 0 + tt = c + end if + + dd _ctmp#a#b#tt + \iglobal + _ctmp#a#b#tt db d + db 0 + \};endg +} + +;-------------------------------------- +VendorsTab: +VendorID 0x0033, 'PARADYNE CORP.' +VendorID 0x003D, 'Lockheed Martin Corp' +VendorID 0x0100, 'NCIPHER CORP. LTD' +VendorID 0x0675, 'DYNALINK' +VendorID 0x0571, 'BERKOM' +VendorID 0x0A89, 'BREA TECHNOLOGIES INC' +VendorID 0x0E11, 'COMPAQ COMPUTER CORP.' +VendorID 0x1000, 'SYMBIOS LOGIC INC/LSI Logic' +VendorID 0x1001, 'KOLTER ELECTRONIC' +VendorID 0x1002, 'ATI TECHNOLOGIES INC' +VendorID 0x1003, 'ULSI' +VendorID 0x1004, 'VLSI TECHNOLOGY INC' +VendorID 0x1005, 'ADL' +VendorID 0x100B, 'NATIONAL SEMICONDUCTOR CORPORATION' +VendorID 0x100C, 'Tseng Labs' +VendorID 0x100E, 'Weitek' +VendorID 0x1010, 'VIDEO LOGIC LTD' +VendorID 0x1011, 'Digital Equipment Corporation' +VendorID 0x1013, 'Cirrus Logic' +VendorID 0x1014, 'IBM' +VendorID 0x1017, 'Spea Software AG' +VendorID 0x1018, 'UNISYS CORPORATION' +VendorID 0x1019, 'ELITEGROUP COMPUTER SYS' +VendorID 0x101A, 'NCR Corporation' +VendorID 0x101E, 'AMERICAN MEGATRENDS' +VendorID 0x1020, 'HITACHI COMPUTER PRODUCTS' +VendorID 0x1021, 'OKI ELECTRIC INDUSTRY CO. LTD.' +VendorID 0x1022, 'Advanced Micro Devices' +VendorID 0x1023, 'TRIDENT MICROSYSTEMS' +VendorID 0x1025, 'Acer Incorporated' +VendorID 0x1028, 'DELL COMPUTER CORPORATION' +VendorID 0x102A, 'LSI LOGIC CORPORATION' +VendorID 0x102B, 'MATROX GRAPHICS' +VendorID 0x102C, 'Asiliant (Chips And Technologies)' +VendorID 0x102D, 'Wyse Technologies' +VendorID 0x102F, 'TOSHIBA AMERICA' +VendorID 0x1031, 'miro Computer Products AG' +VendorID 0x1033, 'NEC CORPORATION' +VendorID 0x1036, 'Future Domain' +VendorID 0x1038, 'AMP' +VendorID 0x1039, 'SILICON INTEGRATED SYSTEMS' +VendorID 0x103C, 'Hewlett-Packard Company' +VendorID 0x103F, 'SYNOPSYS/LOGIC MODELING GROUP' +VendorID 0x1042, 'Micron Electronics' +VendorID 0x1043, 'ASUSTEK COMPUTER' +VendorID 0x1044, 'DISTRIBUTED PROCESSING TECHNOLOGY' +VendorID 0x1045, 'OPTI INC.' +VendorID 0x1048, 'ELSA AG' +VendorID 0x1049, 'FOUNTAIN TECHNOLOGIES' +VendorID 0x104A, 'STMicroelectronics' +VendorID 0x104B, 'BusLogic' +VendorID 0x104C, 'TEXAS INSTRUMENTS' +VendorID 0x104D, 'SONY CORPORATION' +VendorID 0x104E, 'Oak Technology' +VendorID 0x104F, 'Co-Time Computer Ltd.' +VendorID 0x1050, 'WINBOND ELECTRONICS CORP' +VendorID 0x1051, 'Anigma Corp.' +VendorID 0x1054, 'HITACHI' +VendorID 0x1055, 'Standard Microsystems Corp.' +VendorID 0x1057, 'Motorola' +VendorID 0x1058, 'ETRI' +VendorID 0x1059, 'TEKNOR INDUSTRIAL COMPUTERS INC' +VendorID 0x105A, 'PROMISE TECHNOLOGY' +VendorID 0x105B, 'FOXCONN INTERNATIONAL INC' +VendorID 0x105D, 'NUMBER 9 VISUAL TECHNOLOGY' +VendorID 0x105F, 'INFOTRONIC AMERICA INC' +VendorID 0x1060, 'United Microelectronics' +VendorID 0x1061, '8x8 Inc.' +VendorID 0x1063, 'OCEAN MANUFACTURING LTD' +VendorID 0x1064, 'ALCATEL' +VendorID 0x1065, 'Texas Microsystems' +VendorID 0x1066, 'Picopower Technology' +VendorID 0x1067, 'MITSUBISHI ELECTRIC AMERICA' +VendorID 0x1068, 'DIVERSIFIED TECHNOLOGY' +VendorID 0x1069, 'MYLEX CORPORATION' +VendorID 0x106B, 'APPLE COMPUTER INC.' +VendorID 0x106C, 'Hyundai Electronics America' +VendorID 0x106D, 'SEQUENT COMPUTER SYSTEMS' +VendorID 0x1070, 'DAEWOO TELECOM LTD' +VendorID 0x1071, 'MITAC' +VendorID 0x1073, 'YAMAHA CORPORATION' +VendorID 0x1074, 'Nexgen Microsystems' +VendorID 0x1076, 'Chaintech Comp.' +VendorID 0x1077, 'QLOGIC Corporation' +VendorID 0x1078, 'Cyrix Corporation' +VendorID 0x1079, 'I-BUS' +VendorID 0x107B, 'GATEWAY 2000' +VendorID 0x107D, 'Leadtek Research' +VendorID 0x107E, 'INTERPHASE CORPORATION' +VendorID 0x107F, 'Data Technology Corporation' +VendorID 0x1080, 'Cypress Semiconductor' +VendorID 0x1081, 'Radius Inc.' +VendorID 0x1083, 'Forex Computer Corporation' +VendorID 0x1085, 'Tulip Computers International BV' +VendorID 0x1087, 'Cache Computer' +VendorID 0x108A, 'SBS Operations' +VendorID 0x108D, 'OLICOM' +VendorID 0x108E, 'Sun Microsystems' +VendorID 0x1091, 'Intergraph Corporation' +VendorID 0x1092, 'Diamond Computer Systems' +VendorID 0x1093, 'National Instruments' +VendorID 0x1095, 'SILICON IMAGE (WAS CMD TECHNOLOGY INC)' +VendorID 0x1096, 'ALACRON' +VendorID 0x1097, 'APPIAN Graphics/ETMA' +VendorID 0x1098, 'Quantum Designs Ltd.' +VendorID 0x109A, 'PACKARD BELL NEC' +VendorID 0x109E, 'BROOKTREE CORPORATION' +VendorID 0x109F, 'TRIGEM COMPUTER INC.' +VendorID 0x10A0, 'MEIDENSHA CORPORATION' +VendorID 0x10A2, 'QUANTUM EFFECT DESIGN' +VendorID 0x10A4, 'Globe Manufacturing Sales' +VendorID 0x10A8, 'Sierra Semiconductor' +VendorID 0x10A9, 'SILICON GRAPHICS' +VendorID 0x10AC, 'HONEYWELL IAC' +VendorID 0x10AD, 'Winbond Systems Labs' +VendorID 0x10AF, 'MICRO COMPUTER SYSTEMS INC' +VendorID 0x10B5, 'PLX TECHNOLOGY.' +VendorID 0x10B6, 'MADGE NETWORKS' +VendorID 0x10B7, '3COM Corp, Networking Division' +VendorID 0x10B8, 'Standard Microsystems Corporation' +VendorID 0x10B9, 'ACER LABS Incorp.' +VendorID 0x10BA, 'MITSUBISHI ELECTRIC CORP.' +VendorID 0x10BD, 'Surecom Technology' +VendorID 0x10C2, 'AUSPEX SYSTEMS INC.' +VendorID 0x10C3, 'Samsung Semiconductors' +VendorID 0x10C4, 'Award Software International Inc.' +VendorID 0x10C8, 'NEOMAGIC CORPORATION' +VendorID 0x10CA, 'FUJITSU MICROELECTRONIC' +VendorID 0x10CB, 'OMRON CORPORATION' +VendorID 0x10CD, 'ADVANCED SYSTEM PRODUCTS' +VendorID 0x10CF, 'FUJITSU LIMITED' +VendorID 0x10D1, 'FUTUREPLUS SYSTEMS CORP.' +VendorID 0x10D2, 'MOLEX INCORPORATED' +VendorID 0x10D9, 'Macronix International Co. Ltd.' +VendorID 0x10DB, 'ROHM LSI SYSTEMS' +VendorID 0x10DC, 'CERN-European Lab. for Particle Physics' +VendorID 0x10DD, 'EVANS & SUTHERLAND' +VendorID 0x10DE, 'NVIDIA CORPORATION' +VendorID 0x10DF, 'EMULEX CORPORATION' +VendorID 0x10E1, 'TEKRAM TECHNOLOGY CO.LTD.' +VendorID 0x10E3, 'TUNDRA SEMICONDUCTOR CORP' +VendorID 0x10E5, 'MICRO INDUSTRIES CORPORATION' +VendorID 0x10E8, 'Applied Micro Circuits Corp.' +VendorID 0x10EA, 'Tvia, Inc.' +VendorID 0x10EB, 'Artist Graphics' +VendorID 0x10EC, 'REALTEK SEMICONDUCTOR CORP.' +VendorID 0x10ED, 'Ascii Corporation' +VendorID 0x10EE, 'XILINX' +VendorID 0x10EF, 'Racore Computer Products' +VendorID 0x10F0, 'Curtiss-Wright Controls Embedded Computing' +VendorID 0x10F1, 'TYAN COMPUTER' +VendorID 0x10F4, 'S-Mos Systems' +VendorID 0x10F5, 'NKK CORPORATION' +VendorID 0x10F6, 'Creative Electronic Systems SA' +VendorID 0x10FA, 'Truevision' +VendorID 0x10FB, 'Thesys Microelectronics' +VendorID 0x10FC, 'I-O DATA DEVICE' +VendorID 0x10FE, 'FAST MULTIMEDIA AG' +VendorID 0x1101, 'INITIO CORPORATION' +VendorID 0x1102, 'Creative Labs' +VendorID 0x1105, 'SIGMA DESIGNS' +VendorID 0x1106, 'VIA TECHNOLOGIES' +VendorID 0x1107, 'ASCEND COMMUNICATIONS/Stratus Computer' +VendorID 0x1108, 'Proteon Inc.' +VendorID 0x1109, 'Adaptec/Cogent Data Technologies Inc' +VendorID 0x110A, 'SIEMENS PC SYSTEME GMBH' +VendorID 0x110B, 'Chromatic Research Inc' +VendorID 0x1111, 'SANTA CRUZ OPERATION' +VendorID 0x1112, 'Osicom Technologies Inc.' +VendorID 0x1113, 'ACCTON TECHNOLOGY' +VendorID 0x1114, 'Atmel Corp.' +VendorID 0x1116, 'Media 100, Inc.' +VendorID 0x1117, 'Datacube Inc.' +VendorID 0x1118, 'FCI ELECTRONICS' +VendorID 0x1119, 'ICP-VORTEX COMPUTERSYSTEM GMBH' +VendorID 0x111A, 'EFFICIENT NETWORKS' +VendorID 0x111C, 'Tricord Systems Inc.' +VendorID 0x111D, 'INTEGRATED DEVICE TECH' +VendorID 0x111F, 'Precision Digital Images' +VendorID 0x1120, 'EMC CORPORATION' +VendorID 0x1127, 'FORE SYSTEMS INC' +VendorID 0x112A, 'HERMES ELECTRONICS COMPANY' +VendorID 0x112E, 'Infomedia' +VendorID 0x112F, 'IMAGING TECHNOLOGY' +VendorID 0x1131, 'PHILIPS SEMICONDUCTORS' +VendorID 0x1132, 'MITEL CORP' +VendorID 0x1133, 'Eicon Networks Corporation' +VendorID 0x1134, 'MERCURY COMPUTER SYSTEMS' +VendorID 0x1135, 'FUJI XEROX CO LTD' +VendorID 0x1136, 'MOMENTUM DATA SYSTEMS' +VendorID 0x1137, 'CISCO SYSTEMS INC' +VendorID 0x1138, 'ZIATECH CORPORATION' +VendorID 0x113C, 'CYCLONE MICROSYSTEMS.' +VendorID 0x113E, 'SANYO ELECTRIC CO-Information Systems Division' +VendorID 0x113F, 'Equinox Systems' +VendorID 0x1141, 'CREST MICROSYSTEM INC.' +VendorID 0x1142, 'Alliance Semiconductor CA - USA' +VendorID 0x1144, 'Cincinnati Milacron' +VendorID 0x1145, 'WORKBIT CORPORATION' +VendorID 0x1146, 'FORCE COMPUTERS GMBH' +VendorID 0x1147, 'Interface Corp' +VendorID 0x1148, 'SYSKONNECT/Marvell' +VendorID 0x114A, 'VMIC' +VendorID 0x114C, 'ANNABOOKS' +VendorID 0x114F, 'DIGI INTERNATIONAL' +VendorID 0x1154, 'MELCO INC' +VendorID 0x1155, 'Pine Technology Ltd' +VendorID 0x1158, 'Voarx R&D Inc' +VendorID 0x1159, 'Mutech' +VendorID 0x115C, 'PHOTRON LTD.' +VendorID 0x115D, 'XIRCOM' +VendorID 0x1161, 'PFU LIMITED' +VendorID 0x1163, 'RENDITION' +VendorID 0x1165, 'Imagraph Corporation' +VendorID 0x1166, 'Reliance Computer Corp./ServerWorks' +VendorID 0x1169, 'Centre f/Dev. of Adv. Computing' +VendorID 0x116A, 'Polaris Communications' +VendorID 0x116E, 'ELECTRONICS FOR IMAGING' +VendorID 0x1170, 'INVENTEC CORPORATION' +VendorID 0x1171, 'BLUE WAVE SYSTEMS' +VendorID 0x1172, 'ALTERA CORPORATION' +VendorID 0x1176, 'SBE' +VendorID 0x1178, 'Alfa Inc' +VendorID 0x1179, 'TOSHIBA AMERICA INFO SYSTEMS' +VendorID 0x117B, 'GCE-8320B' +VendorID 0x117E, 'T/R Systems' +VendorID 0x1180, 'RICOH CO LTD' +VendorID 0x1185, 'Dataworld' +VendorID 0x1186, 'D-LINK SYSTEM INC' +VendorID 0x1187, 'ADVANCED TECHNOLOGY LABORATORIES' +VendorID 0x1189, 'MATSUSHITA ELECTIC INDUSTRIAL CO LTD' +VendorID 0x118B, 'PLATYPUS TECHNOLOGY PTY LTD' +VendorID 0x118C, 'Corollary Inc' +VendorID 0x118D, 'BitFlow Inc' +VendorID 0x118E, 'Hermstedt AG' +VendorID 0x1190, 'Tripace' +VendorID 0x1191, 'ACARD TECHNOLOGY' +VendorID 0x1193, 'ZeitNet' +VendorID 0x1195, 'RATOC SYSTEMS INC' +VendorID 0x1197, 'Gage Applied Technologies' +VendorID 0x1199, 'Attachmate Corp.' +VendorID 0x119A, 'MINDSHARE.' +VendorID 0x119B, 'Omega Micro Inc.' +VendorID 0x119D, 'BUG.' +VendorID 0x119E, 'FUJITSU MICROELECTRONICS LTD.' +VendorID 0x119F, 'BULL HN INFORMATION SYSTEMS' +VendorID 0x11A1, 'HAMAMATSU PHOTONICS K.K.' +VendorID 0x11A8, 'Systech Corp.' +VendorID 0x11A9, 'InnoSys Inc.' +VendorID 0x11AA, 'ACTEL' +VendorID 0x11AB, 'GALILEO TECHNOLOGY LTD/Marvell Semiconductor, Inc.' +VendorID 0x11AD, 'LITE-ON COMMUNICATIONS INC' +VendorID 0x11AE, 'SCITEX CORPORATION' +VendorID 0x11AF, 'AVID TECHNOLOGY INC' +VendorID 0x11B0, 'V3 SEMICONDUCTOR INC./Quicklogic Corp' +VendorID 0x11B2, 'EASTMAN KODAK' +VendorID 0x11B3, 'BARR SYSTEMS INC.' +VendorID 0x11B5, 'Radstone Technology Ltd.' +VendorID 0x11B8, 'Xpoint Technologies Inc' +VendorID 0x11B9, 'Pathlight Technology Inc.' +VendorID 0x11BC, 'Network Peripherals Inc' +VendorID 0x11BD, 'Pinnacle Systems Inc.' +VendorID 0x11BF, 'ASTRODESIGN' +VendorID 0x11C1, 'AGERE/LUCENT' +VendorID 0x11C6, 'DAINIPPON SCREEN MFG. CO. LTD' +VendorID 0x11C8, 'DOLPHIN INTERCONNECT SOLUTIONS AS' +VendorID 0x11C9, 'MAGMA' +VendorID 0x11CA, 'LSI SYSTEMS' +VendorID 0x11CB, 'SPECIALIX INTERNATIONAL LTD' +VendorID 0x11CE, 'NETACCESS/Primary Rate Inc' +VendorID 0x11D0, 'LOCKHEED MARTIN-Electronics & Communications' +VendorID 0x11D1, 'AuraVision Corporation' +VendorID 0x11D2, 'INTERCOM INC.' +VendorID 0x11D4, 'Analog Devices, Inc.' +VendorID 0x11D5, 'IKON CORPORATION/Tahoma Technology' +VendorID 0x11D9, 'TOSHIBA TEC CORPORATION' +VendorID 0x11DA, 'NOVELL' +VendorID 0x11DB, 'Sega Enterprises Ltd' +VendorID 0x11DE, 'Zoran Corporation' +VendorID 0x11DF, 'NEW WAVE PDG' +VendorID 0x11E3, 'QUICKLOGIC CORPORATION' +VendorID 0x11EC, 'CORECO INC' +VendorID 0x11EE, 'DOME IMAGING SYSTEMS INC' +VendorID 0x11F0, 'Compu-Shack GmbH' +VendorID 0x11F4, 'Kinetic Systems Corporation' +VendorID 0x11F6, 'Powermatic Data Systems Ltd' +VendorID 0x11F8, 'PMC-SIERRA INC' +VendorID 0x11FE, 'Comtrol Corp' +VendorID 0x1202, 'Network General Corp' +VendorID 0x1203, 'AGFA CORPORATION' +VendorID 0x1206, 'AMDAHL CORPORATION' +VendorID 0x1208, 'Parsytec GmbH' +VendorID 0x1209, 'Sci Systems Inc' +VendorID 0x120E, 'Cyclades Corporation' +VendorID 0x120F, 'ESSENTIAL COMMUNICATIONS' +VendorID 0x1214, 'PERFORMANCE TECHNOLOGIES.' +VendorID 0x1216, 'PURUP-EskoFot A/S' +VendorID 0x1217, 'O2MICRO.' +VendorID 0x121A, '3DFX INTERACTIVE' +VendorID 0x121B, 'VIRATA LTD' +VendorID 0x1220, 'Ariel Corporation' +VendorID 0x1221, 'CONTEC CO. LTD' +VendorID 0x1223, 'ARTESYN COMMUNICATIONS PRODUCTS INC' +VendorID 0x1224, 'Interactive Images' +VendorID 0x1227, 'TECH-SOURCE' +VendorID 0x122C, 'SICAN GMBH' +VendorID 0x122D, 'Aztech System Ltd' +VendorID 0x1232, 'MARCONI COMMUNICATIONS LTD' +VendorID 0x1236, 'Sigma Designs, Inc' +VendorID 0x124C, 'Solitron Technologies Inc.' +VendorID 0x124D, 'Stallion Technologies' +VendorID 0x124F, 'Infortrend Technology Inc' +VendorID 0x1256, 'Perceptive Solutions Inc.' +VendorID 0x1258, 'Gilbarco Inc.' +VendorID 0x125B, 'Asix Electronics Corp.' +VendorID 0x1266, 'Microdyne Corp.' +VendorID 0x1267, 'S.A. Telecommunications' +VendorID 0x1361, 'SOLITON SYSTEMS K.K.' +VendorID 0x123C, 'CENTURY SYSTEMS.' +VendorID 0x123D, 'Engineering Design Team Inc.' +VendorID 0x123F, 'C-CUBE MICROSYSTEMS' +VendorID 0x1242, 'JAYCOR NETWORKS INC./JNI Corporation' +VendorID 0x1244, 'AVM AUDIOVISUELLES MKTG & COMPUTER SYSTEM GMBH' +VendorID 0x124B, 'SBS TECHNOLOGIES' +VendorID 0x1250, 'Hitachi Microcomputer System Ltd.' +VendorID 0x1253, 'GUZIK TECHNICAL ENTERPRISES' +VendorID 0x1255, 'OPTIBASE LTD' +VendorID 0x1259, 'ALLIED TELESYN INTERNATIONAL' +VendorID 0x125C, 'AURORA TECHNOLOGIES.' +VendorID 0x125D, 'ESS TECHNOLOGY, INC.' +VendorID 0x125F, 'CONCURRENT TECHNOLOGIES' +VendorID 0x1260, 'INTERSIL CORP' +VendorID 0x1261, 'MATSUSHITA-KOTOBUKI ELECTRONICS' +VendorID 0x1264, 'AVAL NAGASAKI CORPORATION' +VendorID 0x1268, 'TEKTRONIX' +VendorID 0x126C, 'Nortel Networks Corp.' +VendorID 0x126D, 'SPLASH TECHNOLOGY.' +VendorID 0x126E, 'SUMITOMO METAL INDUSTRIES' +VendorID 0x126F, 'SILICON MOTION.' +VendorID 0x1270, 'OLYMPUS OPTICAL CO. LTD.' +VendorID 0x1274, 'Creative Labs (was Ensoniq, Malvern)' +VendorID 0x1275, 'NETWORK APPLIANCE CORPORATION' +VendorID 0x1278, 'Transtech Parallel Systems' +VendorID 0x1279, 'TRANSMETA CORPORATION' +VendorID 0x127A, 'CONEXANT, ROCKWELL' +VendorID 0x127D, 'VELA RESEARCH LP' +VendorID 0x127F, 'FUJIFILM' +VendorID 0x1281, 'YOKOGAWA ELECTRIC CORPORATION' +VendorID 0x1283, 'Integrated Technology Express Inc.' +VendorID 0x1286, 'MAZET GMBH' +VendorID 0x128B, 'TRANSWITCH CORPORATION' +VendorID 0x128D, 'G2 Networks Inc.' +VendorID 0x128F, 'TATENO DENNOU.' +VendorID 0x1290, 'TOSHIBA PERSONAL COMPUTER SYSTEM CORP.' +VendorID 0x1291, 'NCS COMPUTER ITALIA SRL' +VendorID 0x1292, 'TRITECH MICROELECTRONICS INC' +VendorID 0x1297, 'SHUTTLE COMPUTER' +VendorID 0x1299, 'KNOWLEDGE TECHNOLOGY LAB.' +VendorID 0x129A, 'VMETRO Inc.' +VendorID 0x129E, 'VICTOR COMPANY OF JAPAN' +VendorID 0x12A0, 'ALLEN- BRADLEY COMPANY' +VendorID 0x12A3, 'Lucent Technologies AMR' +VendorID 0x12A7, 'AMO GMBH' +VendorID 0x12A9, 'XIOTECH CORPORATION' +VendorID 0x12AB, 'YUAN YUAN ENTERPRISE CO. LTD.' +VendorID 0x12AE, 'Alteon Networks Inc.' +VendorID 0x12B6, 'NATURAL MICROSYSTEMS' +VendorID 0x12B7, 'COGNEX MODULAR VISION SYSTEMS DIV.-ACUMEN INC.' +VendorID 0x12B9, '3Com Corp, Modem Division' +VendorID 0x12BC, 'ARRAY MICROSYSTEMS' +VendorID 0x12BE, 'ANCHOR CHIPS INC.' +VendorID 0x12BF, 'Fujifilm Microdevices' +VendorID 0x12C0, 'INFIMED' +VendorID 0x12C3, 'Holtek Microelectronics Inc.' +VendorID 0x12C4, 'Connect Tech Inc' +VendorID 0x12C6, 'Mitan Corporation' +VendorID 0x12C7, 'Dialogic Corp' +VendorID 0x12CA, 'Integrated Computing Engines' +VendorID 0x12CD, 'Aims Lab' +VendorID 0x12D2, 'NVIDIA (WAS: STB,SGS THOMPSON)' +VendorID 0x12D3, 'GE VINGMED ULTRASOUND AS' +VendorID 0x12D4, 'COMVERSE NETWORKS SYSTEM & Ulticom, Inc.' +VendorID 0x12D5, 'Equator Technologies' +VendorID 0x12D6, 'Analogic Corp' +VendorID 0x12D8, 'PERICOM SEMICONDUCTOR' +VendorID 0x12D9, 'Aculab PLC' +VendorID 0x12DA, 'True Time Inc.' +VendorID 0x12DE, 'Rainbow Technologies' +VendorID 0x12DF, 'SBS Technologies Inc' +VendorID 0x12E0, 'Chase Research PLC' +VendorID 0x12E2, 'Datum Inc. Bancomm-Timing Division' +VendorID 0x12E4, 'Brooktrout Technology Inc' +VendorID 0x12E7, 'Sebring Systems' +VendorID 0x12EA, 'Real Vision' +VendorID 0x12EB, 'Aureal Semiconductor' +VendorID 0x12EC, '3A' +VendorID 0x12F0, 'PENTEK' +VendorID 0x12F7, 'COGNEX INC.' +VendorID 0x12FB, 'Spectrum Signal Processing' +VendorID 0x12FC, 'CAPITAL EQUIPMENT CORP' +VendorID 0x12FE, 'ESD Electronic System Design GmbH' +VendorID 0x1304, 'Juniper Networks Inc.' +VendorID 0x1307, 'Computer Boards' +VendorID 0x1308, 'LEVEL ONE COMMUNICATIONS/Jato Technologies Inc.' +VendorID 0x130A, 'Mitsubishi Electric MicroComputer' +VendorID 0x130B, 'Colorgraphic Communications Corp' +VendorID 0x130F, 'Advanet Inc' +VendorID 0x1310, 'GESPAC' +VendorID 0x1313, 'YASKAWA ELECTRIC CO.' +VendorID 0x1316, 'TERADYNE INC.' +VendorID 0x1317, 'ADMTEK INC' +VendorID 0x1318, 'Packet Engines Inc.' +VendorID 0x1319, 'ForteMedia' +VendorID 0x131F, 'SIIG Inc' +VendorID 0x1325, 'SALIX TECHNOLOGIES INC' +VendorID 0x1326, 'SeaChange International' +VendorID 0x1331, 'RadiSys Corp.' +VendorID 0x133D, 'PRISA NETWORKS' +VendorID 0x133F, 'SCM MICROSYSTEMS' +VendorID 0x1342, 'PROMAX SYSTEMS INC' +VendorID 0x1344, 'MICRON TECHNOLOGY INC' +VendorID 0x134A, 'Domex' +VendorID 0x134B, 'ARK RESEARCH CORP.' +VendorID 0x134C, 'CHORI JOHO SYSTEM CO. LTD' +VendorID 0x134D, 'PC-TEL INC' +VendorID 0x135A, 'BRAIN BOXES LIMITED' +VendorID 0x135C, 'QUATECH INC' +VendorID 0x135E, 'SEALEVEL SYSTEMS INC' +VendorID 0x135F, 'I-DATA INTERNATIONAL A-S' +VendorID 0x1360, 'MEINBERG FUNKUHREN' +VendorID 0x1363, 'PHOENIX TECHNOLOGIES LTD' +VendorID 0x1365, 'HYPERCOPE' +VendorID 0x1367, 'HITACHI ZOSEN CORPORATION' +VendorID 0x1368, 'SKYWARE CORPORATION' +VendorID 0x1369, 'DIGIGRAM' +VendorID 0x136B, 'KAWASAKI STEEL CORPORATION' +VendorID 0x136C, 'ADTEK SYSTEM SCIENCE CO LTD' +VendorID 0x1375, 'BOEING-SUNNYVALE' +VendorID 0x1376, 'LAN Media Corporation' +VendorID 0x1377, 'ELECTRONIC EQUIPMENT PRODUCTION & DISTRIBUTION' +VendorID 0x137A, 'MARK OF THE UNICORN INC' +VendorID 0x137B, 'PPT VISION' +VendorID 0x137C, 'IWATSU ELECTRIC CO LTD' +VendorID 0x137D, 'DYNACHIP CORPORATION' +VendorID 0x1380, 'SANRITZ AUTOMATION CO LTC' +VendorID 0x1381, 'BRAINS CO. LTD' +VendorID 0x1383, 'CONTROLNET INC' +VendorID 0x1384, 'STELLAR SEMICONDUCTOR INC' +VendorID 0x1385, 'NETGEAR' +VendorID 0x1387, 'SYSTRAN CORP' +VendorID 0x1388, 'HITACHI INFORMATION TECHNOLOGY CO LTD' +VendorID 0x1389, 'APPLICOM INTERNATIONAL' +VendorID 0x138A, 'SITERA' +VendorID 0x138B, 'TOKIMEC INC' +VendorID 0x138E, 'BASLER GMBH' +VendorID 0x138F, 'PATAPSCO DESIGNS INC' +VendorID 0x1393, 'MOXA TECHNOLOGIES CO LTD' +VendorID 0x1394, 'LEVEL ONE COMMUNICATIONS' +VendorID 0x1395, 'AMBICOM INC' +VendorID 0x1396, 'CIPHER SYSTEMS INC' +VendorID 0x1397, 'COLOGNE CHIP DESIGNS GMBH' +VendorID 0x1398, 'CLARION CO. LTD' +VendorID 0x1399, 'RIOS SYSTEMS CO LTD' +VendorID 0x139A, 'ALACRITECH INC' +VendorID 0x139C, 'QUANTUM 3D INC' +VendorID 0x139D, 'XSTREAMS PLC/ EPL LIMITED' +VendorID 0x139E, 'ECHOSTAR DATA NETWORKS' +VendorID 0x139F, 'AETHRA S.R.L.' +VendorID 0x13A0, 'CRYSTAL GROUP INC' +VendorID 0x13A1, 'KAWASAKI HEAVY INDUSTRIES LTD' +VendorID 0x13A2, 'OSITECH COMMUNICATIONS INC' +VendorID 0x13A4, 'RASCOM INC' +VendorID 0x13A7, 'TELES AG' +VendorID 0x13A8, 'EXAR CORP.' +VendorID 0x13A9, 'SIEMENS MEDICAL SYSTEMS' +VendorID 0x13AA, 'NORTEL NETWORKS-BWA DIVISION' +VendorID 0x13AF, 'T.SQWARE' +VendorID 0x13B1, 'TAMURA CORPORATION' +VendorID 0x13B4, 'WELLBEAN CO INC' +VendorID 0x13B5, 'ARM Ltd' +VendorID 0x13B6, 'DLoG GMBH' +VendorID 0x13B8, 'NOKIA TELECOMMUNICATIONS OY' +VendorID 0x13BD, 'SHARP CORPORATION' +VendorID 0x13BF, 'SHAREWAVE INC' +VendorID 0x13C0, 'Microgate Corp.' +VendorID 0x13C1, '3ware Inc.' +VendorID 0x13C2, 'TECHNOTREND SYSTEMTECHNIK GMBH' +VendorID 0x13C3, 'JANZ COMPUTER AG' +VendorID 0x13C6, 'CONDOR ENGINEERING INC' +VendorID 0x13C7, 'BLUE CHIP TECHNOLOGY LTD' +VendorID 0x13CA, 'IOMEGA CORPORATION' +VendorID 0x13CC, 'METHEUS CORPORATION' +VendorID 0x13CF, 'STUDIO AUDIO & VIDEO LTD' +VendorID 0x13D0, 'B2C2' +VendorID 0x13D1, 'ABOCOM SYSTEMS' +VendorID 0x13D2, 'SHARK MULTIMEDIA INC' +VendorID 0x13D3, 'IMC NETWORKS' +VendorID 0x13D4, 'GRAPHICS MICROSYSTEMS INC' +VendorID 0x13D6, 'K.I. TECHNOLOGY CO LTD' +VendorID 0x13D7, 'TOSHIBA ENGINEERING CORPORATION' +VendorID 0x13D8, 'PHOBOS CORPORATION' +VendorID 0x13D9, 'APEX INC' +VendorID 0x13DC, 'NETBOOST CORPORATION' +VendorID 0x13DE, 'ABB ROBOTICS PRODUCTS' +VendorID 0x13DF, 'E-TECH INC' +VendorID 0x13E0, 'GVC CORPORATION' +VendorID 0x13E3, 'NEST INC' +VendorID 0x13E4, 'CALCULEX INC' +VendorID 0x13E5, 'TELESOFT DESIGN LTD' +VendorID 0x13E9, 'INTRASERVER TECHNOLOGY INC' +VendorID 0x13EA, 'DALLAS SEMICONDUCTOR' +VendorID 0x13F0, 'SUNDANCE TECHNOLOGY INC' +VendorID 0x13F1, 'OCE-TECHNOLOGIES B.V.' +VendorID 0x13F2, 'FORD MICROELECTRONICS INC' +VendorID 0x13F4, 'TROIKA NETWORKS INC' +VendorID 0x13F6, 'C-MEDIA ELECTRONICS INC' +VendorID 0x13F9, 'NTT ADVANCED TECHNOLOGY CORP.' +VendorID 0x13FB, 'AYDIN CORP' +VendorID 0x13FD, 'MICRO SCIENCE INC' +VendorID 0x1400, 'ARTX INC' +VendorID 0x1402, 'Meilhaus Electronic GmbH Germany' +VendorID 0x1404, 'FUNDAMENTAL SOFTWARE INC' +VendorID 0x1406, 'OCE PRINTING SYSTEMS GmbH' +VendorID 0x1407, 'LAVA COMPUTER MFG INC' +VendorID 0x1408, 'ALOKA CO. LTD' +VendorID 0x140A, 'DSP RESEARCH INC' +VendorID 0x140B, 'RAMIX INC' +VendorID 0x140D, 'MATSUSHITA ELECTRIC WORKS LTD' +VendorID 0x1412, 'ICEnsemble' +VendorID 0x1413, 'ADDONICS' +VendorID 0x1415, 'OXFORD SEMICONDUCTOR LTD' +VendorID 0x1418, 'KYUSHU ELECTRONICS SYSTEMS INC' +VendorID 0x1419, 'EXCEL SWITCHING CORP' +VendorID 0x141B, 'ZOOM TELEPHONICS INC' +VendorID 0x141E, 'FANUC LTD' +VendorID 0x1420, 'PSION DACOM PLC' +VendorID 0x1428, 'EDEC CO LTD' +VendorID 0x1429, 'UNEX TECHNOLOGY CORP' +VendorID 0x142A, 'KINGMAX TECHNOLOGY INC' +VendorID 0x142B, 'RADIOLAN' +VendorID 0x142C, 'MINTON OPTIC INDUSTRY CO LTD' +VendorID 0x142D, 'PIXSTREAM INC' +VendorID 0x1430, 'ITT AEROSPACE/COMMUNICATIONS DIVISION' +VendorID 0x1433, 'ELTEC ELEKTRONIK GMBH' +VendorID 0x1436, 'CIS TECHNOLOGY INC' +VendorID 0x1437, 'NISSIN INC CO' +VendorID 0x1438, 'ATMEL-DREAM' +VendorID 0x143F, 'LIGHTWELL CO LTD-ZAX DIVISION' +VendorID 0x1441, 'AGIE SA' +VendorID 0x1445, 'LOGICAL CO LTD' +VendorID 0x1446, 'GRAPHIN CO. LTD' +VendorID 0x1447, 'AIM GMBH' +VendorID 0x144A, 'ADLINK Technology Inc' +VendorID 0x144B, 'LORONIX INFORMATION SYSTEMS INC' +VendorID 0x144D, 'SAMSUNG ELECTRONICS CO LTD' +VendorID 0x1450, 'OCTAVE COMMUNICATIONS IND.' +VendorID 0x1451, 'SP3D CHIP DESIGN GMBH' +VendorID 0x1453, 'MYCOM INC' +VendorID 0x1455, 'LOGIC PLUS PLUS INC' +VendorID 0x1458, 'GIGA-BYTE TECHNOLOGY' +VendorID 0x145C, 'CRYPTEK' +VendorID 0x145F, 'BALDOR ELECTRIC COMPANY' +VendorID 0x1460, 'DYNARC INC' +VendorID 0x1461, 'AVERMEDIA Tech.' +VendorID 0x1462, 'MICRO-STAR INTERNATIONAL CO LTD' +VendorID 0x1463, 'FAST CORPORATION' +VendorID 0x1464, 'INTERACTIVE CIRCUITS & SYSTEMS LTD' +VendorID 0x1465, 'GN NETTEST TELECOM DIV.' +VendorID 0x1468, 'AMBIT MICROSYSTEMS CORP.' +VendorID 0x1469, 'CLEVELAND MOTION CONTROLS' +VendorID 0x146C, 'RUBY TECH CORP.' +VendorID 0x146D, 'TACHYON' +VendorID 0x146E, 'WILLIAMS ELECTRONICS GAMES.' +VendorID 0x1471, 'INTEGRATED TELECOM EXPRESS INC' +VendorID 0x1473, 'ZAPEX TECHNOLOGIES INC' +VendorID 0x1474, 'DOUG CARSON & ASSOCIATES' +VendorID 0x1477, 'NET INSIGHT' +VendorID 0x1478, 'DIATREND CORPORATION' +VendorID 0x147B, 'ABIT Computer' +VendorID 0x147F, 'NIHON UNISYS' +VendorID 0x1482, 'ISYTEC-Integrierte Systemtechnik Gmbh' +VendorID 0x1483, 'LABWAY COPORATION' +VendorID 0x1485, 'ERMA-ELECTRONIC GMBH' +VendorID 0x1489, 'KYE SYSTEMS CORPORATION' +VendorID 0x148A, 'OPTO 22' +VendorID 0x148B, 'INNOMEDIALOGIC INC.' +VendorID 0x148E, 'OSI PLUS CORPORATION' +VendorID 0x148F, 'PLANT EQUIPMENT.' +VendorID 0x1490, 'TC LABS PTY LTD.' +VendorID 0x1493, 'MAKER COMMUNICATIONS' +VendorID 0x1495, 'TOKAI COMMUNICATIONS INDUSTRY CO. LTD' +VendorID 0x1496, 'JOYTECH COMPUTER CO. LTD.' +VendorID 0x1497, 'SMA REGELSYSTEME GMBH' +VendorID 0x1499, 'EMTEC CO. LTD' +VendorID 0x149A, 'ANDOR TECHNOLOGY LTD' +VendorID 0x149B, 'SEIKO INSTRUMENTS INC' +VendorID 0x149C, 'OVISLINK CORP.' +VendorID 0x149D, 'NEWTEK INC' +VendorID 0x149E, 'MAPLETREE NETWORKS INC.' +VendorID 0x149F, 'LECTRON CO LTD' +VendorID 0x14A0, 'SOFTING GMBH' +VendorID 0x14A1, 'SYSTEMBASE CO LTD' +VendorID 0x14A2, 'MILLENNIUM ENGINEERING INC' +VendorID 0x14A3, 'MAVERICK NETWORKS' +VendorID 0x14A4, 'GVC/BCM ADVANCED RESEARCH' +VendorID 0x14A5, 'XIONICS DOCUMENT TECHNOLOGIES INC.' +VendorID 0x14A6, 'INOVA COMPUTERS GMBH & CO KG' +VendorID 0x14A8, 'FEATRON TECHNOLOGIES CORPORATION' +VendorID 0x14A9, 'HIVERTEC INC.' +VendorID 0x14AB, 'MENTOR GRAPHICS CORP.' +VendorID 0x14AC, 'NOVAWEB TECHNOLOGIES INC' +VendorID 0x14AD, 'TIME SPACE RADIO AB' +VendorID 0x14AE, 'CTI PET Systems' +VendorID 0x14AF, 'GUILLEMOT CORPORATION' +VendorID 0x14B0, 'BST COMMUNICATION TECHNOLOGY LTD' +VendorID 0x14B1, 'NEXTCOM K.K.' +VendorID 0x14B2, 'ENNOVATE NETWORKS INC' +VendorID 0x14B3, 'XPEED INC.' +VendorID 0x14B4, 'PHILIPS BUSINESS ELECTRONICS B.V.' +VendorID 0x14B5, 'CREAMWARE GMBH' +VendorID 0x14B6, 'QUANTUM DATA CORP.' +VendorID 0x14B7, 'PROXIM INC' +VendorID 0x14B8, 'TECHSOFT TECHNOLOGY CO LTD' +VendorID 0x14B9, 'AIRONET WIRELESS COMMUNICATIONS' +VendorID 0x14BA, 'INTERNIX INC.' +VendorID 0x14BB, 'SEMTECH CORPORATION' +VendorID 0x14BC, 'GLOBESPAN SEMICONDUCTOR INC.' +VendorID 0x14BD, 'CARDIO CONTROL N.V.' +VendorID 0x14BE, 'L3 COMMUNICATIONS' +VendorID 0x14BF, 'SPIDER COMMUNICATIONS INC.' +VendorID 0x14C0, 'COMPAL ELECTRONICS INC' +VendorID 0x14C1, 'MYRICOM INC.' +VendorID 0x14C2, 'DTK COMPUTER' +VendorID 0x14C3, 'MEDIATEK CORP.' +VendorID 0x14C4, 'IWASAKI INFORMATION SYSTEMS CO LTD' +VendorID 0x14C5, 'ABB AUTOMATION PRODUCTS' +VendorID 0x14C6, 'DATA RACE INC' +VendorID 0x14C7, 'MODULAR TECHNOLOY HOLDINGS LTD' +VendorID 0x14C8, 'TURBOCOMM TECH. INC.' +VendorID 0x14C9, 'ODIN TELESYSTEMS INC' +VendorID 0x14CA, 'PE LOGIC CORP.' +VendorID 0x14CB, 'Billionton Systems Inc./Cadmus Micro Inc.' +VendorID 0x14CC, 'NAKAYO TELECOMMUNICATIONS INC' +VendorID 0x14CD, 'UNIVERSAL SCIENTIFIC IND' +VendorID 0x14CE, 'WHISTLE COMMUNICATIONS' +VendorID 0x14CF, 'TEK MICROSYSTEMS INC.' +VendorID 0x14D0, 'ERICSSON AXE R & D' +VendorID 0x14D1, 'COMPUTER HI-TECH CO LTD' +VendorID 0x14D2, 'TITAN ELECTRONICS INC' +VendorID 0x14D3, 'CIRTECH (UK) LTD' +VendorID 0x14D4, 'PANACOM TECHNOLOGY CORP' +VendorID 0x14D5, 'NITSUKO CORPORATION' +VendorID 0x14D6, 'ACCUSYS' +VendorID 0x14D7, 'HIRAKAWA HEWTECH CORP' +VendorID 0x14D8, 'HOPF ELEKTRONIK GMBH' +VendorID 0x14D9, 'ALPHA PROCESSOR INC' +VendorID 0x14DA, 'NATIONAL AEROSPACE LABORATORIES' +VendorID 0x14DB, 'AVLAB TECHNOLOGY INC' +VendorID 0x14DC, 'AMPLICON LIVELINE LTD' +VendorID 0x14DD, 'IMODL INC.' +VendorID 0x14DE, 'APPLIED INTEGRATION CORPORATION' +VendorID 0x14DF, 'BASIS COMMUNICATIONS CORP' +VendorID 0x14E1, 'INVERTEX' +VendorID 0x14E2, 'INFOLIBRIA' +VendorID 0x14E3, 'AMTELCO' +VendorID 0x14E4, 'BROADCOM CORPORATION' +VendorID 0x14E5, 'PIXELFUSION LTD' +VendorID 0x14E6, 'SHINING TECHNOLOGY INC' +VendorID 0x14E7, '3CX' +VendorID 0x14E8, 'RAYCER INC' +VendorID 0x14E9, 'GARNETS SYSTEM CO LTD' +VendorID 0x14EA, 'PLANEX COMMUNICATIONS INC' +VendorID 0x14EB, 'SEIKO EPSON CORPORATION' +VendorID 0x14EC, 'ACQIRIS' +VendorID 0x14ED, 'DATAKINETICS LTD' +VendorID 0x14EE, 'MASPRO KENKOH CORP' +VendorID 0x14EF, 'CARRY COMPUTER ENG. CO LTD' +VendorID 0x14F0, 'CANON RESEACH CENTRE FRANCE' +VendorID 0x14F1, 'Conexant Systems, Inc' +VendorID 0x14F2, 'Mobility Electronics, Inc.' +VendorID 0x14F3, 'BROADLOGIC' +VendorID 0x14F4, 'TOKYO ELECTRONIC INDUSTRY CO LTD' +VendorID 0x14F5, 'SOPAC LTD' +VendorID 0x14F6, 'COYOTE TECHNOLOGIES LLC' +VendorID 0x14F7, 'WOLF TECHNOLOGY INC' +VendorID 0x14F8, 'AUDIOCODES INC' +VendorID 0x14F9, 'AG COMMUNICATIONS' +VendorID 0x14FA, 'WAVETEK WANDEL & GOLTERMANN' +VendorID 0x14FB, 'TRANSAS MARINE (UK) LTD' +VendorID 0x14FC, 'QUADRICS SUPERCOMPUTERS WORLD' +VendorID 0x14FD, 'JAPAN COMPUTER INDUSTRY INC.' +VendorID 0x14FE, 'ARCHTEK TELECOM CORP.' +VendorID 0x14FF, 'TWINHEAD INTERNATIONAL CORP' +VendorID 0x1500, 'LANTECH COMPUTER COMPANY' +VendorID 0x1501, 'BANKSOFT CANADA LTD' +VendorID 0x1502, 'MITSUBISHI ELECTRIC LOGISTICS SUPPORT CO' +VendorID 0x1503, 'KAWASAKI LSI USA INC' +VendorID 0x1504, 'KAISER ELECTRONICS' +VendorID 0x1505, 'ITA INGENIEURBURO FUR TESTAUFGABEN GMBH' +VendorID 0x1506, 'CHAMELEON SYSTEMS INC' +VendorID 0x1507, 'HTEC LTD' +VendorID 0x1508, 'HONDA CONNECTORS/MHOTRONICS INC' +VendorID 0x1509, 'FIRST INTERNATIONAL COMPUTER INC' +VendorID 0x150A, 'FORVUS RESEARCH INC' +VendorID 0x150B, 'YAMASHITA SYSTEMS CORP' +VendorID 0x150C, 'KYOPAL CO LTD' +VendorID 0x150D, 'WARPSPPED INC' +VendorID 0x150E, 'C-PORT CORPORATION' +VendorID 0x150F, 'INTEC GMBH' +VendorID 0x1510, 'BEHAVIOR TECH COMPUTER CORP' +VendorID 0x1511, 'CENTILLIUM TECHNOLOGY CORP' +VendorID 0x1512, 'ROSUN TECHNOLOGIES INC' +VendorID 0x1513, 'RAYCHEM' +VendorID 0x1514, 'TFL LAN INC' +VendorID 0x1515, 'ICS ADVENT' +VendorID 0x1516, 'MYSON TECHNOLOGY INC' +VendorID 0x1517, 'ECHOTEK CORPORATION' +VendorID 0x1518, 'PEP MODULAR COMPUTERS GMBH' +VendorID 0x1519, 'TELEFON AKTIEBOLAGET LM Ericsson' +VendorID 0x151A, 'GLOBETEK INC' +VendorID 0x151B, 'COMBOX LTD' +VendorID 0x151C, 'DIGITAL AUDIO LABS INC' +VendorID 0x151D, 'FUJITSU COMPUTER PRODUCTS OF AMERICA' +VendorID 0x151E, 'MATRIX CORP.' +VendorID 0x151F, 'TOPIC SEMICONDUCTOR CORP' +VendorID 0x1520, 'CHAPLET SYSTEM INC' +VendorID 0x1521, 'BELL CORPORATION' +VendorID 0x1522, 'MAINPINE LIMITED' +VendorID 0x1523, 'MUSIC SEMICONDUCTORS' +VendorID 0x1524, 'ENE TECHNOLOGY INC' +VendorID 0x1525, 'IMPACT TECHNOLOGIES' +VendorID 0x1526, 'ISS' +VendorID 0x1527, 'SOLECTRON' +VendorID 0x1528, 'ACKSYS' +VendorID 0x1529, 'AMERICAN MICROSYSTEMS INC' +VendorID 0x152A, 'QUICKTURN DESIGN SYSTEMS' +VendorID 0x152B, 'FLYTECH TECHNOLOGY CO LTD' +VendorID 0x152C, 'MACRAIGOR SYSTEMS LLC' +VendorID 0x152D, 'QUANTA COMPUTER INC' +VendorID 0x152E, 'MELEC INC' +VendorID 0x152F, 'PHILIPS-CRYPTO' +VendorID 0x1530, 'ACQIS TECHNOLOGY' +VendorID 0x1531, 'CHRYON CORP.' +VendorID 0x1532, 'ECHELON CORPORATION' +VendorID 0x1533, 'BALTIMORE' +VendorID 0x1534, 'ROAD CORPORATION' +VendorID 0x1535, 'EVERGREEN TECHNOLOGIES INC' +VendorID 0x1537, 'DATALEX COMMUNCATIONS' +VendorID 0x1538, 'ARALION INC.' +VendorID 0x1539, 'ATELIER INFORMATIQUES et ELECTRONIQUE ETUDES S.A.' +VendorID 0x153A, 'ONO SOKKI' +VendorID 0x153B, 'TERRATEC ELECTRONIC GMBH' +VendorID 0x153C, 'ANTAL ELECTRONIC' +VendorID 0x153D, 'FILANET CORPORATION' +VendorID 0x153E, 'TECHWELL INC' +VendorID 0x153F, 'MIPS DENMARK' +VendorID 0x1540, 'PROVIDEO MULTIMEDIA CO LTD' +VendorID 0x1541, 'TELOSITY INC.' +VendorID 0x1542, 'VIVID TECHNOLOGY INC' +VendorID 0x1543, 'SILICON LABORATORIES' +VendorID 0x1544, 'DCM DATA SYSTEMS' +VendorID 0x1545, 'VISIONTEK' +VendorID 0x1546, 'IOI TECHNOLOGY CORP.' +VendorID 0x1547, 'MITUTOYO CORPORATION' +VendorID 0x1548, 'JET PROPULSION LABORATORY' +VendorID 0x1549, 'INTERCONNECT SYSTEMS SOLUTIONS' +VendorID 0x154A, 'MAX TECHNOLOGIES INC.' +VendorID 0x154B, 'COMPUTEX CO LTD' +VendorID 0x154C, 'VISUAL TECHNOLOGY INC.' +VendorID 0x154D, 'PAN INTERNATIONAL INDUSTRIAL CORP' +VendorID 0x154E, 'SERVOTEST LTD' +VendorID 0x154F, 'STRATABEAM TECHNOLOGY' +VendorID 0x1550, 'OPEN NETWORK CO LTD' +VendorID 0x1551, 'SMART ELECTRONIC DEVELOPMENT GMBH' +VendorID 0x1552, 'RACAL AIRTECH LTD' +VendorID 0x1553, 'CHICONY ELECTRONICS CO LTD' +VendorID 0x1554, 'PROLINK MICROSYSTEMS CORP.' +VendorID 0x1555, 'GESYTEC GMBH' +VendorID 0x1556, 'PLD APPLICATIONS' +VendorID 0x1557, 'MEDIASTAR CO. LTD' +VendorID 0x1558, 'CLEVO/KAPOK COMPUTER' +VendorID 0x1559, 'SI LOGIC LTD' +VendorID 0x155A, 'INNOMEDIA INC' +VendorID 0x155B, 'PROTAC INTERNATIONAL CORP' +VendorID 0x155C, 'CEMAX-ICON INC' +VendorID 0x155D, 'MAC SYSTEM CO LTD' +VendorID 0x155E, 'LP ELEKTRONIK GMBH/KUKA Controls GmbH' +VendorID 0x155F, 'PERLE SYSTEMS LIMITED' +VendorID 0x1560, 'TERAYON COMMUNICATIONS SYSTEMS' +VendorID 0x1561, 'VIEWGRAPHICS INC' +VendorID 0x1562, 'Symbol Technologies, Inc.' +VendorID 0x1563, 'A-TREND' +VendorID 0x1564, 'YAMAKATSU ELECTRONICS INDUSTRY CO LTD' +VendorID 0x1565, 'BIOSTAR MICROTECH INT CORP' +VendorID 0x1566, 'ARDENT TECHNOLOGIES INC' +VendorID 0x1567, 'JUNGSOFT' +VendorID 0x1568, 'DDK ELECTRONICS INC' +VendorID 0x1569, 'PALIT MICROSYSTEMS INC' +VendorID 0x156A, 'AVTEC SYSTEMS' +VendorID 0x156B, '2WIRE' +VendorID 0x156C, 'VIDAC ELECTRONICS GMBH' +VendorID 0x156D, 'ALPHA-TOP CORP' +VendorID 0x156E, 'ALFA INC' +VendorID 0x156F, 'M-SYSTEMS FLASH DISK PIONEERS LTD' +VendorID 0x1570, 'LECROY CORPORATION' +VendorID 0x1571, 'CONTEMPORARY CONTROLS' +VendorID 0x1572, 'OTIS ELEVATOR COMPANY' +VendorID 0x1573, 'LATTICE-VANTIS' +VendorID 0x1574, 'FAIRCHILD SEMICONDUCTOR' +VendorID 0x1575, 'VOLTAIRE ADVANCED DATA SECURITY LTD' +VendorID 0x1576, 'VIEWCAST COM' +VendorID 0x1578, 'HITT' +VendorID 0x1579, 'DUAL TECHNOLOGY CORPORATION' +VendorID 0x157A, 'JAPAN ELECRONICS IND. INC' +VendorID 0x157B, 'STAR MULTIMEDIA CORP.' +VendorID 0x157C, 'EUROSOFT (UK) LTD' +VendorID 0x157D, 'GEMFLEX NETWORKS' +VendorID 0x157E, 'TRANSITION NETWORKS' +VendorID 0x157F, 'PX INSTRUMENTS TECHNOLOGY LTD' +VendorID 0x1580, 'PRIMEX AEROSPACE CO.' +VendorID 0x1581, 'SEH COMPUTERTECHNIK GMBH' +VendorID 0x1582, 'CYTEC CORPORATION' +VendorID 0x1583, 'INET TECHNOLOGIES INC' +VendorID 0x1584, 'UNIWILL COMPUTER CORP' +VendorID 0x1585, 'LOGITRON' +VendorID 0x1586, 'LANCAST INC' +VendorID 0x1587, 'KONICA CORPORATION' +VendorID 0x1588, 'SOLIDUM SYSTEMS CORP' +VendorID 0x1589, 'ATLANTEK MICROSYSTEMS PTY LTD' +VendorID 0x158A, 'DIGALOG SYSTEMS INC' +VendorID 0x158B, 'ALLIED DATA TECHNOLOGIES' +VendorID 0x158C, 'HITACHI SEMICONDUCTOR & DEVICES SALES CO LTD' +VendorID 0x158D, 'POINT MULTIMEDIA SYSTEMS' +VendorID 0x158E, 'LARA TECHNOLOGY INC' +VendorID 0x158F, 'DITECT COOP' +VendorID 0x1590, '3PARDATA' +VendorID 0x1591, 'ARN' +VendorID 0x1592, 'SYBA TECH LIMITED' +VendorID 0x1593, 'BOPS INC' +VendorID 0x1594, 'NETGAME LTD' +VendorID 0x1595, 'DIVA SYSTEMS CORP.' +VendorID 0x1596, 'FOLSOM RESEARCH INC' +VendorID 0x1597, 'MEMEC DESIGN SERVICES' +VendorID 0x1598, 'GRANITE MICROSYSTEMS' +VendorID 0x1599, 'DELTA ELECTRONICS INC' +VendorID 0x159A, 'GENERAL INSTRUMENT' +VendorID 0x159B, 'FARADAY TECHNOLOGY CORP' +VendorID 0x159C, 'STRATUS COMPUTER SYSTEMS' +VendorID 0x159D, 'NINGBO HARRISON ELECTRONICS CO LTD' +VendorID 0x159E, 'A-MAX TECHNOLOGY' +VendorID 0x159F, 'GALEA NETWORK SECURITY' +VendorID 0x15A0, 'COMPUMASTER SRL' +VendorID 0x15A1, 'GEOCAST NETWORK SYSTEMS INC' +VendorID 0x15A2, 'CATALYST ENTERPRISES INC' +VendorID 0x15A3, 'ITALTEL' +VendorID 0x15A4, 'X-NET OY' +VendorID 0x15A5, 'TOYOTA MACS INC' +VendorID 0x15A6, 'SUNLIGHT ULTRASOUND TECHNOLOGIES LTD' +VendorID 0x15A7, 'SSE TELECOM INC' +VendorID 0x15A8, 'SHANGHAI COMMUNICATIONS TECHNOLOGIES CENTER' +VendorID 0x15AA, 'MORETON BAY' +VendorID 0x15AB, 'BLUESTEEL NETWORKS INC' +VendorID 0x15AC, 'NORTH ATLANTIC INSTRUMENTS' +VendorID 0x15AD, 'VMware Inc.' +VendorID 0x15AE, 'AMERSHAM PHARMACIA BIOTECH' +VendorID 0x15B0, 'ZOLTRIX INTERNATIONAL LIMITED' +VendorID 0x15B1, 'SOURCE TECHNOLOGY INC' +VendorID 0x15B2, 'MOSAID TECHNOLOGIES INC.' +VendorID 0x15B3, 'MELLANOX TECHNOLOGY' +VendorID 0x15B4, 'CCI/TRIAD' +VendorID 0x15B5, 'CIMETRICS INC' +VendorID 0x15B6, 'TEXAS MEMORY SYSTEMS INC' +VendorID 0x15B7, 'SANDISK CORP.' +VendorID 0x15B8, 'ADDI-DATA GMBH' +VendorID 0x15B9, 'MAESTRO DIGITAL COMMUNICATIONS' +VendorID 0x15BA, 'IMPACCT TECHNOLOGY CORP' +VendorID 0x15BB, 'PORTWELL INC' +VendorID 0x15BC, 'AGILENT TECHNOLOGIES' +VendorID 0x15BD, 'DFI INC.' +VendorID 0x15BE, 'SOLA ELECTRONICS' +VendorID 0x15BF, 'HIGH TECH COMPUTER CORP (HTC)' +VendorID 0x15C0, 'BVM LIMITED' +VendorID 0x15C1, 'QUANTEL' +VendorID 0x15C2, 'NEWER TECHNOLOGY INC' +VendorID 0x15C3, 'TAIWAN MYCOMP CO LTD' +VendorID 0x15C4, 'EVSX' +VendorID 0x15C5, 'PROCOMP INFORMATICS LTD' +VendorID 0x15C6, 'TECHNICAL UNIVERSITY OF BUDAPEST' +VendorID 0x15C7, 'TATEYAMA SYSTEM LABORATORY CO LTD' +VendorID 0x15C8, 'PENTA MEDIA CO. LTD' +VendorID 0x15C9, 'SEROME TECHNOLOGY INC' +VendorID 0x15CA, 'BITBOYS OY' +VendorID 0x15CB, 'AG ELECTRONICS LTD' +VendorID 0x15CC, 'HOTRAIL INC.' +VendorID 0x15CD, 'DREAMTECH CO LTD' +VendorID 0x15CE, 'GENRAD INC.' +VendorID 0x15CF, 'HILSCHER GMBH' +VendorID 0x15D1, 'INFINEON TECHNOLOGIES AG' +VendorID 0x15D2, 'FIC (FIRST INTERNATIONAL COMPUTER INC)' +VendorID 0x15D3, 'NDS TECHNOLOGIES ISRAEL LTD' +VendorID 0x15D4, 'IWILL CORPORATION' +VendorID 0x15D5, 'TATUNG CO.' +VendorID 0x15D6, 'ENTRIDIA CORPORATION' +VendorID 0x15D7, 'Rockwell-Collins Inc' +VendorID 0x15D8, 'CYBERNETICS TECHNOLOGY CO LTD' +VendorID 0x15D9, 'SUPER MICRO COMPUTER INC' +VendorID 0x15DA, 'CYBERFIRM INC.' +VendorID 0x15DB, 'APPLIED COMPUTING SYSTEMS INC.' +VendorID 0x15DC, 'LITRONIC INC' +VendorID 0x15DD, 'SIGMATEL INC.' +VendorID 0x15DE, 'MALLEABLE TECHNOLOGIES INC' +VendorID 0x15DF, 'INFINILINK CORP.' +VendorID 0x15E0, 'CACHEFLOW INC' +VendorID 0x15E1, 'VOICE TECHNOLOGIES GROUP INC' +VendorID 0x15E2, 'QUICKNET TECHNOLOGIES INC' +VendorID 0x15E3, 'NETWORTH TECHNOLOGIES INC' +VendorID 0x15E4, 'VSN SYSTEMEN BV' +VendorID 0x15E5, 'VALLEY TECHNOLOGIES INC' +VendorID 0x15E6, 'AGERE INC.' +VendorID 0x15E7, 'GET ENGINEERING CORP.' +VendorID 0x15E8, 'NATIONAL DATACOMM CORP.' +VendorID 0x15E9, 'PACIFIC DIGITAL CORP.' +VendorID 0x15EA, 'TOKYO DENSHI SEKEI K.K.' +VendorID 0x15EB, 'DRSEARCH GMBH' +VendorID 0x15EC, 'BECKHOFF GMBH' +VendorID 0x15ED, 'MACROLINK INC' +VendorID 0x15EE, 'IN WIN DEVELOPMENT INC.' +VendorID 0x15EF, 'INTELLIGENT PARADIGM INC' +VendorID 0x15F0, 'B-TREE SYSTEMS INC' +VendorID 0x15F1, 'TIMES N SYSTEMS INC' +VendorID 0x15F2, 'DIAGNOSTIC INSTRUMENTS INC' +VendorID 0x15F3, 'DIGITMEDIA CORP.' +VendorID 0x15F4, 'VALUESOFT' +VendorID 0x15F5, 'POWER MICRO RESEARCH' +VendorID 0x15F6, 'EXTREME PACKET DEVICE INC' +VendorID 0x15F7, 'BANCTEC' +VendorID 0x15F8, 'KOGA ELECTRONICS CO' +VendorID 0x15F9, 'ZENITH ELECTRONICS CORPORATION' +VendorID 0x15FA, 'J P AXZAM CORPORATION' +VendorID 0x15FB, 'ZILOG INC.' +VendorID 0x15FC, 'TECHSAN ELECTRONICS CO LTD' +VendorID 0x15FD, 'N-CUBED.NET' +VendorID 0x15FE, 'KINPO ELECTRONICS INC' +VendorID 0x15FF, 'FASTPOINT TECHNOLOGIES INC.' +VendorID 0x1600, 'NORTHROP GRUMMAN-CANADA LTD' +VendorID 0x1601, 'TENTA TECHNOLOGY' +VendorID 0x1602, 'PROSYS-TEC INC.' +VendorID 0x1603, 'NOKIA WIRELESS BUSINESS COMMUNICATIONS' +VendorID 0x1604, 'CENTRAL SYSTEM RESEARCH CO LTD' +VendorID 0x1605, 'PAIRGAIN TECHNOLOGIES' +VendorID 0x1606, 'EUROPOP AG' +VendorID 0x1607, 'LAVA SEMICONDUCTOR MANUFACTURING INC.' +VendorID 0x1608, 'AUTOMATED WAGERING INTERNATIONAL' +VendorID 0x1609, 'SCIEMETRIC INSTRUMENTS INC' +VendorID 0x166D, 'Broadcom -SiByte' +VendorID 0x1695, 'EPOX Computer Co' +VendorID 0x17F2, 'ALBATRON Corp.' +VendorID 0x1813, 'AMBIENT TECHNOLOGIES INC' +VendorID 0x1849, 'ASROCK Inc' +VendorID 0x1B13, 'Jaton Corp' +VendorID 0x2001, 'TEMPORAL RESEARCH LTD' +VendorID 0x270F, 'CHAINTECH COMPUTER CO. LTD' +VendorID 0x3388, 'HINT CORP' +VendorID 0x3411, 'QUANTUM DESIGNS (H.K.) INC.' +VendorID 0x4005, 'AVANCE LOGIC INC' +VendorID 0x4033, 'DELTA NETWORKS INC' +VendorID 0x416C, 'ALADDIN KNOWLEDGE SYSTEMS' +VendorID 0x4444, 'CONEXANT (WAS ICOMPRESION INC.)' +VendorID 0x4943, 'GROWTH NETWORKS' +VendorID 0x4CA1, 'SEANIX TECHNOLOGY INC' +VendorID 0x4D51, 'MEDIAQ INC.' +VendorID 0x4D54, 'MICROTECHNICA CO LTD' +VendorID 0x5136, 'S S TECHNOLOGIES' +VendorID 0x5333, 'S3 Graphics Co., Ltd.' +VendorID 0x544C, 'TERALOGIC INC' +VendorID 0x5555, 'GENROCO INC' +VendorID 0x6409, 'LOGITEC CORP.' +VendorID 0x6666, 'DECISION COMPUTER INTERNATIONAL CO.' +VendorID 0x8086, 'Intel Corp.' +VendorID 0x8888, 'SILICON MAGIC CORP.' +VendorID 0x8E0E, 'COMPUTONE CORPORATION' +VendorID 0x9004, 'Adaptec Inc' +VendorID 0x919A, 'GIGAPIXEL CORP' +VendorID 0x9412, 'HOLTEK' +VendorID 0x9699, 'OMNI MEDIA TECHNOLOGY INC.' +VendorID 0x9710, 'NetMos' +VendorID 0xA0A0, 'AOPEN INC.' +VendorID 0xA259, 'HEWLETT PACKARD' +VendorID 0xAC1E, 'DIGITAL RECEIVER TECHNOLOGY INC' +VendorID 0xC0DE, 'MOTOROLA' +VendorID 0xC0FE, 'MOTION ENGINEERING.' +VendorID 0xCA50, 'VARIAN AUSTRIALIA PTY LTD' +VendorID 0xCAFE, 'CHRYSALIS-ITS' +VendorID 0xCCCC, 'CATAPULT COMMUNICATIONS' +VendorID 0xD4D4, 'DY4 Systems Inc/Curtiss-Wright Controls Embed. Com' +VendorID 0xE159, 'TigerJet' +VendorID 0xE4BF, 'EKF ELEKTRONIK GMBH' +VendorID 0xEA01, 'EAGLE TECHNOLOGY' +VendorID 0xFA57, 'FAST SEARCH & TRANSFER ASA' +VendorID 0xFEDA, 'EPIGRAM INC' +VendorID 0, 'Unknown' ; <- terminator + +;-------------------------------------- +Classes: +; Class, Subclass, [Interface], Name +ClassID 2, 0, , 'Ethernet' +ClassID 2, 1, , 'Token Ring' +ClassID 2, 2, , 'FDDI' +ClassID 2, 3, , 'ATM' +ClassID 2, 4, , 'ISDN' +ClassID 2, 5, , 'WorldFip' +ClassID 2, 6, , 'PICMG 2.14' +ClassID 2, 0x80, , 'misc' + +ClassID 0x0d, 0x20, , 'Wlan (802.11a)' +ClassID 0x0d, 0x21, , 'Wlan (802.11b)' + + +ClassID 0xff, 0xff, , 'Unknown' ; <- terminator \ No newline at end of file diff --git a/kernel/branches/net/applications/zeroconf/debug-fdo.inc b/kernel/branches/net/applications/zeroconf/debug-fdo.inc new file mode 100644 index 0000000000..40b2cb00e4 --- /dev/null +++ b/kernel/branches/net/applications/zeroconf/debug-fdo.inc @@ -0,0 +1,422 @@ +; +; Formatted Debug Output (FDO) +; Copyright (c) 2005-2006, mike.dld +; Created: 2005-01-29, Changed: 2006-11-10 +; +; For questions and bug reports, mail to mike.dld@gmail.com +; +; Available format specifiers are: %s, %d, %u, %x (with partial width support) +; + +; to be defined: +; __DEBUG__ equ 1 +; __DEBUG_LEVEL__ equ 5 + +macro debug_func name { + if used name + name@of@func equ name +} + +macro debug_beginf { + align 4 + name@of@func: +} + +debug_endf fix end if + +macro DEBUGS _sign,[_str] { + common + local tp + tp equ 0 + match _arg:_num,_str \{ + DEBUGS_N _sign,_num,_arg + tp equ 1 + \} + match =0 _arg,tp _str \{ + DEBUGS_N _sign,,_arg + \} +} + +macro DEBUGS_N _sign,_num,[_str] { + common + pushf + pushad + local ..str,..label,is_str + is_str = 0 + forward + if _str eqtype '' + is_str = 1 + end if + common + if is_str = 1 + jmp ..label + ..str db _str,0 + ..label: + add esp,4*8+4 + mov edx,..str + sub esp,4*8+4 + else + mov edx,_str + end if + if ~_num eq + if _num eqtype eax + if _num in + mov esi,_num + else if ~_num eq esi + movzx esi,_num + end if + else if _num eqtype 0 + mov esi,_num + else + local tp + tp equ 0 + match [_arg],_num \{ + mov esi,dword[_arg] + tp equ 1 + \} + match =0 =dword[_arg],tp _num \{ + mov esi,dword[_arg] + tp equ 1 + \} + match =0 =word[_arg],tp _num \{ + movzx esi,word[_arg] + tp equ 1 + \} + match =0 =byte[_arg],tp _num \{ + movzx esi,byte[_arg] + tp equ 1 + \} + match =0,tp \{ + 'Error: specified string width is incorrect' + \} + end if + else + mov esi,0x7FFFFFFF + end if + call fdo_debug_outstr + popad + popf +} + +macro DEBUGD _sign,_dec { + local tp + tp equ 0 + match _arg:_num,_dec \{ + DEBUGD_N _sign,_num,_arg + tp equ 1 + \} + match =0 _arg,tp _dec \{ + DEBUGD_N _sign,,_arg + \} +} + +macro DEBUGD_N _sign,_num,_dec { + pushf + pushad + if (~_num eq) + if (_dec eqtype eax | _dec eqtype 0) + 'Error: precision allowed only for in-memory variables' + end if + if (~_num in <1,2,4>) + if _sign + 'Error: 1, 2 and 4 are only allowed for precision in %d' + else + 'Error: 1, 2 and 4 are only allowed for precision in %u' + end if + end if + end if + if _dec eqtype eax + if _dec in + mov eax,_dec + else if ~_dec eq eax + if _sign = 1 + movsx eax,_dec + else + movzx eax,_dec + end if + end if + else if _dec eqtype 0 + mov eax,_dec + else + add esp,4*8+4 + if _num eq + mov eax,dword _dec + else if _num = 1 + if _sign = 1 + movsx eax,byte _dec + else + movzx eax,byte _dec + end if + else if _num = 2 + if _sign = 1 + movsx eax,word _dec + else + movzx eax,word _dec + end if + else + mov eax,dword _dec + end if + sub esp,4*8+4 + end if + mov cl,_sign + call fdo_debug_outdec + popad + popf +} + +macro DEBUGH _sign,_hex { + local tp + tp equ 0 + match _arg:_num,_hex \{ + DEBUGH_N _sign,_num,_arg + tp equ 1 + \} + match =0 _arg,tp _hex \{ + DEBUGH_N _sign,,_arg + \} +} + +macro DEBUGH_N _sign,_num,_hex { + pushf + pushad + if (~_num eq) & (~_num in <1,2,3,4,5,6,7,8>) + 'Error: 1..8 are only allowed for precision in %x' + end if + if _hex eqtype eax + if _hex in + if ~_hex eq eax + mov eax,_hex + end if + else if _hex in + if ~_hex eq ax + movzx eax,_hex + end if + shl eax,16 + if (_num eq) + mov edx,4 + end if + else if _hex in + if ~_hex eq al + movzx eax,_hex + end if + shl eax,24 + if (_num eq) + mov edx,2 + end if + end if + else if _hex eqtype 0 + mov eax,_hex + else + add esp,4*8+4 + mov eax,dword _hex + sub esp,4*8+4 + end if + if ~_num eq + mov edx,_num + else + mov edx,8 + end if + call fdo_debug_outhex + popad + popf +} + +;----------------------------------------------------------------------------- + +debug_func fdo_debug_outchar +debug_beginf + pushad + mov cl,al + mov ebx,1 + mov eax,63 + mcall + popad + ret +debug_endf + +debug_func fdo_debug_outstr +debug_beginf + mov eax,63 + mov ebx,1 + .l1: dec esi + js .l2 + mov cl,[edx] + or cl,cl + jz .l2 + mcall + inc edx + jmp .l1 + .l2: ret +debug_endf + +debug_func fdo_debug_outdec +debug_beginf + or cl,cl + jz @f + or eax,eax + jns @f + neg eax + push eax + mov al,'-' + call fdo_debug_outchar + pop eax + @@: push 10 + pop ecx + push -'0' + .l1: xor edx,edx + div ecx + push edx + test eax,eax + jnz .l1 + .l2: pop eax + add al,'0' + jz .l3 + call fdo_debug_outchar + jmp .l2 + .l3: ret +debug_endf + +debug_func fdo_debug_outhex + __fdo_hexdigits db '0123456789ABCDEF' +debug_beginf + mov cl,dl + neg cl + add cl,8 + shl cl,2 + rol eax,cl + .l1: rol eax,4 + push eax + and eax,0x0000000F + mov al,[__fdo_hexdigits+eax] + call fdo_debug_outchar + pop eax + dec edx + jnz .l1 + ret +debug_endf + +;----------------------------------------------------------------------------- + +macro DEBUGF _level,_format,[_arg] { + common + if __DEBUG__ = 1 & _level >= __DEBUG_LEVEL__ + local ..f1,f2,a1,a2,c1,c2,c3,..lbl + _debug_str_ equ __debug_str_ # a1 + a1 = 0 + c2 = 0 + c3 = 0 + f2 = 0 + repeat ..lbl-..f1 + virtual at 0 + db _format,0,0 + load c1 word from %-1 + end virtual + if c1 = '%s' + virtual at 0 + db _format,0,0 + store word 0 at %-1 + load c1 from f2-c2 + end virtual + if c1 <> 0 + DEBUGS 0,_debug_str_+f2-c2 + end if + c2 = c2 + 1 + f2 = %+1 + DEBUGF_HELPER S,a1,0,_arg + else if c1 = '%x' + virtual at 0 + db _format,0,0 + store word 0 at %-1 + load c1 from f2-c2 + end virtual + if c1 <> 0 + DEBUGS 0,_debug_str_+f2-c2 + end if + c2 = c2 + 1 + f2 = %+1 + DEBUGF_HELPER H,a1,0,_arg + else if c1 = '%d' | c1 = '%u' + local c4 + if c1 = '%d' + c4 = 1 + else + c4 = 0 + end if + virtual at 0 + db _format,0,0 + store word 0 at %-1 + load c1 from f2-c2 + end virtual + if c1 <> 0 + DEBUGS 0,_debug_str_+f2-c2 + end if + c2 = c2 + 1 + f2 = %+1 + DEBUGF_HELPER D,a1,c4,_arg + else if c1 = '\n' + c3 = c3 + 1 + end if + end repeat + virtual at 0 + db _format,0,0 + load c1 from f2-c2 + end virtual + if (c1<>0)&(f2<>..lbl-..f1-1) + DEBUGS 0,_debug_str_+f2-c2 + end if + virtual at 0 + ..f1 db _format,0 + ..lbl: + __debug_strings equ __debug_strings,_debug_str_,<_format>,..lbl-..f1-1-c2-c3 + end virtual + end if +} + +macro __include_debug_strings dummy,[_id,_fmt,_len] { + common + local c1,a1,a2 + forward + if defined _len & ~_len eq + _id: + a1 = 0 + a2 = 0 + repeat _len + virtual at 0 + db _fmt,0,0 + load c1 word from %+a2-1 + end virtual + if (c1='%s')|(c1='%x')|(c1='%d')|(c1='%u') + db 0 + a2 = a2 + 1 + else if (c1='\n') + dw $0A0D + a1 = a1 + 1 + a2 = a2 + 1 + else + db c1 and 0x0FF + end if + end repeat + db 0 + end if +} + +macro DEBUGF_HELPER _letter,_num,_sign,[_arg] { + common + local num + num = 0 + forward + if num = _num + DEBUG#_letter _sign,_arg + end if + num = num+1 + common + _num = _num+1 +} + +macro include_debug_strings { + if __DEBUG__ = 1 + match dbg_str,__debug_strings \{ + __include_debug_strings dbg_str + \} + end if +} diff --git a/kernel/branches/net/applications/zeroconf/dhcp.inc b/kernel/branches/net/applications/zeroconf/dhcp.inc new file mode 100644 index 0000000000..afe6c8fbaf --- /dev/null +++ b/kernel/branches/net/applications/zeroconf/dhcp.inc @@ -0,0 +1,263 @@ +;Name Number Length Meaning + +dhcp_pad_option equ 0 ; 0 None +dhcp_end_option equ 255 ; 0 None +dhcp_subnet_mask equ 1 ; 4 Subnet Mask Value +dhcp_time_offset equ 2 ; 4 Time Offset in Seconds from UTC +dhcp_router equ 3 ; NЧ4 Router addresses +dhcp_time_server equ 4 ; NЧ4 Timeserver addresses +dhcp_name_server equ 5 ; NЧ4 IEN-116 Server addresses +dhcp_domain_server equ 6 ; NЧ4 DNS Server addresses +dhcp_log_server equ 7 ; NЧ4 Logging Server addresses +dhcp_quotes_server equ 8 ; NЧ4 Quotes Server addresses +dhcp_lpr_server equ 9 ; NЧ4 Printer Server addresses +dhcp_impress_server equ 10 ; NЧ4 Impress Server addresses +dhcp_rlp_server equ 11 ; NЧ4 N RLP Server addresses +dhcp_hostname equ 12 ; N Hostname string +dhcp_boot_file_size equ 13 ; 2 Size of boot file in 512-octet blocks +dhcp_merit_dump_file equ 14 ; N Client to dump and name the file to dump it to +dhcp_domain_name equ 15 ; N The DNS domain name of the client +dhcp_swap_server equ 16 ; 4 Swap Server address +dhcp_root_path equ 17 ; N Path name for root disk +dhcp_extension_file equ 18 ; N Path name for more BOOTP info + +;IP Layer Parameters per Host + +dhcp_forward equ 19 ; 1 Enable/Disable IP Forwarding +dhcp_srcrte equ 20 ; 1 Enable/Disable Non-Local Source Routing +dhcp_policy equ 21 ; NЧ8 Non-Local Source Routing Policy Filters +dhcp_mag_dg_assembly equ 22 ; 2 Max Datagram Reassembly Size +dhcp_default_ip_tll equ 23 ; 1 Default IP Time to Live +dhcp_mtu_timeout equ 24 ; 4 Path MTU Aging Timeout +dhcp_mtu_plateau equ 25 ; NЧ2 Path MTU Plateau Table + +;IP Layer Parameters per Interface + +dhcp_mtu_interface equ 26 ; 2 Interface MTU Size +dhcp_mtu_subnet equ 27 ; 1 All Subnets are Local +dhcp_broadcast_address equ 28 ; 4 Broadcast Address +dhcp_mask_discovery equ 29 ; 1 Perform Mask Discovery +dhcp_mask_supplier equ 30 ; 1 Provide Mask to Others +dhcp_router_discovery equ 31 ; 1 Perform Router Discovery +dhcp_router_request equ 32 ; 4 Router Solicitation Address +dhcp_static_route equ 33 ; NЧ8 Static Routing Table + +;Link Layer Parameters per Interface + +dhcp_trailers equ 34 ; 1 Trailer Encapsulation +dhcp_arp_timeout equ 35 ; 4 ARP Cache Timeout +dhcp_ethernet equ 36 ; 1 Ethernet Encapsulation + +;TCP Parameters + +dhcp_default_tcp_tll equ 37 ; 1 Default TCP Time to Live +dhcp_keepalive_time equ 38 ; 4 TCP Keepalive Interval +dhcp_keepalive_data equ 39 ; 1 TCP Keepalive Garbage + +;Application and Service Parameters + +dhcp_nis_domain equ 40 ; N NIS Domain Name +dhcp_nis_servers equ 41 ; NЧ4 NIS Server Addresses +dhcp_ntp_servers equ 42 ; NЧ4 NTP Server Addresses +dhcp_vendor_specific equ 43 ; N Vendor Specific Information +dhcp_netbios_name_srv equ 44 ; NЧ4 NETBIOS Name Servers +dhcp_netbios_dist_srv equ 45 ; NЧ4 NETBIOS Datagram Distribution +dhcp_netbios_node_type equ 46 ; 1 NETBIOS Node Type +dhcp_netbios_scope equ 47 ; N NETBIOS Scope +dhcp_x_window_font equ 48 ; NЧ4 X Window Font Server +dhcp_x_window_manager equ 49 ; NЧ4 X Window Display Manager +dhcp_nis_domain_name equ 64 ; N NIS+ v3 Client Domain Name +dhcp_nis_server_addr equ 65 ; NЧ4 NIS+ v3 Server Addresses +dhcp_home_agent_addrs equ 68 ; NЧ4 Mobile IP Home Agent Addresses +dhcp_smtp_server equ 69 ; NЧ4 Simple Mail Server Addresses +dhcp_pop3_server equ 70 ; NЧ4 Post Office Server Addresses +dhcp_nntp_server equ 71 ; NЧ4 Network News Server Addresses +dhcp_www_server equ 72 ; NЧ4 WWW Server Addresses +dhcp_finger_server equ 73 ; NЧ4 Finger Server Addresses +dhcp_irc_server equ 74 ; NЧ4 Chat Server Addresses +dhcp_streettalk_server equ 75 ; NЧ4 StreetTalk Server Addresses +dhcp_stda_server equ 76 ; NЧ4 ST Directory Assist. Addresses + +;DHCP Extensions + +dhcp_address_request equ 50 ; 4 Requested IP Address +dhcp_address_time equ 51 ; 4 IP Address Lease Time +dhcp_option_overload equ 52 ; 1 Overload "sname" or "file" +dhcp_msg_type equ 53 ; 1 DHCP Message Type +dhcp_dhcp_server_id equ 54 ; 4 DHCP Server Identification +dhcp_parameter_list equ 55 ; N Parameter Request List +dhcp_dhcp_message equ 56 ; N DHCP Error Message +dhcp_dhcp_max_msg_size equ 57 ; 2 DHCP Maximum Message Size +dhcp_renewal_time equ 58 ; 4 DHCP Renewal (T1) Time +dhcp_rebinding_time equ 59 ; 4 DHCP Rebinding (T2) Time +dhcp_class_id equ 60 ; N Vendor Class Identifier +dhcp_client_id equ 61 ; N Client Identifier +dhcp_server_name equ 66 ; N TFTP Server Name +dhcp_bootfile_name equ 67 ; N Boot File Name + +;Newer extensions + +dhcp_netware_ip_domain equ 62 ; N Netware/IP Domain Name +dhcp_netware_ip_option equ 63 ; N Netware/IP sub Options +dhcp_user_class equ 77 ; N User Class Information +dhcp_directory_agent equ 78 ; N directory agent information +dhcp_service_scope equ 79 ; N service location agent scope +dhcp_rapid_commit equ 80 ; 0 Rapid Commit +dhcp_client_fqdn equ 81 ; N Fully Qualified Domain Name +dhcp_relay_agent_info equ 82 ; N Relay Agent Information, RFC 3046 +dhcp_isns equ 83 ; N Internet Storage Name Service +; 84 REMOVED/Unassigned +dhcp_nds_servers equ 85 ; N Novell Directory Services +dhcp_nds_tree_name equ 86 ; N Novell Directory Services +dhcp_nds_conext equ 87 ; N Novell Directory Services +dhcp_bcmcs equ 88 ; Controller Domain Name list +dhcp_bcmcs equ 89 ; Controller IPv4 address option +dhcp_authentication equ 90 ; N Authentication +; 91 REMOVED/Unassigned +; 92 REMOVED/Unassigned +dhcp_client_system equ 93 ; N Client System Architecture +dhcp_client_ndi equ 94 ; N Client Network Device Interface +dhcp_ldap equ 95 ; N Lightweight Directory Access Protocol +; 96 REMOVED/Unassigned +dhcp_uuid_guid equ 97 ; N UUID/GUID-based Client Identifier +dchp_user_auth equ 98 ; N Open Group's User Authentication +; 99 REMOVED/Unassigned +; 100 REMOVED/Unassigned +; 101 REMOVED/Unassigned +; 102 REMOVED/Unassigned +; 103 REMOVED/Unassigned +; 104 REMOVED/Unassigned +; 105 REMOVED/Unassigned +; 106 REMOVED/Unassigned +; 107 REMOVED/Unassigned +; 108 REMOVED/Unassigned +; 109 REMOVED/Unassigned +; 110 REMOVED/Unassigned +; 111 REMOVED/Unassigned +dhcp_netinfo_address equ 112 ; N NetInfo Parent Server Address +dhcp_netinfo_tag equ 113 ; N NetInfo Parent Server Tag +dhcp_url equ 114 ; N URL +; 115 REMOVED/Unassigned +dhcp_auto_config equ 116 ; N DHCP Auto-Configuration +dhcp_ns_search equ 117 ; N Name Service Search +dhcp_subnet_selection equ 118 ; 4 Subnet Selection Option +dhcp_domain_search equ 119 ; N DNS domain search list +dhcp_sip_servers equ 120 ; N SIP Servers DHCP Option +dhcp_cl_static_route equ 121 ; N Classless Static Route Option +dhcp_ccc equ 122 ; N CableLabs Client Configuration +dhcp_geoconf equ 123 ; 16 GeoConf Option +dhcp_v_i_vendor_class equ 124 ; Vendor-Identifying Vendor Class +dhcp_v_i_vendor_spec equ 125 ; Vendor-Identifying Vendor-Specific +; 126 REMOVED/Unassigned +; 127 REMOVED/Unassigned +dhcp_pxe equ 128 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_etherboot_sign equ 128 ; Etherboot signature. 6 bytes: E4:45:74:68:00:00 +dhcp_docsis equ 128 ; DOCSIS "full security" server IP address +dhcp_tftp_server_ip equ 128 ; TFTP Server IP address (for IP Phone software load) +dhcp_pxe equ 129 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_kernel_options equ 129 ; Kernel options. Variable length string +dhcp_call_server_ip equ 129 ; Call Server IP address +dhcp_pxe equ 130 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_ethernet_interface equ 130 ; Ethernet interface. Variable length string. +dhcp_siscrimination equ 130 ; Discrimination string (to identify vendor) +dhcp_pxe equ 131 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_remote_stat_server equ 131 ; Remote statistics server IP address +dhcp_pxe equ 132 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_802.1p equ 132 ; 802.1P VLAN ID +dhcp_pxe equ 133 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_802.1q equ 133 ; 802.1Q L2 Priority +dhcp_pxe equ 134 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_diffserv equ 134 ; Diffserv Code Point +dhcp_pxe equ 135 ; PXE - undefined (vendor specific) (Tentatively Assigned - 23 June 2005) +dhcp_http_proxy_psa equ 135 ; HTTP Proxy for phone-specific applications +; 136 REMOVED/Unassigned +; 137 REMOVED/Unassigned +; 138 REMOVED/Unassigned +; 139 REMOVED/Unassigned +; 140 REMOVED/Unassigned +; 141 REMOVED/Unassigned +; 142 REMOVED/Unassigned +; 143 REMOVED/Unassigned +; 144 REMOVED/Unassigned +; 145 REMOVED/Unassigned +; 146 REMOVED/Unassigned +; 147 REMOVED/Unassigned +; 148 REMOVED/Unassigned +; 149 REMOVED/Unassigned +dhcp_tftp_server_addr equ 150 ; TFTP server address (Tentatively Assigned - 23 June 2005) +dhcp_etherboot equ 150 ; Etherboot +dhcp_grub_conf_path equ 150 ; GRUB configuration path name +; 151 REMOVED/Unassigned +; 152 REMOVED/Unassigned +; 153 REMOVED/Unassigned +; 154 REMOVED/Unassigned +; 155 REMOVED/Unassigned +; 156 REMOVED/Unassigned +; 157 REMOVED/Unassigned +; 158 REMOVED/Unassigned +; 159 REMOVED/Unassigned +; 160 REMOVED/Unassigned +; 161 REMOVED/Unassigned +; 162 REMOVED/Unassigned +; 163 REMOVED/Unassigned +; 164 REMOVED/Unassigned +; 165 REMOVED/Unassigned +; 166 REMOVED/Unassigned +; 167 REMOVED/Unassigned +; 168 REMOVED/Unassigned +; 169 REMOVED/Unassigned +; 170 REMOVED/Unassigned +; 171 REMOVED/Unassigned +; 172 REMOVED/Unassigned +; 173 REMOVED/Unassigned +; 174 REMOVED/Unassigned +dhcp_etherboot equ 175 ; Etherboot (Tentatively Assigned - 23 June 2005) +dhcp_ip_telephone equ 176 ; IP Telephone (Tentatively Assigned - 23 June 2005) +dhcp_etherboot equ 177 ; Etherboot (Tentatively Assigned - 23 June 2005) +dhcp_packetcable equ 177 ; PacketCable and CableHome (replaced by 122) +; 178 REMOVED/Unassigned +; 179 REMOVED/Unassigned +; 180 REMOVED/Unassigned +; 181 REMOVED/Unassigned +; 182 REMOVED/Unassigned +; 183 REMOVED/Unassigned +; 184 REMOVED/Unassigned +; 185 REMOVED/Unassigned +; 186 REMOVED/Unassigned +; 187 REMOVED/Unassigned +; 188 REMOVED/Unassigned +; 189 REMOVED/Unassigned +; 190 REMOVED/Unassigned +; 191 REMOVED/Unassigned +; 192 REMOVED/Unassigned +; 193 REMOVED/Unassigned +; 194 REMOVED/Unassigned +; 195 REMOVED/Unassigned +; 196 REMOVED/Unassigned +; 197 REMOVED/Unassigned +; 198 REMOVED/Unassigned +; 199 REMOVED/Unassigned +; 200 REMOVED/Unassigned +; 201 REMOVED/Unassigned +; 202 REMOVED/Unassigned +; 203 REMOVED/Unassigned +; 204 REMOVED/Unassigned +; 205 REMOVED/Unassigned +; 206 REMOVED/Unassigned +; 207 REMOVED/Unassigned +dhcp_pxelinux.magic equ 208 ; pxelinux.magic (string) = F1:00:74:7E (241.0.116.126) (Tentatively Assigned - 23 June 2005) +dhcp_pxelinux.conffile equ 209 ; pxelinux.configfile (text) (Tentatively Assigned - 23 June 2005) +dhcp_pxelinux.path equ 210 ; pxelinux.pathprefix (text) (Tentatively Assigned - 23 June 2005) +dhcp_pxelinux.reboot equ 211 ; pxelinux.reboottime (unsigned integer 32 bits) (Tentatively Assigned - 23 June 2005) +; 212 REMOVED/Unassigned +; 213 REMOVED/Unassigned +; 214 REMOVED/Unassigned +; 215 REMOVED/Unassigned +; 216 REMOVED/Unassigned +; 217 REMOVED/Unassigned +; 218 REMOVED/Unassigned +; 219 REMOVED/Unassigned +dhcp_subnet_aloc equ 220 ; Subnet Allocation Option (Tentatively Assigned - 23 June 2005) +dhcp_virtual_subnet equ 221 ; Virtual Subnet Selection Option (Tentatively Assigned - 23 June 2005) +; 222 REMOVED/Unassigned +; 223 REMOVED/Unassigned diff --git a/kernel/branches/net/applications/zeroconf/dll.inc b/kernel/branches/net/applications/zeroconf/dll.inc new file mode 100644 index 0000000000..6ceb2d514d --- /dev/null +++ b/kernel/branches/net/applications/zeroconf/dll.inc @@ -0,0 +1,157 @@ +;----------------------------------------------------------------------------- +proc mem.Alloc size ;///////////////////////////////////////////////////////// +;----------------------------------------------------------------------------- + push ebx ecx + mov eax,[size] + lea ecx,[eax+4+4095] + and ecx,not 4095 + mcall 68,12 + add ecx,-4 + mov [eax],ecx + add eax,4 + pop ecx ebx + ret +endp + +;----------------------------------------------------------------------------- +proc mem.ReAlloc mptr,size;/////////////////////////////////////////////////// +;----------------------------------------------------------------------------- + push ebx ecx esi edi eax + mov eax,[mptr] + mov ebx,[size] + or eax,eax + jz @f + lea ecx,[ebx+4+4095] + and ecx,not 4095 + add ecx,-4 + cmp ecx,[eax-4] + je .exit + @@: mov eax,ebx + call mem.Alloc + xchg eax,[esp] + or eax,eax + jz .exit + mov esi,eax + xchg eax,[esp] + mov edi,eax + mov ecx,[esi-4] + cmp ecx,[edi-4] + jbe @f + mov ecx,[edi-4] + @@: add ecx,3 + shr ecx,2 + cld + rep movsd + xchg eax,[esp] + call mem.Free + .exit: + pop eax edi esi ecx ebx + ret +endp + +;----------------------------------------------------------------------------- +proc mem.Free mptr ;////////////////////////////////////////////////////////// +;----------------------------------------------------------------------------- + mov eax,[mptr] + or eax,eax + jz @f + push ebx ecx + lea ecx,[eax-4] + mcall 68,13 + pop ecx ebx + @@: ret +endp + + +proc dll.Load, import_table:dword + mov esi,[import_table] + .next_lib: mov edx,[esi] + or edx,edx + jz .exit + push esi + mov esi,[esi+4] + mov edi,s_libdir.fname + @@: lodsb + stosb + or al,al + jnz @b + mcall 68,19,s_libdir + or eax,eax + jz .fail + stdcall dll.Link,eax,edx + stdcall dll.Init,[eax+4] + pop esi + add esi,8 + jmp .next_lib + .exit: xor eax,eax + ret + .fail: add esp,4 + xor eax,eax + inc eax + ret +endp + +proc dll.Link, exp:dword,imp:dword + push eax + mov esi,[imp] + test esi,esi + jz .done + .next: lodsd + test eax,eax + jz .done + stdcall dll.GetProcAddress,[exp],eax + or eax,eax + jz @f + mov [esi-4],eax + jmp .next + @@: mov dword[esp],0 + .done: pop eax + ret +endp + +proc dll.Init, dllentry:dword + pushad + mov eax,mem.Alloc + mov ebx,mem.Free + mov ecx,mem.ReAlloc + mov edx,dll.Load + stdcall [dllentry] + popad + ret +endp + +proc dll.GetProcAddress, exp:dword,sz_name:dword + mov edx,[exp] + xor eax,eax + .next: or edx,edx + jz .end + cmp dword[edx],0 + jz .end + stdcall strcmp,[edx],[sz_name] + test eax,eax + jz .ok + add edx,8 + jmp .next + .ok: mov eax,[edx+4] + .end: ret +endp + +proc strcmp, str1:dword,str2:dword + push esi edi + mov esi,[str1] + mov edi,[str2] + xor eax,eax + @@: lodsb + scasb + jne .fail + or al,al + jnz @b + jmp .ok + .fail: or eax,-1 + .ok: pop edi esi + ret +endp + +s_libdir: + db '/sys/lib/' + .fname rb 32 diff --git a/kernel/branches/net/applications/zeroconf/zeroconf.asm b/kernel/branches/net/applications/zeroconf/zeroconf.asm new file mode 100644 index 0000000000..3c365f43cf --- /dev/null +++ b/kernel/branches/net/applications/zeroconf/zeroconf.asm @@ -0,0 +1,613 @@ +; Zero-config +; v 1.4 +; +; DHCP code is based on that by Mike Hibbet (DHCP client for menuetos) +; +; Written by HidnPlayr & Derpenguin + +use32 + org 0x0 + + db 'MENUET01' ; 8 byte id + dd 0x01 ; header version + dd START ; start of code + dd IM_END ; size of image + dd I_END ; memory for app + dd I_END ; esp + dd 0x0 , path ; I_Param , I_Icon + +; CONFIGURATION + + +TIMEOUT equ 60 ; in seconds +BUFFER equ 1024 ; in bytes +__DEBUG__ equ 1 ; enable/disable +__DEBUG_LEVEL__ equ 1 ; 1 = all, 2 = errors + +; CONFIGURATION FOR LINK-LOCAL + +PROBE_WAIT equ 1 ; second (initial random delay) +PROBE_MIN equ 1 ; second (minimum delay till repeated probe) +PROBE_MAX equ 2 ; seconds (maximum delay till repeated probe) +PROBE_NUM equ 3 ; (number of probe packets) + +ANNOUNCE_NUM equ 2 ; (number of announcement packets) +ANNOUNCE_INTERVAL equ 2 ; seconds (time between announcement packets) +ANNOUNCE_WAIT equ 2 ; seconds (delay before announcing) + +MAX_CONFLICTS equ 10 ; (max conflicts before rate limiting) + +RATE_LIMIT_INTERVAL equ 60 ; seconds (delay between successive attempts) + +DEFEND_INTERVAL equ 10 ; seconds (min. wait between defensive ARPs) + + + + +AF_INET4 equ 1337 ;;;;; + + + + +include '../../../proc32.inc' +include '../../../macros.inc' +include 'debug-fdo.inc' +include 'dhcp.inc' +include 'dll.inc' + + +Ip2dword: + push edx + + ; This code validates if the query is an IP containing 4 numbers and 3 dots + + xor al, al ; make al (dot count) zero + + @@: + cmp byte[edx],'0' ; check if this byte is a number, if not jump to no_IP + jl no_IP ; + cmp byte[edx],'9' ; + jg no_IP ; + + inc edx ; the byte was a number, so lets check the next byte + + cmp byte[edx],0 ; is this byte zero? (have we reached end of query?) + jz @f ; jump to next @@ then + cmp byte[edx],':' + jz @f + + cmp byte[edx],'.' ; is this byte a dot? + jne @r ; if not, jump to previous @@ + + inc al ; the byte was a dot so increment al(dot count) + inc edx ; next byte + jmp @r ; lets check for numbers again (jump to previous @@) + + @@: ; we reach this when end of query reached + cmp al,3 ; check if there where 3 dots + jnz no_IP ; if not, jump to no_IP + + ; The following code will convert this IP into a dword and output it in eax + ; If there is also a port number specified, this will be returned in ebx, otherwise ebx is -1 + + pop esi ; edx (query address) was pushed onto stack and is now popped in esi + + xor edx, edx ; result + xor eax, eax ; current character + xor ebx, ebx ; current byte + +.outer_loop: + shl edx, 8 + add edx, ebx + xor ebx, ebx +.inner_loop: + lodsb + test eax, eax + jz .finish + cmp al, '.' + jz .outer_loop + sub eax, '0' + imul ebx, 10 + add ebx, eax + jmp .inner_loop +.finish: + shl edx, 8 + add edx, ebx + + bswap edx ; we want little endian order + + ret + +no_IP: + pop edx + xor edx, edx + + ret + + + + + + +START: ; start of execution + + mcall 40, 1 shl 7 ; network event + +; eth.set_network_drv 0x00000383 + + DEBUGF 1,"Zero-config service:\n" + +; eth.status eax ; Read the Stack status +; test eax,eax ; if eax is zero, no driver was found +; jnz @f +; DEBUGF 1,"No Card found!\n" +; jmp close + +; @@: +; DEBUGF 1,"Detected card: %x\n",eax +; @@: +; eth.check_cable eax +; test al,al +; jnz @f +; DEBUGF 1,"Cable disconnected!\n" +; mcall 5, 500 ; loop until cable is connected (check every 5 sec) +; jmp @r + +; @@: +; eth.read_mac MAC + + mcall 73, 10 + mov word[MAC], bx + mov dword[MAC+2], eax + + DEBUGF 1,"MAC: %x-%x-%x-%x-%x-%x\n",[MAC]:2,[MAC+1]:2,[MAC+2]:2,[MAC+3]:2,[MAC+4]:2,[MAC+5]:2 + + cld + mov edi, path ; Calculate the length of zero-terminated string + xor al , al + mov ecx, 1024 + repnz scas byte[es:edi] + dec edi + + mov esi, filename + movsd + movsb + + DEBUGF 1,"path to ini: %s\n", path + + mcall 68,11 + + stdcall dll.Load,@IMPORT + or eax,eax + jnz skip_ini + + + invoke ini.get_str, path, str_ipconfig, str_type, inibuf, 16, 0 + + mov eax,dword[inibuf] + + cmp eax,'stat' + jne skip_ini + + invoke ini.get_str, path, str_ipconfig, str_ip, inibuf, 16, 0 + mov edx, inibuf + call Ip2dword + mcall 73, 3, edx + + invoke ini.get_str, path, str_ipconfig, str_gateway, inibuf, 16, 0 + mov edx, inibuf + call Ip2dword + mcall 73, 9, edx + + invoke ini.get_str, path, str_ipconfig, str_dns, inibuf, 16, 0 + mov edx, inibuf + call Ip2dword + mcall 73, 7, edx + + invoke ini.get_str, path, str_ipconfig, str_subnet, inibuf, 16, 0 + mov edx, inibuf + call Ip2dword + mcall 73, 5, edx + + + mcall -1 + + +skip_ini: + + DEBUGF 1,"Skip ini\n" + + mcall 74, 0, AF_INET4, 1, 0 ; open socket (parameters: domain, type, protocol) + cmp eax, -1 + je error + mov [socketNum], eax + + DEBUGF 1,"socket %x opened\n", eax + + mcall 74, 2, [socketNum], sockaddr1, 18 ; bind socket to local port 68 + cmp eax, -1 + je error + + DEBUGF 1,"Socket Bound to local port 68\n" + + + mcall 74, 4, [socketNum], sockaddr2, 18 ; connect to 255.255.255.255 on port 67 + cmp eax, -1 + je error + + DEBUGF 1,"Connected to 255.255.255.255 on port 67\n" + + mov byte [dhcpMsgType], 0x01 ; DHCP discover + mov dword [dhcpLease], esi ; esi is still -1 (-1 = forever) + + mcall 26, 9 + imul eax,100 + mov [currTime],eax + +buildRequest: ; Creates a DHCP request packet. + + DEBUGF 1,"Building request\n" + + stdcall mem.Alloc, BUFFER + mov [dhcpMsg], eax + test eax,eax + jz apipa + + + mov edi, eax + mov ecx,BUFFER + xor eax,eax + cld + rep stosb + + mov edx,[dhcpMsg] + + mov [edx], byte 0x01 ; Boot request + mov [edx+1], byte 0x01 ; Ethernet + mov [edx+2], byte 0x06 ; Ethernet h/w len + mov [edx+4], dword 0x11223344 ; xid + mov eax,[currTime] + mov [edx+8], eax ; secs, our uptime + mov [edx+10], byte 0x80 ; broadcast flag set + mov eax, dword [MAC] ; first 4 bytes of MAC + mov [edx+28],dword eax + mov ax, word [MAC+4] ; last 2 bytes of MAC + mov [edx+32],word ax + mov [edx+236], dword 0x63538263 ; magic number + mov [edx+240], word 0x0135 ; option DHCP msg type + mov al, [dhcpMsgType] + mov [edx+240+2], al + mov [edx+240+3], word 0x0433 ; option Lease time = infinity + mov eax, [dhcpLease] + mov [edx+240+5], eax + mov [edx+240+9], word 0x0432 ; option requested IP address + mov eax, [dhcpClientIP] + mov [edx+240+11], eax + mov [edx+240+15], word 0x0437 ; option request list + mov [edx+240+17], dword 0x0f060301 + + cmp [dhcpMsgType], byte 0x01 ; Check which msg we are sending + jne request_options + + mov [edx+240+21], byte 0xff ; "Discover" options + + mov [dhcpMsgLen], dword 262 ; end of options marker + jmp send_request + +request_options: + mov [edx+240+21], word 0x0436 ; server IP + mov eax, [dhcpServerIP] + mov [edx+240+23], eax + + mov [edx+240+27], byte 0xff ; end of options marker + + mov [dhcpMsgLen], dword 268 + +send_request: + mcall 74, 6, [socketNum], [dhcpMsg], [dhcpMsgLen] ; write to socket ( send broadcast request ) + + mov eax, [dhcpMsg] ; Setup the DHCP buffer to receive response + mov [dhcpMsgLen], eax ; Used as a pointer to the data + + mcall 23, TIMEOUT*10 ; wait for data + +read_data: ; we have data - this will be the response + + mcall 74, 7, [socketNum], [dhcpMsg], BUFFER ; read data from socket + + DEBUGF 1,"%u bytes received\n", eax + + push eax + mcall 74, 10, [socketNum] ; close the socket + pop eax + + cmp eax, -1 + je error + + mov [dhcpMsgLen], eax + + ; depending on which msg we sent, handle the response + ; accordingly. + ; If the response is to a dhcp discover, then: + ; 1) If response is DHCP OFFER then + ; 1.1) record server IP, lease time & IP address. + ; 1.2) send a request packet + ; If the response is to a dhcp request, then: + ; 1) If the response is DHCP ACK then + ; 1.1) extract the DNS & subnet fields. Set them in the stack + + cmp [dhcpMsgType], byte 0x01 ; did we send a discover? + je discover + cmp [dhcpMsgType], byte 0x03 ; did we send a request? + je request + + jmp close ; really unknown, what we did + +discover: + call parseResponse + + cmp [dhcpMsgType], byte 0x02 ; Was the response an offer? + jne apipa ; NO - so we do zeroconf + mov [dhcpMsgType], byte 0x03 ; DHCP request + jmp buildRequest + +request: + call parseResponse + + cmp [dhcpMsgType], byte 0x05 ; Was the response an ACK? It should be + jne apipa ; NO - so we do zeroconf + + jmp close + +;*************************************************************************** +; Function +; parseResponse +; +; Description +; extracts the fields ( client IP address and options ) from +; a DHCP response +; The values go into +; dhcpMsgType,dhcpLease,dhcpClientIP,dhcpServerIP, +; dhcpDNSIP, dhcpSubnet +; The message is stored in dhcpMsg +; +;*************************************************************************** +parseResponse: + DEBUGF 1,"Data received, parsing response\n" + mov edx, [dhcpMsg] + + pusha + mcall 73, 3, [edx+16] + mov eax,[edx] + mov [dhcpClientIP],eax + DEBUGF 1,"Client: %u.%u.%u.%u\n",[edx+16]:1,[edx+17]:1,[edx+18]:1,[edx+19]:1 + popa + + add edx, 240 ; Point to first option + xor ecx, ecx + +next_option: + add edx, ecx +pr001: + mov al, [edx] + cmp al, 0xff ; End of options? + je pr_exit + + cmp al, dhcp_msg_type ; Msg type is a single byte option + jne @f + + mov al, [edx+2] + mov [dhcpMsgType], al + add edx, 3 + jmp pr001 ; Get next option + +@@: + inc edx + movzx ecx, byte [edx] + inc edx ; point to data + + cmp al, dhcp_dhcp_server_id ; server ip + jne @f + mov eax, [edx] + mov [dhcpServerIP], eax + DEBUGF 1,"Server: %u.%u.%u.%u\n",[edx]:1,[edx+1]:1,[edx+2]:1,[edx+3]:1 + jmp next_option + +@@: + cmp al, dhcp_address_time + jne @f + + pusha + mov eax,[edx] + bswap eax + mov [dhcpLease],eax + DEBUGF 1,"lease: %d\n",eax + popa + + jmp next_option + +@@: + cmp al, dhcp_subnet_mask + jne @f + + pusha + mcall 73, 5, [edx] + DEBUGF 1,"Subnet: %u.%u.%u.%u\n",[edx]:1,[edx+1]:1,[edx+2]:1,[edx+3]:1 + popa + + jmp next_option + +@@: + cmp al, dhcp_router + jne @f + + pusha + mcall 73, 9, [edx] + DEBUGF 1,"Gateway: %u.%u.%u.%u\n",[edx]:1,[edx+1]:1,[edx+2]:1,[edx+3]:1 + popa + + jmp next_option + + +@@: + cmp al, dhcp_domain_server + jne next_option + + pusha + mcall 73, 7, [edx] + DEBUGF 1,"DNS: %u.%u.%u.%u\n",[edx]:1,[edx+1]:1,[edx+2]:1,[edx+3]:1 + popa + + jmp next_option + +pr_exit: + +; DEBUGF 1,"Sending ARP announce\n" +; eth.ARP_ANNOUNCE [dhcpClientIP] ; send an ARP announce packet + + jmp close + +apipa: + stdcall mem.Free, [dhcpMsg] + +link_local: + call random + mov ecx,0xfea9 ; IP 169.254.0.0 link local net, see RFC3927 + mov cx,ax + mcall 73, 3, ecx ; mask is 255.255.0.0 + DEBUGF 1,"Link Local IP assinged: 169.254.%u.%u\n",[generator+2]:1,[generator+3]:1 + mcall 73, 5, 0xffff + mcall 73, 9, 0x0 + mcall 73, 7, 0x0 + + mcall 5, PROBE_WAIT*100 + + xor esi,esi + probe_loop: + call random ; create a pseudo random number in eax (seeded by MAC) + + cmp al,PROBE_MIN*100 ; check if al is bigger then PROBE_MIN + jge @f ; all ok + add al,(PROBE_MAX-PROBE_MIN)*100 ; al is too small + @@: + + cmp al,PROBE_MAX*100 + jle @f + sub al,(PROBE_MAX-PROBE_MIN)*100 + @@: + + movzx ebx,al + DEBUGF 1,"Waiting %u0ms\n",ebx + mcall 5 + + DEBUGF 1,"Sending Probe\n" +; eth.ARP_PROBE MAC + inc esi + + cmp esi,PROBE_NUM + jl probe_loop + +; now we wait further ANNOUNCE_WAIT seconds and send ANNOUNCE_NUM ARP announces. If any other host has assingned +; IP within this time, we should create another adress, that have to be done later + + DEBUGF 1,"Waiting %us\n",ANNOUNCE_WAIT + mcall 5, ANNOUNCE_WAIT*100 + xor esi,esi + announce_loop: + + DEBUGF 1,"Sending Announce\n" +; eth.ARP_ANNOUNCE MAC + + inc esi + cmp esi,ANNOUNCE_NUM + je @f + + DEBUGF 1,"Waiting %us\n",ANNOUNCE_INTERVAL + mcall 5, ANNOUNCE_INTERVAL*100 + jmp announce_loop + @@: + ; we should, instead of closing, detect ARP conflicts and detect if cable keeps connected ;) + +error: +close: + mcall -1 + + +random: ; Pseudo random actually + + mov eax,[generator] + add eax,-43ab45b5h + ror eax,1 + bswap eax + xor eax,dword[MAC] + ror eax,1 + xor eax,dword[MAC+2] + mov [generator],eax + +ret + +; DATA AREA + +align 16 +@IMPORT: + +library \ + libini,'libini.obj' + +import libini, \ + ini.get_str,'ini.get_str' + +include_debug_strings + +filename db '.ini',0 +str_ip db 'ip',0 +str_subnet db 'subnet',0 +str_gateway db 'gateway',0 +str_dns db 'dns',0 +str_ipconfig db 'ipconfig',0 +str_type db 'type',0 + + +sockaddr1: + + dw AF_INET4 + dw 68 ; local port + dd 0 ; local IP + + rb 10 + + +sockaddr2: + + dw AF_INET4 + dw 67 ; destination port + dd -1 ; destination IP + + rb 10 + + +IM_END: + +inibuf rb 16 + +dhcpClientIP dd ? +dhcpMsgType db ? +dhcpLease dd ? +dhcpServerIP dd ? + +dhcpMsgLen dd ? +socketNum dd ? + +MAC dp ? + +currTime dd ? +renewTime dd ? +generator dd ? + +dhcpMsg dd ? + +I_END_2: + +path rb 1024+5 + +I_END: \ No newline at end of file diff --git a/kernel/branches/net/applications/zeroconf/zeroconf.ini b/kernel/branches/net/applications/zeroconf/zeroconf.ini new file mode 100644 index 0000000000..e37d2279f0 --- /dev/null +++ b/kernel/branches/net/applications/zeroconf/zeroconf.ini @@ -0,0 +1,9 @@ +[ipconfig] +; type should be static or zeroconf +; zeroconf means the service first tries to contact a DHCP server +; If dhcp is not available, it switches to link-local +type = zeroconf +ip = 192.168.1.150 +gateway = 192.168.1.1 +dns = 192.168.1.1 +subnet = 255.255.255.0 \ No newline at end of file diff --git a/kernel/branches/net/bootloader/boot_fat12.asm b/kernel/branches/net/bootloader/boot_fat12.asm deleted file mode 100644 index 1c01e8e97d..0000000000 --- a/kernel/branches/net/bootloader/boot_fat12.asm +++ /dev/null @@ -1,287 +0,0 @@ -; FAT12 boot sector for Kolibri OS -; -; Copyright (C) Alex Nogueira Teixeira -; Copyright (C) Diamond -; Copyright (C) Dmitry Kartashov aka shurf -; -; Distributed under GPL, see file COPYING for details -; -; Version 1.0 - -lf equ 0ah -cr equ 0dh - -pos_read_tmp equ 0700h ;position for temporary read -boot_program equ 07c00h ;position for boot code -seg_read_kernel equ 01000h ;segment to kernel read - - jmp start_program - nop - -; Boot Sector and BPB Structure -include 'floppy1440.inc' -;include 'floppy2880.inc' -;include 'floppy1680.inc' -;include 'floppy1743.inc' - -start_program: - - xor ax,ax - mov ss,ax - mov sp,boot_program - push ss - pop ds - - ; print loading string - mov si,loading+boot_program -loop_loading: - lodsb - or al,al - jz read_root_directory - mov ah,0eh - mov bx,7 - int 10h - jmp loop_loading - -read_root_directory: - push ss - pop es - - ; calculate some disk parameters - ; - beginning sector of RootDir - mov ax,word [BPB_FATSz16+boot_program] - xor cx,cx - mov cl,byte [BPB_NumFATs+boot_program] - mul cx - add ax,word [BPB_RsvdSecCnt+boot_program] - mov word [FirstRootDirSecNum+boot_program],ax ; 19 - mov si,ax - - ; - count of sectors in RootDir - mov bx,word [BPB_BytsPerSec+boot_program] - mov cl,5 ; divide ax by 32 - shr bx,cl ; bx = directory entries per sector - mov ax,word [BPB_RootEntCnt+boot_program] - xor dx,dx - div bx - mov word [RootDirSecs+boot_program],ax ; 14 - - ; - data start - add si,ax ; add beginning sector of RootDir and count sectors in RootDir - mov word [data_start+boot_program],si ; 33 - ; reading root directory - ; al=count root dir sectrors !!!! TODO: al, max 255 sectors !!!! - mov ah,2 ; read - push ax - - mov ax,word [FirstRootDirSecNum+boot_program] - call conv_abs_to_THS ; convert abs sector (AX) to BIOS T:H:S (track:head:sector) - pop ax - mov bx,pos_read_tmp ; es:bx read buffer - call read_sector - - mov si,bx ; read buffer address: es:si - mov ax,[RootDirSecs+boot_program] - mul word [BPB_BytsPerSec+boot_program] - add ax,si ; AX = end of root dir. in buffer pos_read_tmp - - ; find kernel file in root directory -loop_find_dir_entry: - push si - mov cx,11 - mov di,kernel_name+boot_program - rep cmpsb ; compare es:si and es:di, cx bytes long - pop si - je found_kernel_file - add si,32 ; next dir. entry - cmp si,ax ; end of directory - jb loop_find_dir_entry - -file_error_message: - mov si,error_message+boot_program - -loop_error_message: - lodsb - or al,al - jz freeze_pc - mov ah,0eh - mov bx,7 - int 10h - jmp loop_error_message - -freeze_pc: - jmp $ ; endless loop - - ; === KERNEL FOUND. LOADING... === - -found_kernel_file: - mov bp,[si+01ah] ; first cluster of kernel file - ; - mov [cluster1st+boot_program],bp ; starting cluster of kernel file - ; <\diamond> - - ; reading first FAT table - mov ax,word [BPB_RsvdSecCnt+boot_program] ; begin first FAT abs sector number - call conv_abs_to_THS ; convert abs sector (AX) to BIOS T:H:S (track:head:sector) - mov bx,pos_read_tmp ; es:bx read position - mov ah,2 ; ah=2 (read) - mov al, byte [BPB_FATSz16+boot_program] ; FAT size in sectors (TODO: max 255 sectors) - call read_sector - jc file_error_message ; read error - - mov ax,seg_read_kernel - mov es,ax - xor bx,bx ; es:bx = 1000h:0000h - - - ; reading kernel file -loop_obtains_kernel_data: - ; read one cluster of file - call obtain_cluster - jc file_error_message ; read error - - ; add one cluster length to segment:offset - push bx - mov bx,es - mov ax,word [BPB_BytsPerSec+boot_program] ;\ - movsx cx,byte [BPB_SecPerClus+boot_program] ; | !!! TODO: !!! - mul cx ; | out this from loop !!! - shr ax,4 ;/ - add bx,ax - mov es,bx - pop bx - - mov di,bp - shr di,1 - pushf - add di,bp ; di = bp * 1.5 - add di,pos_read_tmp - mov ax,[di] ; read next entry from FAT-chain - popf - jc move_4_right - and ax,0fffh - jmp verify_end_sector -move_4_right: - mov cl,4 - shr ax,cl -verify_end_sector: - cmp ax,0ff8h ; last cluster - jae execute_kernel - mov bp,ax - jmp loop_obtains_kernel_data - -execute_kernel: - ; - mov ax,'KL' - push 0 - pop ds - mov si,loader_block+boot_program - ; - push word seg_read_kernel - push word 0 - retf ; jmp far 1000:0000 - - -;------------------------------------------ - ; loading cluster from file to es:bx -obtain_cluster: - ; bp - cluster number to read - ; carry = 0 -> read OK - ; carry = 1 -> read ERROR - - ; print one dot - push bx - mov ax,0e2eh ; ah=0eh (teletype), al='.' - xor bh,bh - int 10h - - ; convert cluster number to sector number - mov ax,bp ; data cluster to read - sub ax,2 - xor bx,bx - mov bl,byte [BPB_SecPerClus+boot_program] - mul bx - add ax,word [data_start+boot_program] - pop bx - -writesec: - call conv_abs_to_THS ; convert abs sector (AX) to BIOS T:H:S (track:head:sector) -patchhere: - mov ah,2 ; ah=2 (read) - mov al,byte [BPB_SecPerClus+boot_program] ; al=(one cluster) - call read_sector - retn -;------------------------------------------ - -;------------------------------------------ - ; read sector from disk -read_sector: - push bp - mov bp,20 ; try 20 times -newread: - dec bp - jz file_error_message - push ax bx cx dx - int 13h - pop dx cx bx ax - jc newread - pop bp - retn -;------------------------------------------ - ; convert abs. sector number (AX) to BIOS T:H:S - ; sector number = (abs.sector%BPB_SecPerTrk)+1 - ; pre.track number = (abs.sector/BPB_SecPerTrk) - ; head number = pre.track number%BPB_NumHeads - ; track number = pre.track number/BPB_NumHeads - ; Return: cl - sector number - ; ch - track number - ; dl - drive number (0 = a:) - ; dh - head number -conv_abs_to_THS: - push bx - mov bx,word [BPB_SecPerTrk+boot_program] - xor dx,dx - div bx - inc dx - mov cl, dl ; cl = sector number - mov bx,word [BPB_NumHeads+boot_program] - xor dx,dx - div bx - ; !!!!!!! ax = track number, dx = head number - mov ch,al ; ch=track number - xchg dh,dl ; dh=head number - mov dl,0 ; dl=0 (drive 0 (a:)) - pop bx - retn -;------------------------------------------ - -loading db cr,lf,'Starting system ',00h -error_message db 13,10 -kernel_name db 'KERNEL MNT ?',cr,lf,00h -FirstRootDirSecNum dw ? -RootDirSecs dw ? -data_start dw ? - -; -write1st: - push cs - pop ds - mov byte [patchhere+1+boot_program], 3 ; change ah=2 to ah=3 - mov ax,[cluster1st+boot_program] - push 1000h - pop es - xor bx,bx - call writesec - mov byte [patchhere+1+boot_program], 2 ; change back ah=3 to ah=2 - retf -cluster1st dw ? -loader_block: - db 1 - dw 0 - dw write1st+boot_program - dw 0 -; <\diamond> - -times 0x1fe-$ db 00h - - db 55h,0aah ;boot signature diff --git a/kernel/branches/net/bootloader/floppy1440.inc b/kernel/branches/net/bootloader/floppy1440.inc deleted file mode 100644 index 678e2d35fd..0000000000 --- a/kernel/branches/net/bootloader/floppy1440.inc +++ /dev/null @@ -1,19 +0,0 @@ - BS_OEMName db 'KOLIBRI ' ; db 8 - BPB_BytsPerSec dw 512 ; bytes per sector - BPB_SecPerClus db 1 ; sectors per cluster - BPB_RsvdSecCnt dw 1 ; number of reserver sectors - BPB_NumFATs db 2 ; count of FAT data structures - BPB_RootEntCnt dw 224 ; count of 32-byte dir. entries (224*32 = 14 sectors) - BPB_TotSec16 dw 2880 ; count of sectors on the volume (2880 for 1.44 mbytes disk) - BPB_Media db 0f0h ; f0 - used for removable media - BPB_FATSz16 dw 9 ; count of sectors by one copy of FAT - BPB_SecPerTrk dw 18 ; sectors per track - BPB_NumHeads dw 2 ; number of heads - BPB_HiddSec dd 0 ; count of hidden sectors - BPB_TotSec32 dd 0 ; count of sectors on the volume (if > 65535) - BS_DrvNum db 0 ; int 13h drive number - BS_Reserved db 0 ; reserved - BS_BootSig db 29h ; Extended boot signature - BS_VolID dd 0 ; Volume serial number - BS_VolLab db 'KOLIBRI ' ; Volume label (db 11) - BS_FilSysType db 'FAT12 ' ; file system type (db 8) diff --git a/kernel/branches/net/bootloader/floppy1680.inc b/kernel/branches/net/bootloader/floppy1680.inc deleted file mode 100644 index ef754de8d6..0000000000 --- a/kernel/branches/net/bootloader/floppy1680.inc +++ /dev/null @@ -1,19 +0,0 @@ - BS_OEMName db 'KOLIBRI ' ; db 8 - BPB_BytsPerSec dw 512 ; bytes per sector - BPB_SecPerClus db 1 ; sectors per cluster - BPB_RsvdSecCnt dw 1 ; number of reserver sectors - BPB_NumFATs db 2 ; count of FAT data structures - BPB_RootEntCnt dw 112 ; count of 32-byte dir. entries (112*32 = 7 sectors) - BPB_TotSec16 dw 3360 ; count of sectors on the volume (3360 for 1.68 mbytes disk) - BPB_Media db 0f0h ; f0 - used for removable media - BPB_FATSz16 dw 10 ; count of sectors by one copy of FAT - BPB_SecPerTrk dw 21 ; sectors per track - BPB_NumHeads dw 2 ; number of heads - BPB_HiddSec dd 0 ; count of hidden sectors - BPB_TotSec32 dd 0 ; count of sectors on the volume (if > 65535) - BS_DrvNum db 0 ; int 13h drive number - BS_Reserved db 0 ; reserved - BS_BootSig db 29h ; Extended boot signature - BS_VolID dd 0 ; Volume serial number - BS_VolLab db 'KOLIBRI ' ; Volume label (db 11) - BS_FilSysType db 'FAT12 ' ; file system type (db 8) diff --git a/kernel/branches/net/bootloader/floppy1743.inc b/kernel/branches/net/bootloader/floppy1743.inc deleted file mode 100644 index bd777301fc..0000000000 --- a/kernel/branches/net/bootloader/floppy1743.inc +++ /dev/null @@ -1,19 +0,0 @@ - BS_OEMName db 'KOLIBRI ' ; db 8 - BPB_BytsPerSec dw 512 ; bytes per sector - BPB_SecPerClus db 1 ; sectors per cluster - BPB_RsvdSecCnt dw 1 ; number of reserver sectors - BPB_NumFATs db 2 ; count of FAT data structures - BPB_RootEntCnt dw 224 ; count of 32-byte dir. entries (224*32 = 14 sectors) - BPB_TotSec16 dw 3486 ; count of sectors on the volume (3486 for 1.74 mbytes disk) - BPB_Media db 0f0h ; f0 - used for removable media - BPB_FATSz16 dw 11 ; count of sectors by one copy of FAT - BPB_SecPerTrk dw 21 ; sectors per track - BPB_NumHeads dw 2 ; number of heads - BPB_HiddSec dd 0 ; count of hidden sectors - BPB_TotSec32 dd 0 ; count of sectors on the volume (if > 65535) - BS_DrvNum db 0 ; int 13h drive number - BS_Reserved db 0 ; reserved - BS_BootSig db 29h ; Extended boot signature - BS_VolID dd 0 ; Volume serial number - BS_VolLab db 'KOLIBRI ' ; Volume label (db 11) - BS_FilSysType db 'FAT12 ' ; file system type (db 8) diff --git a/kernel/branches/net/bootloader/floppy2880.inc b/kernel/branches/net/bootloader/floppy2880.inc deleted file mode 100644 index 8a52c059ca..0000000000 --- a/kernel/branches/net/bootloader/floppy2880.inc +++ /dev/null @@ -1,19 +0,0 @@ - BS_OEMName db 'KOLIBRI ' ; db 8 - BPB_BytsPerSec dw 512 ; bytes per sector - BPB_SecPerClus db 2 ; sectors per cluster - BPB_RsvdSecCnt dw 1 ; number of reserver sectors - BPB_NumFATs db 2 ; count of FAT data structures - BPB_RootEntCnt dw 240 ; count of 32-byte dir. entries (240*32 = 15 sectors) - BPB_TotSec16 dw 5760 ; count of sectors on the volume (5760 for 2.88 mbytes disk) - BPB_Media db 0f0h ; f0 - used for removable media - BPB_FATSz16 dw 9 ; count of sectors by one copy of FAT - BPB_SecPerTrk dw 36 ; sectors per track - BPB_NumHeads dw 2 ; number of heads - BPB_HiddSec dd 0 ; count of hidden sectors - BPB_TotSec32 dd 0 ; count of sectors on the volume (if > 65535) - BS_DrvNum db 0 ; int 13h drive number - BS_Reserved db 0 ; reserved - BS_BootSig db 29h ; Extended boot signature - BS_VolID dd 0 ; Volume serial number - BS_VolLab db 'KOLIBRI ' ; Volume label (db 11) - BS_FilSysType db 'FAT12 ' ; file system type (db 8) diff --git a/kernel/branches/net/bootloader/readme b/kernel/branches/net/bootloader/readme deleted file mode 100644 index bbcc50f2e3..0000000000 --- a/kernel/branches/net/bootloader/readme +++ /dev/null @@ -1,43 +0,0 @@ -‡ Ја㧮з­л© ᥪв®а ¤«п Ћ‘ Љ®«ЁЎаЁ (FAT12, ¤ЁбЄҐв ) - -- ЋЇЁб ­ЁҐ - Џ®§ў®«пҐв § Јаг¦ вм KERNEL.MNT б ¤ЁбЄҐв/®Ўа §®ў - ®Ўкс¬®¬ 1.44M, 1.68M, 1.72M Ё 2.88M - „«п ўлЎ®а  ®Ўкс¬  ¤ЁбЄ , ¤«п Є®в®а®Ј® ­ ¤® б®Ўа вм - § Ја㧮з­л© ᥪв®а, ­Ґ®Ўе®¤Ё¬® ў д ©«Ґ boot_fat12.asm - а бЄ®¬¬Ґ­вЁа®ў вм бва®Єг ўЁ¤ : - include 'floppy????.inc' - ¤«п ­Ґ®Ўе®¤Ё¬®Ј® ®Ўкс¬  ¤ЁбЄ . „®бвгЇ­лҐ ў аЁ ­вл: - floppy1440.inc, - floppy1680.inc, - floppy1743.inc Ё floppy2880.inc - -- ‘Ў®аЄ  - fasm boot_fat12.asm - -- „«п § ЇЁбЁ § Ја㧮筮Ј® ᥪв®а  ­  ¤ЁбЄ/®Ўа § Ї®¤ Linux - ¬®¦­® ў®бЇ®«м§®ў вмбп б«Ґ¤го饩 Є®¬ ­¤®©: - dd if=boot_fat12.bin of=288.img bs=512 count=1 conv=notrunc - ---------------------------------------------------------------------- - -Floppy FAT12 boot sector for KolibriOS. - -- Description - Allows booting KERNEL.MNT floppies/images - with volumes of 1.44M, 1.68M, 1.72M and 2.88M - To select the volume of the disk, which should gather - boot sector, it was necessary in file boot_fat12.asm - uncomment line: - include 'floppy????. inc' - for the necessary disk volume. Available options is: - floppy1440.inc, - floppy1680.inc, - floppy1743.inc and floppy2880.inc - -- Compile - fasm boot_fat12.asm - -- To write boot sector to the floppy/image under Linux - you can use the following command: - dd if=boot_fat12.bin of=288.img bs=512 count=1 conv=notrunc diff --git a/kernel/branches/net/docs/apm.txt b/kernel/branches/net/docs/apm.txt deleted file mode 100644 index 5b253195ed..0000000000 --- a/kernel/branches/net/docs/apm.txt +++ /dev/null @@ -1,518 +0,0 @@ ---------p-155300----------------------------- -INT 15 - Advanced Power Management v1.0+ - INSTALLATION CHECK - AX = 5300h - BX = device ID of system BIOS (0000h) -Return: CF clear if successful - AH = major version (BCD) - AL = minor version (BCD) - BX = 504Dh ("PM") - CX = flags (see #00472) - CF set on error - AH = error code (06h,09h,86h) (see #00473) -BUG: early versions of the Award Modular BIOS with built-in APM support - reportedly do not set BX on return - -Bitfields for APM flags: -Bit(s) Description (Table 00472) - 0 16-bit protected mode interface supported - 1 32-bit protected mode interface supported - 2 CPU idle call reduces processor speed - 3 BIOS power management disabled - 4 BIOS power management disengaged (APM v1.1) - 5-7 reserved - -(Table 00473) -Values for APM error code: - 01h power management functionality disabled - 02h interface connection already in effect - 03h interface not connected - 04h real-mode interface not connected - 05h 16-bit protected-mode interface already connected - 06h 16-bit protected-mode interface not supported - 07h 32-bit protected-mode interface already connected - 08h 32-bit protected-mode interface not supported - 09h unrecognized device ID - 0Ah invalid parameter value in CX - 0Bh (APM v1.1) interface not engaged - 0Ch (APM v1.2) function not supported - 0Dh (APM v1.2) Resume Timer disabled - 0Eh-1Fh reserved for other interface and general errors - 20h-3Fh reserved for CPU errors - 40h-5Fh reserved for device errors - 60h can't enter requested state - 61h-7Fh reserved for other system errors - 80h no power management events pending - 81h-85h reserved for other power management event errors - 86h APM not present - 87h-9Fh reserved for other power management event errors - A0h-FEh reserved - FFh undefined ---------p-155301----------------------------- -INT 15 - Advanced Power Management v1.0+ - CONNECT REAL-MODE INTERFACE - AX = 5301h - BX = device ID of system BIOS (0000h) -Return: CF clear if successful - CF set on error - AH = error code (02h,05h,07h,09h) (see #00473) -Note: on connection, an APM v1.1 or v1.2 BIOS switches to APM v1.0 - compatibility mode until it is informed that the user supports a - newer version of APM (see AX=530Eh) -SeeAlso: AX=5302h,AX=5303h,AX=5304h ---------p-155302----------------------------- -INT 15 R - Advanced Power Management v1.0+ - CONNECT 16-BIT PROTMODE INTERFACE - AX = 5302h - BX = device ID of system BIOS (0000h) -Return: CF clear if successful - AX = real-mode segment base address of protected-mode 16-bit code - segment - BX = offset of entry point - CX = real-mode segment base address of protected-mode 16-bit data - segment - ---APM v1.1--- - SI = APM BIOS code segment length - DI = APM BIOS data segment length - CF set on error - AH = error code (02h,05h,06h,07h,09h) (see #00473) -Notes: the caller must initialize two consecutive descriptors with the - returned segment base addresses; these descriptors must be valid - whenever the protected-mode interface is called, and will have - their limits arbitrarily set to 64K. - the protected mode interface is invoked by making a far call with the - same register values as for INT 15; it must be invoked while CPL=0, - the code segment descriptor must have a DPL of 0, the stack must be - in a 16-bit segment and have enough room for BIOS use and possible - interrupts, and the current I/O permission bit map must allow access - to the I/O ports used for power management. - functions 00h-03h are not available from protected mode - on connection, an APM v1.1 or v1.2 BIOS switches to APM v1.0 - compatibility mode until it is informed that the user supports a - newer version of APM (see AX=530Eh) -SeeAlso: AX=5301h,AX=5303h,AX=5304h ---------p-155303----------------------------- -INT 15 - Advanced Power Management v1.0+ - CONNECT 32-BIT PROTMODE INTERFACE - AX = 5303h - BX = device ID of system BIOS (0000h) -Return: CF clear if successful - AX = real-mode segment base address of protected-mode 32-bit code - segment - EBX = offset of entry point - CX = real-mode segment base address of protected-mode 16-bit code - segment - DX = real-mode segment base address of protected-mode 16-bit data - segment - ---APM v1.1--- - SI = APM BIOS code segment length - DI = APM BIOS data segment length - CF set on error - AH = error code (02h,05h,07h,08h,09h) (see #00473) -Notes: the caller must initialize three consecutive descriptors with the - returned segment base addresses for 32-bit code, 16-bit code, and - 16-bit data, respectively; these descriptors must be valid whenever - the protected-mode interface is called, and will have their limits - arbitrarily set to 64K. - the protected mode interface is invoked by making a far call to the - 32-bit code segment with the same register values as for INT 15; it - must be invoked while CPL=0, the code segment descriptor must have a - DPL of 0, the stack must be in a 32-bit segment and have enough room - for BIOS use and possible interrupts, and the current I/O permission - bit map must allow access to the I/O ports used for power management. - functions 00h-03h are not available from protected mode - on connection, an APM v1.1 or v1.2 BIOS switches to APM v1.0 - compatibility mode until it is informed that the user supports a - newer version of APM (see AX=530Eh) -SeeAlso: AX=5301h,AX=5302h,AX=5304h ---------p-155304----------------------------- -INT 15 - Advanced Power Management v1.0+ - DISCONNECT INTERFACE - AX = 5304h - BX = device ID of system BIOS (0000h) -Return: CF clear if successful - CF set on error - AH = error code (03h,09h) (see #00473) -SeeAlso: AX=5301h,AX=5302h,AX=5303h ---------p-155305----------------------------- -INT 15 - Advanced Power Management v1.0+ - CPU IDLE - AX = 5305h -Return: CF clear if successful (after system leaves idle state) - CF set on error - AH = error code (03h,0Bh) (see #00473) -Notes: call when the system is idle and should be suspended until the next - system event or interrupt - should not be called from within a hardware interrupt handler to avoid - reentrance problems - if an interrupt causes the system to resume normal processing, the - interrupt may or may not have been handled when the BIOS returns - from this call; thus, the caller should allow interrupts on return - interrupt handlers may not retain control if the BIOS allows - interrupts while in idle mode even if they are able to determine - that they were called from idle mode - the caller should issue this call continuously in a loop until it needs - to perform some processing of its own -SeeAlso: AX=1000h,AX=5306h,INT 2F/AX=1680h ---------p-155306----------------------------- -INT 15 - Advanced Power Management v1.0+ - CPU BUSY - AX = 5306h -Return: CF clear if successful - CF set on error - AH = error code (03h,0Bh) (see #00473) -Notes: called to ensure that the system runs at full speed even on systems - where the BIOS is unable to recognize increased activity (especially - if interrupts are hooked by other programs and not chained to the - BIOS) - this call may be made even when the system is already running at full - speed, but it will create unnecessary overhead - should not be called from within a hardware interrupt handler to avoid - reentrance problems -SeeAlso: AX=5305h ---------p-155307----------------------------- -INT 15 - Advanced Power Management v1.0+ - SET POWER STATE - AX = 5307h - BX = device ID (see #00474) - CX = system state ID (see #00475) -Return: CF clear if successful - CF set on error - AH = error code (01h,03h,09h,0Ah,0Bh,60h) (see #00473) -Note: should not be called from within a hardware interrupt handler to avoid - reentrance problems -SeeAlso: AX=530Ch - -(Table 00474) -Values for APM device IDs: - 0000h system BIOS - 0001h all devices for which the system BIOS manages power - 01xxh display (01FFh for all attached display devices) - 02xxh secondary storage (02FFh for all attached secondary storage devices) - 03xxh parallel ports (03FFh for all attached parallel ports) - 04xxh serial ports (04FFh for all attached serial ports) ----APM v1.1+ --- - 05xxh network adapters (05FFh for all attached network adapters) - 06xxh PCMCIA sockets (06FFh for all) - 0700h-7FFFh reserved - 80xxh system battery devices (APM v1.2) - 8100h-DFFFh reserved - Exxxh OEM-defined power device IDs - F000h-FFFFh reserved - -(Table 00475) -Values for system state ID: - 0000h ready (not supported for device ID 0001h) - 0001h stand-by - 0002h suspend - 0003h off (not supported for device ID 0001h in APM v1.0) ----APM v1.1--- - 0004h last request processing notification (only for device ID 0001h) - 0005h last request rejected (only for device ID 0001h) - 0006h-001Fh reserved system states - 0020h-003Fh OEM-defined system states - 0040h-007Fh OEM-defined device states - 0080h-FFFFh reserved device states ---------p-155307CX0001----------------------- -INT 15 - Advanced Power Management v1.0+ - SYSTEM STAND-BY - AX = 5307h - CX = 0001h - BX = 0001h (device ID for all power-managed devices) -Return: CF clear -Notes: puts the entire system into stand-by mode; normally called in response - to a System Stand-by Request notification after any necessary - processing, but may also be invoked at the caller's discretion - should not be called from within a hardware interrupt handler to avoid - reentrance problems - the stand-by state is typically exited on an interrupt -SeeAlso: AX=4280h,AX=5307h/CX=0002h"SUSPEND",AX=5307h/CX=0003h,AX=530Bh ---------p-155307CX0002----------------------- -INT 15 - Advanced Power Management v1.0+ - SUSPEND SYSTEM - AX = 5307h - CX = 0002h - BX = 0001h (device ID for all power-managed devices) -Return: after system is resumed - CF clear -Notes: puts the entire system into a low-power suspended state; normally - called in response to a Suspend System Request notification after - any necessary processing, but may also be invoked at the caller's - discretion - should not be called from within a hardware interrupt handler to avoid - reentrance problems - the caller may need to update its date and time values because the - system could have been suspended for a long period of time -SeeAlso: AX=5307h/CX=0001h"STAND-BY",AX=530Bh ---------p-155307CX0003----------------------- -INT 15 - Advanced Power Management v1.2 - TURN OFF SYSTEM - AX = 5307h - CX = 0003h - BX = 0001h (device ID for all power-managed devices) -Return: after system is resumed - CF clear -Notes: if supported by the system's power supply, turns off the system power -SeeAlso: AX=5307h/CX=0001h"STAND-BY",AX=530Bh ---------p-155308----------------------------- -INT 15 - Advanced Power Management v1.0+ - ENABLE/DISABLE POWER MANAGEMENT - AX = 5308h - BX = device ID for all devices power-managed by APM - 0001h (APM v1.1+) - FFFFh (APM v1.0) - CX = new state - 0000h disabled - 0001h enabled -Return: CF clear if successful - CF set on error - AH = error code (01h,03h,09h,0Ah,0Bh) (see #00473) -Notes: when power management is disabled, the system BIOS will not - automatically power down devices, enter stand-by or suspended mode, - or perform any power-saving actions in response to AX=5305h calls - should not be called from within a hardware interrupt handler to avoid - reentrance problems - the APM BIOS should never be both disabled and disengaged at the same - time -SeeAlso: AX=5309h,AX=530Dh,AX=530Fh ---------p-155309----------------------------- -INT 15 - Advanced Power Management v1.0+ - RESTORE POWER-ON DEFAULTS - AX = 5309h - BX = device ID for all devices power-managed by APM - 0001h (APM v1.1) - FFFFh (APM v1.0) -Return: CF clear if successful - CF set on error - AH = error code (03h,09h,0Bh) (see #00473) -Note: should not be called from within a hardware interrupt handler to avoid - reentrance problems -SeeAlso: AX=5308h ---------p-15530A----------------------------- -INT 15 - Advanced Power Management v1.0+ - GET POWER STATUS - AX = 530Ah - BX = device ID - 0001h all devices power-managed by APM - 80xxh specific battery unit number XXh (01h-FFh) (APM v1.2) -Return: CF clear if successful - BH = AC line status - 00h off-line - 01h on-line - 02h on backup power (APM v1.1) - FFh unknown - other reserved - BL = battery status (see #00476) - CH = battery flag (APM v1.1+) (see #00477) - CL = remaining battery life, percentage - 00h-64h (0-100) percentage of full charge - FFh unknown - DX = remaining battery life, time (APM v1.1) (see #00478) - ---if specific battery unit specified--- - SI = number of battery units currently installed - CF set on error - AH = error code (09h,0Ah) (see #00473) -Notes: should not be called from within a hardware interrupt handler to avoid - reentrance problems - supported in real mode (INT 15) and both 16-bit and 32-bit protected - mode - -(Table 00476) -Values for APM v1.0+ battery status: - 00h high - 01h low - 02h critical - 03h charging - FFh unknown - other reserved -SeeAlso: #00477,#00478 - -Bitfields for APM v1.1+ battery flag: -Bit(s) Description (Table 00477) - 0 high - 1 low - 2 critical - 3 charging - 4 selected battery not present (APM v1.2) - 5-6 reserved (0) - 7 no system battery -Note: all bits set (FFh) if unknown -SeeAlso: #00476,#00478 - -Bitfields for APM v1.1+ remaining battery life: -Bit(s) Description (Table 00478) - 15 time units: 0=seconds, 1=minutes - 14-0 battery life in minutes or seconds -Note: all bits set (FFFFh) if unknown -SeeAlso: #00476,#00477 ---------p-15530B----------------------------- -INT 15 - Advanced Power Management v1.0+ - GET POWER MANAGEMENT EVENT - AX = 530Bh -Return: CF clear if successful - BX = event code (see #00479) - CX = event information (APM v1.2) if BX=0003h or BX=0004h - bit 0: PCMCIA socket was powered down in suspend state - CF set on error - AH = error code (03h,0Bh,80h) (see #00473) -Notes: although power management events are often asynchronous, notification - will not be made until polled via this call to permit software to - only receive event notification when it is prepared to process - power management events; since these events are not very time- - critical, it should be sufficient to poll once or twice per second - the critical resume notification is made after the system resumes - from an emergency suspension; normally, the system BIOS only notifies - its partner that it wishes to suspend and relies on the partner to - actually request the suspension, but no notification is made on an - emergency suspension - should not be called from within a hardware interrupt handler to avoid - reentrance problems -SeeAlso: AX=5307h,AX=5307h/CX=0001h"STAND-BY",AX=5307h/CX=0002h"SUSPEND" - -(Table 00479) -Values for APM event code: - 0001h system stand-by request - 0002h system suspend request - 0003h normal resume system notification - 0004h critical resume system notification - 0005h battery low notification ----APM v1.1--- - 0006h power status change notification - 0007h update time notification - 0008h critical system suspend notification - 0009h user system standby request notification - 000Ah user system suspend request notification - 000Bh system standby resume notification ----APM v1.2--- - 000Ch capabilities change notification (see AX=5310h) ------- - 000Dh-00FFh reserved system events - 01xxh reserved device events - 02xxh OEM-defined APM events - 0300h-FFFFh reserved ---------p-15530C----------------------------- -INT 15 - Advanced Power Management v1.1+ - GET POWER STATE - AX = 530Ch - BX = device ID (see #00474) -Return: CF clear if successful - CX = system state ID (see #00475) - CF set on error - AH = error code (01h,09h) (see #00473) -SeeAlso: AX=5307h ---------p-15530D----------------------------- -INT 15 - Advanced Power Management v1.1+ - EN/DISABLE DEVICE POWER MANAGEMENT - AX = 530Dh - BX = device ID (see #00474) - CX = function - 0000h disable power management - 0001h enable power management -Return: CF clear if successful - CF set on error - AH = error code (01h,03h,09h,0Ah,0Bh) (see #00473) -Desc: specify whether automatic power management should be active for a - given device -SeeAlso: AX=5308h,AX=530Fh ---------p-15530E----------------------------- -INT 15 - Advanced Power Management v1.1+ - DRIVER VERSION - AX = 530Eh - BX = device ID of system BIOS (0000h) - CH = APM driver major version (BCD) - CL = APM driver minor version (BCD) (02h for APM v1.2) -Return: CF clear if successful - AH = APM connection major version (BCD) - AL = APM connection minor version (BCD) - CF set on error - AH = error code (03h,09h,0Bh) (see #00473) -SeeAlso: AX=5300h,AX=5303h ---------p-15530F----------------------------- -INT 15 - Advanced Power Management v1.1+ - ENGAGE/DISENGAGE POWER MANAGEMENT - AX = 530Fh - BX = device ID (see #00474) - CX = function - 0000h disengage power management - 0001h engage power management -Return: CF clear if successful - CF set on error - AH = error code (01h,09h) (see #00473) -Notes: unlike AX=5308h, this call does not affect the functioning of the APM - BIOS - when cooperative power management is disengaged, the APM BIOS performs - automatic power management of the system or device -SeeAlso: AX=5308h,AX=530Dh ---------p-155310----------------------------- -INT 15 - Advanced Power Management v1.2 - GET CAPABILITIES - AX = 5310h - BX = device ID (see #00474) - 0000h (APM BIOS) - other reserved -Return: CF clear if successful - BL = number of battery units supported (00h if no system batteries) - CX = capabilities flags (see #00480) - CF set on error - AH = error code (01h,09h,86h) (see #00473) -Notes: this function is supported via the INT 15, 16-bit protected mode, and - 32-bit protected mode interfaces; it does not require that a - connection be established prior to use - this function will return the capabilities currently in effect, not - any new settings which have been made but do not take effect until - a system restart -SeeAlso: AX=5300h,AX=530Fh,AX=5311h,AX=5312h,AX=5313h - -Bitfields for APM v1.2 capabilities flags: -Bit(s) Description (Table 00480) - 15-8 reserved - 7 PCMCIA Ring Indicator will wake up system from suspend mode - 6 PCMCIA Ring Indicator will wake up system from standby mode - 5 Resume on Ring Indicator will wake up system from suspend mode - 4 Resume on Ring Indicator will wake up system from standby mode - 3 resume timer will wake up system from suspend mode - 2 resume timer will wake up system from standby mode - 1 can enter global suspend state - 0 can enter global standby state ---------p-155311----------------------------- -INT 15 - Advanced Power Management v1.2 - GET/SET/DISABLE RESUME TIMER - AX = 5311h - BX = device ID (see #00474) - 0000h (APM BIOS) - other reserved - CL = function - 00h disable Resume Timer - 01h get Resume Timer - 02h set Resume Timer - CH = resume time, seconds (BCD) - DL = resume time, minutes (BCD) - DH = resume time, hours (BCD) - SI = resume date (BCD), high byte = month, low byte = day - DI = resume date, year (BCD) -Return: CF clear if successful - ---if getting timer--- - CH = resume time, seconds (BCD) - DL = resume time, minutes (BCD) - DH = resume time, hours (BCD) - SI = resume date (BCD), high byte = month, low byte = day - DI = resume date, year (BCD) - CF set on error - AH = error code (03h,09h,0Ah,0Bh,0Ch,0Dh,86h) (see #00473) -Notes: this function is supported via the INT 15, 16-bit protected mode, and - 32-bit protected mode interfaces -SeeAlso: AX=5300h,AX=5310h,AX=5312h,AX=5313h ---------p-155312----------------------------- -INT 15 - Advanced Power Management v1.2 - ENABLE/DISABLE RESUME ON RING - AX = 5312h - BX = device ID (see #00474) - 0000h (APM BIOS) - other reserved - CL = function - 00h disable Resume on Ring Indicator - 01h enable Resume on Ring Indicator - 02h get Resume on Ring Indicator status -Return: CF clear if successful - CX = resume status (0000h disabled, 0001h enabled) - CF set on error - AH = error code (03h,09h,0Ah,0Bh,0Ch,86h) (see #00473) -Notes: this function is supported via the INT 15, 16-bit protected mode, and - 32-bit protected mode interfaces -SeeAlso: AX=5300h,AX=5310h,AX=5311h,AX=5313h ---------p-155313----------------------------- -INT 15 - Advanced Power Management v1.2 - ENABLE/DISABLE TIMER-BASED REQUESTS - AX = 5313h - BX = device ID (see #00474) - 0000h (APM BIOS) - other reserved - CL = function - 00h disable timer-based requests - 01h enable timer-based requests - 02h get timer-based requests status -Return: CF clear if successful - CX = timer-based requests status (0000h disabled, 0001h enabled) - CF set on error - AH = error code (03h,09h,0Ah,0Bh,86h) (see #00473) -Notes: this function is supported via the INT 15, 16-bit protected mode, and - 32-bit protected mode interfaces - some BIOSes set AH on return even when successful -SeeAlso: AX=5300h,AX=5310h,AX=5311h,AX=5312h diff --git a/kernel/branches/net/docs/loader_doc.txt b/kernel/branches/net/docs/loader_doc.txt deleted file mode 100644 index d1e57e4a19..0000000000 --- a/kernel/branches/net/docs/loader_doc.txt +++ /dev/null @@ -1,88 +0,0 @@ -; (english text below) - -;------------------------------------------ -; Интерфейс сохранения параметров -;------------------------------------------ -Если при передаче управления ядру загрузчик устанавливает AX='KL', -то в DS:SI ядро ожидает дальнего указателя на следующую структуру: - db версия структуры, должна быть 1 - dw флаги: - бит 0 установлен = присутствует образ рамдиска в памяти - dd дальний указатель на процедуру сохранения параметров - может быть 0, если загрузчик не поддерживает -Процедура сохранения параметров должна записать первый сектор ядра -kernel.mnt назад на то место, откуда она его считала; возврат из -процедуры осуществляется по retf. - -;------------------------------------------ -; Указание загрузчиком системного каталога -;------------------------------------------ -Перед передачей управления ядру могут быть установлены следующие регистры: -CX='HA' -DX='RD' -Это указывает на то, что регистр BX указывает на системный раздел. Каталог /kolibri/ на -этом разделе является системным, к нему можно обращаться как к /sys/ - -Возможные значения регистра BL (указывает на устройство): -'a' - Primary Master -'b' - Primary Slave -'c' - Secondary Master -'d' - Secondary Slave -'r' - RAM диск -'m' - Приводы CD-ROM - -Возможные значения регистра BH (указывает на раздел): -для BL='a','b','c','d','r' - указывает на раздел, где расположен системный каталог -для BL='m',указывает на номер физического устройства, с которого надо начинать поиск системного каталога. - -примеры значений регистра BX: -'a1' - /hd0/1/ -'a2' - /hd0/2/ -'b1' - /hd1/1/ -'d4' - /hd3/4/ -'m0' - поиск по сидюкам каталога kolibri -'r1' - /rd/1/ - - -;------------------------------------------ -; Interface for saving boot-screen settings -;------------------------------------------ -If a loader sets AX='KL' when transferring control to the kernel, -the kernel expects in DS:SI far pointer to the following structure: - db structure version, must be 1 - dw flags - bit 0 set = ramdisk image in memory is present - dd far pointer to save settings procedure - may be 0 if such procedure is not supported by loader -Procedure for saving settings must write the first sector of the kernel -kernel.mnt back to the place, from where it has been read; return from -this procedure must be with retf. - -;------------------------------------------ -; System directory information from loader -;------------------------------------------ -Before transfer of control to the kernel following registers can be set: -CX = 'HA' -DX = 'RD' -This indicates that the register BX identifies system partition. The folder /kolibri/ in -this partition is system folder, it can be referenced as /sys/ - -Possible values for register BL (indicates the device): -'a' - Primary Master -'b' - Primary Slave -'c' - Secondary Master -'d' - Secondary Slave -'r' - RAM disc -'m' - ROM drives - -Possible values for register BH (indicates section): -for BL = 'a', 'b', 'c', 'd', 'r' to denote partition where the system folder -for BL = 'm', indicates the number of physical devices, which must begin a systematic search directory. - -Examples of register BX: -'a1' - /hd0/1/ -'a2' - /hd0/2/ -'b1' - /hd1/1/ -'d4' - /hd3/4/ -'m0' - search directory 'kolibri' by all CD-ROMs -'r1' - /rd/1/ diff --git a/kernel/branches/net/docs/sysfuncr.txt b/kernel/branches/net/docs/sysfuncr.txt deleted file mode 100644 index ea7edee3bc..0000000000 --- a/kernel/branches/net/docs/sysfuncr.txt +++ /dev/null @@ -1,4587 +0,0 @@ -‘€‘’…ЊЌ›… ”“ЌЉ–€€ ЋЏ…ђЂ–€ЋЌЌЋ‰ ‘€‘’…Њ› Kolibri 0.7.5.0 - -Ќ®¬Ґа дг­ЄжЁЁ Ї®¬Ґй Ґвбп ў ॣЁбва eax. -‚맮ў бЁб⥬­®© дг­ЄжЁЁ ®бгйҐбвў«пҐвбп Є®¬ ­¤®© "int 0x40". -‚ᥠॣЁбвал, Єа®¬Ґ пў­® гЄ § ­­ле ў ў®§ўа й Ґ¬®¬ §­ зҐ­ЁЁ, - ўЄ«оз п ॣЁбва д« Ј®ў eflags, б®еа ­повбп. - - -====================================================================== -============== ”г­ЄжЁп 0 - ®ЇаҐ¤Ґ«Ёвм Ё ­ аЁб®ў вм ®Є­®. ============= -====================================================================== -ЋЇаҐ¤Ґ«пҐв ®Є­® ЇаЁ«®¦Ґ­Ёп. ђЁбгҐв а ¬Єг ®Є­ , § Ј®«®ў®Є Ё а Ў®зго -®Ў« бвм. „«п ®Є®­ б® бЄЁ­®¬ ®ЇаҐ¤Ґ«пҐв бв ­¤ ав­лҐ Є­®ЇЄЁ § ЄалвЁп Ё -¬Ё­Ё¬Ё§ жЁЁ. -Џ а ¬Ґвал: - * eax = 0 - ­®¬Ґа дг­ЄжЁЁ - * ebx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [а §¬Ґа Ї® ®бЁ x] - * ecx = [Є®®а¤Ё­ в  Ї® ®бЁ y]*65536 + [а §¬Ґа Ї® ®бЁ y] - * edx = 0xXYRRGGBB, Ј¤Ґ: - * Y = бвЁ«м ®Є­ : - * Y=0 - вЁЇ I - ®Є­® дЁЄбЁа®ў ­­ле а §¬Ґа®ў - * Y=1 - в®«мЄ® ®ЇаҐ¤Ґ«Ёвм ®Ў« бвм ®Є­ , ­ЁзҐЈ® ­Ґ аЁб®ў вм - * Y=2 - вЁЇ II - ®Є­® Ё§¬Ґ­пҐ¬ле а §¬Ґа®ў - * Y=3 - ®Є­® б® бЄЁ­®¬ - * Y=4 - ®Є­® б® бЄЁ­®¬ дЁЄбЁа®ў ­­ле а §¬Ґа®ў - * ®бв «м­лҐ ў®§¬®¦­лҐ §­ зҐ­Ёп (®в 5 ¤® 15) § аҐ§ҐаўЁа®ў ­л, - ўл§®ў дг­ЄжЁЁ б в ЄЁ¬Ё Y ЁЈ­®аЁагҐвбп - * RR, GG, BB = ᮮ⢥вб⢥­­® Єа б­ п, §Ґ«Ґ­ п, бЁ­пп - б®бв ў«пойЁҐ жўҐв  а Ў®зҐ© ®Ў« бвЁ ®Є­  - (ЁЈ­®аЁагҐвбп ¤«п бвЁ«п Y=2) - * X = DCBA (ЎЁвл) - * A = 1 - г ®Є­  Ґбвм § Ј®«®ў®Є; ¤«п бвЁ«Ґ© Y=3,4  ¤аҐб бва®ЄЁ - § Ј®«®ўЄ  § ¤ свбп ў edi, ¤«п Їа®зЁе бвЁ«Ґ© - ЁбЇ®«м§гҐвбп Ї®¤дг­ЄжЁп 1 дг­ЄжЁЁ 71 - * B = 1 - Є®®а¤Ё­ вл ўбҐе Ја дЁзҐбЄЁе ЇаЁ¬ЁвЁў®ў § ¤ овбп - ®в­®бЁвҐ«м­® Є«ЁҐ­вбЄ®© ®Ў« бвЁ ®Є­  - * C = 1 - ­Ґ § Єа иЁў вм а Ў®зго ®Ў« бвм ЇаЁ ®ваЁб®ўЄҐ ®Є­  - * D = 0 - ­®а¬ «м­ п § «ЁўЄ  а Ў®зҐ© ®Ў« бвЁ, 1 - Ја ¤ЁҐ­в­ п - ‘«Ґ¤гойЁҐ Ї а ¬Ґвал ЇаҐ¤­ §­ зҐ­л ¤«п ®Є®­ вЁЇ  I Ё II Ё - ЁЈ­®аЁаговбп ¤«п бвЁ«Ґ© Y=1,3: - * esi = 0xXYRRGGBB - 梥⠧ Ј®«®ўЄ  - * RR, GG, BB ®ЇаҐ¤Ґ«пов б ¬ 梥в - * Y=0 - ®Ўлз­®Ґ ®Є­®, Y=1 - ­ҐЇҐаҐ¬Ґй Ґ¬®Ґ ®Є­® - * X ®ЇаҐ¤Ґ«пҐв Ја ¤ЁҐ­в § Ј®«®ўЄ : X=0 - ­Ґв Ја ¤ЁҐ­в , - X=8 - ®Ўлз­л© Ја ¤ЁҐ­в, - ¤«п ®Є®­ вЁЇ  II X=4 - ­ҐЈ вЁў­л© Ја ¤ЁҐ­в - * Їа®зЁҐ §­ зҐ­Ёп X Ё Y § аҐ§ҐаўЁа®ў ­л - * edi = 0x00RRGGBB - 梥в а ¬ЄЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џ®«®¦Ґ­ЁҐ Ё а §¬Ґал ®Є­  гбв ­ ў«Ёў овбп ЇаЁ ЇҐаў®¬ ўл§®ўҐ - нв®© дг­ЄжЁЁ Ё ЁЈ­®аЁаговбп ЇаЁ Ї®б«Ґ¤гойЁе; ¤«п Ё§¬Ґ­Ґ­Ёп - Ї®«®¦Ґ­Ёп Ё/Ё«Ё а §¬Ґа®ў 㦥 ᮧ¤ ­­®Ј® ®Є­  ЁбЇ®«м§г©вҐ - 67-о дг­ЄжЁо. - * „«п ®Є®­ бвЁ«Ґ© Y=3,4 б § Ј®«®ўЄ®¬ (A=1) бва®Є  § Ј®«®ўЄ  - гбв ­ ў«Ёў Ґвбп ЇаЁ ЇҐаў®¬ ўл§®ўҐ нв®© дг­ЄжЁЁ Ё ЁЈ­®аЁагҐвбп ЇаЁ - Ї®б«Ґ¤гойЁе (в®з­ҐҐ Ј®ў®ап, ЁЈ­®аЁагҐвбп Ї®б«Ґ ўл§®ў  - Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 12 - Є®­ж  ЇҐаҐаЁб®ўЄЁ); - ¤«п Ё§¬Ґ­Ґ­Ёп бва®ЄЁ § Ј®«®ўЄ  㦥 ᮧ¤ ­­®Ј® ®Є­  ЁбЇ®«м§г©вҐ - Ї®¤дг­ЄжЁо 1 дг­ЄжЁЁ 71. - * …б«Ё ЁбЇ®«м§®ў вм ®Є­  ᮮ⢥вбвўгойЁе бвЁ«Ґ©, в® Ї®«®¦Ґ­ЁҐ - Ё/Ё«Ё а §¬Ґал ®Є­  ¬®Јгв ¬Ґ­пвмбп Ї®«м§®ў вҐ«Ґ¬. - ’ҐЄгйЁҐ Ї®«®¦Ґ­ЁҐ Ё а §¬Ґал ¬®Јгв Ўлвм Ї®«гзҐ­л ўл§®ў®¬ дг­ЄжЁЁ 9. - * ЋЄ­® ¤®«¦­® 㬥й вмбп ­  нЄа ­Ґ. …б«Ё ЇҐаҐ¤ ­­лҐ Є®®а¤Ё­ вл - Ё а §¬Ґал ­Ґ 㤮ў«Ґвў®апов н⮬г гб«®ўЁо, ⮠ᮮ⢥вбвўгой п - Є®®а¤Ё­ в  (Ё«Ё, ў®§¬®¦­®, ®ЎҐ) бзЁв Ґвбп ­г«Ґ¬,   Ґб«Ё Ё нв® - ­Ґ Ї®¬®Ј Ґв, ⮠ᮮ⢥вбвўгойЁ© а §¬Ґа (Ё«Ё, ў®§¬®¦­®, ®Ў ) - гбв ­ ў«Ёў Ґвбп ў а §¬Ґа нЄа ­ . - - „ «ҐҐ ®Ў®§­ зЁ¬ xpos,ypos,xsize,ysize - §­ зҐ­Ёп, ЇҐаҐ¤ ў Ґ¬лҐ - ў ebx,ecx. Љ®®а¤Ё­ вл ЇаЁў®¤пвбп ®в­®бЁвҐ«м­® «Ґў®Ј® ўҐае­ҐЈ® - гЈ«  ®Є­ , Є®в®ал©, в ЄЁ¬ ®Ўа §®¬, § ¤ Ґвбп Є Є (0,0), Є®®а¤Ё­ вл - Їа ў®Ј® ­Ё¦­ҐЈ® гЈ«  бгвм (xsize,ysize). - * ђ §¬Ґал ®Є­  Ї®­Ё¬ овбп ў б¬лб«Ґ Є®®а¤Ё­ в Їа ў®Ј® ­Ё¦­ҐЈ® гЈ« . - ќв® ¦Ґ ®в­®бЁвбп Ё Є® ўбҐ¬ ®бв «м­л¬ дг­ЄжЁп¬. - ќв® ®§­ з Ґв, з⮠ॠ«м­лҐ а §¬Ґал ­  1 ЇЁЄбҐ«м Ў®«миҐ. - * ‚Ё¤ ®Є­  вЁЇ  I: - * аЁбгҐвбп ў­Ґи­пп а ¬Є  梥в , гЄ § ­­®Ј® ў edi, - иЁаЁ­®© 1 ЇЁЄбҐ«м - * аЁбгҐвбп § Ј®«®ў®Є - Їаאַ㣮«м­ЁЄ б «Ґўл¬ ўҐае­Ё¬ гЈ«®¬ (1,1) - Ё Їа ўл¬ ­Ё¦­Ё¬ (xsize-1,min(25,ysize)) 梥в , гЄ § ­­®Ј® ў esi - (б гзҐв®¬ Ја ¤ЁҐ­в ) - * Ґб«Ё ysize>=26, в® § Єа иЁў Ґвбп а Ў®з п ®Ў« бвм ®Є­  - - Їаאַ㣮«м­ЁЄ б «Ґўл¬ ўҐае­Ё¬ гЈ«®¬ (1,21) Ё Їа ўл¬ ­Ё¦­Ё¬ - (xsize-1,ysize-1) (а §¬Ґа ¬Ё (xsize-1)*(ysize-21)) - 梥⮬, - гЄ § ­­л¬ ў edx (б гзҐв®¬ Ја ¤ЁҐ­в ) - * Ґб«Ё A=1 Ё бва®Є  § Ј®«®ўЄ  гбв ­®ў«Ґ­  Ї®¤дг­ЄжЁҐ© 1 - дг­ЄжЁЁ 71, в® ®­  ўлў®¤Ёвбп ў ᮮ⢥вбвўго饬 ¬Ґб⥠§ Ј®«®ўЄ  - * ‚Ё¤ ®Є­  бвЁ«п Y=1: - * Ї®«­®бвмо ®ЇаҐ¤Ґ«пҐвбп ЇаЁ«®¦Ґ­ЁҐ¬ - * ‚Ё¤ ®Є­  вЁЇ  II: - * аЁбгҐвбп ў­Ґи­пп а ¬Є  иЁаЁ­®© 1 ЇЁЄбҐ«м "§ вҐ­с­­®Ј®" жўҐв  - edi (ўбҐ б®бв ў«пойЁҐ жўҐв  г¬Ґ­ми овбп ў ¤ў  а § ) - * аЁбгҐвбп Їа®¬Ґ¦гв®з­ п а ¬Є  иЁаЁ­®© 3 ЇЁЄбҐ«п жўҐв  edi - * аЁбгҐвбп ў­гв७­пп а ¬Є  иЁаЁ­®© 1 ЇЁЄбҐ«м - "§ вҐ­с­­®Ј®" жўҐв  edi - * аЁбгҐвбп § Ј®«®ў®Є - Їаאַ㣮«м­ЁЄ б «Ґўл¬ ўҐае­Ё¬ гЈ«®¬ (4,4) - Ё Їа ўл¬ ­Ё¦­Ё¬ (xsize-4,min(20,ysize)) 梥в , гЄ § ­­®Ј® ў esi - (б гзҐв®¬ Ја ¤ЁҐ­в ) - * Ґб«Ё ysize>=26, в® § Єа иЁў Ґвбп а Ў®з п ®Ў« бвм ®Є­  - - Їаאַ㣮«м­ЁЄ б «Ґўл¬ ўҐае­Ё¬ гЈ«®¬ (5,20) Ё Їа ўл¬ ­Ё¦­Ё¬ - (xsize-5,ysize-5) - 梥⮬, гЄ § ­­л¬ ў edx (б гзҐв®¬ Ја ¤ЁҐ­в ) - * Ґб«Ё A=1 Ё бва®Є  § Ј®«®ўЄ  гбв ­®ў«Ґ­  Ї®¤дг­ЄжЁҐ© 1 - дг­ЄжЁЁ 71, в® ®­  ўлў®¤Ёвбп ў ᮮ⢥вбвўго饬 ¬Ґб⥠§ Ј®«®ўЄ  - * ‚Ё¤ ®Є­  б® бЄЁ­®¬: - * аЁбгҐвбп ў­Ґи­пп а ¬Є  иЁаЁ­®© 1 ЇЁЄбҐ«м - жўҐв  'outer' Ё§ бЄЁ­  - * аЁбгҐвбп Їа®¬Ґ¦гв®з­ п а ¬Є  иЁаЁ­®© 3 ЇЁЄбҐ«п - жўҐв  'frame' Ё§ бЄЁ­  - * аЁбгҐвбп ў­гв७­пп а ¬Є  иЁаЁ­®© 1 ЇЁЄбҐ«м - жўҐв  'inner' Ё§ бЄЁ­  - * аЁбгҐвбп § Ј®«®ў®Є (Ї® Є авЁ­Є ¬ Ё§ бЄЁ­ ) ў Їаאַ㣮«м­ЁЄҐ - (0,0) - (xsize,_skinh-1) - * Ґб«Ё ysize>=26, в® § Єа иЁў Ґвбп а Ў®з п ®Ў« бвм ®Є­  - - Їаאַ㣮«м­ЁЄ б «Ґўл¬ ўҐае­Ё¬ гЈ«®¬ (5,_skinh) Ё Їа ўл¬ ­Ё¦­Ё¬ - (xsize-5,ysize-5) - 梥⮬, гЄ § ­­л¬ ў edx (б гзҐв®¬ Ја ¤ЁҐ­в ) - * ®ЇаҐ¤Ґ«повбп ¤ўҐ бв ­¤ ав­лҐ Є­®ЇЄЁ: § ЄалвЁп Ё ¬Ё­Ё¬Ё§ жЁЁ - (ᬮваЁ дг­ЄжЁо 8) - * Ґб«Ё A=1 Ё ў edi (­Ґ­г«Ґў®©) гЄ § вҐ«м ­  бва®Єг § Ј®«®ўЄ , - в® ®­  ўлў®¤Ёвбп ў § Ј®«®ўЄҐ ў ¬ҐбвҐ, ®ЇаҐ¤Ґ«пҐ¬®¬ бЄЁ­®¬ - * ‡­ зҐ­ЁҐ ЇҐаҐ¬Ґ­­®© _skinh ¤®бвгЇ­® Є Є १г«мв в ўл§®ў  - Ї®¤дг­ЄжЁЁ 4 дг­ЄжЁЁ 48 - -====================================================================== -================= ”г­ЄжЁп 1 - Ї®бв ўЁвм в®зЄг ў ®Є­Ґ. ================ -====================================================================== -Џ а ¬Ґвал: - * eax = 1 - ­®¬Ґа дг­ЄжЁЁ - * ebx = x-Є®®а¤Ё­ в  (®в­®бЁвҐ«м­® ®Є­ ) - * ecx = y-Є®®а¤Ё­ в  (®в­®бЁвҐ«м­® ®Є­ ) - * edx = 0x00RRGGBB - 梥в в®зЄЁ - edx = 0x01xxxxxx - Ё­ўҐавЁа®ў вм 梥в в®зЄЁ - (¬« ¤иЁҐ 24 ЎЁв  ЁЈ­®аЁаговбп) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -====================================================================== -============== ”г­ЄжЁп 2 - Ї®«гзЁвм Є®¤ ­ ¦ в®© Є« ўЁиЁ. ============= -====================================================================== -‡ ЎЁа Ґв Є®¤ ­ ¦ в®© Є« ўЁиЁ Ё§ ЎгдҐа . -Џ а ¬Ґвал: - * eax = 2 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё ЎгдҐа Їгбв, ў®§ўа й Ґвбп eax=1 - * Ґб«Ё ЎгдҐа ­ҐЇгбв, в® ў®§ўа й Ґвбп al=0, ah=Є®¤ ­ ¦ в®© Є« ўЁиЁ, - бв а襥 б«®ў® ॣЁбва  eax ®Ў­г«Ґ­® - * Ґб«Ё Ґбвм "Ј®апз п Є« ўЁи ", в® ў®§ўа й Ґвбп - al=2, ah=бЄ ­Є®¤ ­ ¦ в®© Є« ўЁиЁ (0 ¤«п гЇа ў«пойЁе Є« ўЁи), - бв а襥 б«®ў® ॣЁбва  eax ᮤҐа¦Ёв б®бв®п­ЁҐ гЇа ў«пойЁе Є« ўЁи - ў ¬®¬Ґ­в ­ ¦ вЁп Ј®ап祩 Є« ўЁиЁ -‡ ¬Ґз ­Ёп: - * ‘гйҐбвўгҐв ®ЎйҐбЁб⥬­л© ЎгдҐа ­ ¦ вле Є« ўЁи а §¬Ґа®¬ 120 Ў ©в, - ®аЈ ­Ё§®ў ­­л© Є Є ®зҐаҐ¤м. - * ‘гйҐбвўгҐв Ґйс ®¤Ё­ ®ЎйҐбЁб⥬­л© ЎгдҐа ­  120 "Ј®апзЁе Є« ўЁи". - * ЏаЁ ўл§®ўҐ нв®© дг­ЄжЁЁ ЇаЁ«®¦Ґ­ЁҐ¬ б ­Ґ ЄвЁў­л¬ ®Є­®¬ - бзЁв Ґвбп, зв® ЎгдҐа ­ ¦ вле Є« ўЁи Їгбв. - * Џ® 㬮«з ­Ёо нв  дг­ЄжЁп ў®§ўа й Ґв ASCII-Є®¤л; ЇҐаҐЄ«озЁвмбп ­  - ०Ё¬ бЄ ­Є®¤®ў (Ё ­ § ¤) ¬®¦­® б ЁбЇ®«м§®ў ­ЁҐ¬ дг­ЄжЁЁ 66. - Ћ¤­ Є®, Ј®апзЁҐ Є« ўЁиЁ ўбҐЈ¤  ў®§ўа й овбп Є Є бЄ ­Є®¤л. - * “§­ вм, Є ЄЁҐ Є®¬ЎЁ­ жЁЁ Є« ўЁи ᮮ⢥вбвўгов Є ЄЁ¬ Є®¤ ¬, ¬®¦­®, - § ЇгбвЁў ЇаЁ«®¦Ґ­Ёп keyascii Ё scancode. - * ‘Є ­Є®¤л ў®§ўа й овбп ­ҐЇ®б।б⢥­­® Є« ўЁ вга®© Ё дЁЄбЁа®ў ­л; - ASCII-Є®¤л Ї®«гз овбп б ЁбЇ®«м§®ў ­ЁҐ¬ в Ў«Ёж ЇаҐ®Ўа §®ў ­Ёп, - Є®в®алҐ ¬®¦­® гбв ­®ўЁвм Ї®¤дг­ЄжЁҐ© 2 дг­ЄжЁЁ 21 Ё Їа®зЁв вм - Ї®¤дг­ЄжЁҐ© 2 дг­ЄжЁЁ 26. - * Љ Є б«Ґ¤бвўЁҐ, ASCII-Є®¤л гзЁвлў ов ⥪гйго а бЄ« ¤Єг Є« ўЁ вгал - (rus/en) ў ®в«ЁзЁҐ ®в бЄ ­Є®¤®ў. - * Џ®бвгЇ Ґв Ё­д®а¬ жЁп в®«мЄ® ® вҐе Ј®апзЁе Є« ўЁи е, Є®в®алҐ Ўл«Ё - ®ЇаҐ¤Ґ«Ґ­л нвЁ¬ Ї®в®Є®¬ Ї®¤дг­ЄжЁҐ© 4 дг­ЄжЁЁ 66. - -====================================================================== -================ ”г­ЄжЁп 3 - Ї®«гзЁвм бЁб⥬­®Ґ ўаҐ¬п. =============== -====================================================================== -Џ а ¬Ґвал: - * eax = 3 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0x00SSMMHH, Ј¤Ґ HH:MM:SS = з бл:¬Ё­гвл:ᥪ㭤л - * Є ¦¤л© н«Ґ¬Ґ­в ў®§ўа й Ґвбп Є Є BCD-зЁб«®, ­ ЇаЁ¬Ґа, - ¤«п ўаҐ¬Ґ­Ё 23:59:59 १г«мв в Ўг¤Ґв 0x00595923 -‡ ¬Ґз ­Ёп: - * ‘¬®ваЁ в Є¦Ґ Ї®¤дг­ЄжЁо 9 дг­ЄжЁЁ 26 - Ї®«г祭ЁҐ ўаҐ¬Ґ­Ё - б ¬®¬Ґ­в  § ЇгбЄ  бЁб⥬л; ®­  ў® ¬­®ЈЁе б«гз пе 㤮Ў­ҐҐ, - Ї®бЄ®«мЄг ў®§ўа й Ґв Їа®бв® DWORD-§­ зҐ­ЁҐ бзҐвзЁЄ  ўаҐ¬Ґ­Ё. - * ‘Ёб⥬­®Ґ ўаҐ¬п ¬®¦­® гбв ­®ўЁвм дг­ЄжЁҐ© 22. - -====================================================================== -============== ”г­ЄжЁп 4 - ўлўҐбвЁ бва®Єг ⥪бв  ў ®Є­®. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 4 - ­®¬Ґа дг­ЄжЁЁ - * ebx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [Є®®а¤Ё­ в  Ї® ®бЁ y] - * ecx = 0xX0RRGGBB, Ј¤Ґ - * RR, GG, BB § ¤ ов 梥в ⥪бв  - * X=ABnn (ЎЁвл): - * nn § ¤ Ґв ЁбЇ®«м§гҐ¬л© иаЁдв: 0=бЁб⥬­л© ¬®­®иЁаЁ­­л©, - 1=бЁб⥬­л© иаЁдв ЇҐаҐ¬Ґ­­®© иЁаЁ­л - * A=0 - ўлў®¤Ёвм esi бЁ¬ў®«®ў, A=1 - ўлў®¤Ёвм ASCIIZ-бва®Єг - * B=1 - § Єа иЁў вм д®­ 梥⮬ edi - * edx = гЄ § вҐ«м ­  ­ з «® бва®ЄЁ - * esi = ¤«п A=0 ¤«Ё­  бва®ЄЁ, ¤®«¦­  Ўлвм ­Ґ Ў®«миҐ 255; - ¤«п A=1 ЁЈ­®аЁагҐвбп -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ЏҐаўл© бЁб⥬­л© иаЁдв бзЁвлў Ґвбп ЇаЁ § Јаг§ЄҐ Ё§ д ©«  char.mt, - ўв®а®© - Ё§ char2.mt. - * ЋЎ  иаЁдв  Ё¬Ґов ўлб®вг 9 ЇЁЄбҐ«Ґ©, иЁаЁ­  ¬®­®иЁаЁ­­®Ј® иаЁдв  - а ў­  6 ЇЁЄбҐ«Ґ©. - -====================================================================== -========================= ”г­ЄжЁп 5 - Ї г§ . ========================= -====================================================================== -‡ ¤Ґа¦Ёў Ґв ўлЇ®«­Ґ­ЁҐ Їа®Ја ¬¬л ­  § ¤ ­­®Ґ ўаҐ¬п. -Џ а ¬Ґвал: - * eax = 5 - ­®¬Ґа дг­ЄжЁЁ - * ebx = ўаҐ¬п ў б®вле ¤®«пе ᥪ㭤л -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ЏҐаҐ¤ з  ebx=0 ­Ґ ЇҐаҐ¤ Ґв гЇа ў«Ґ­ЁҐ б«Ґ¤го饬㠯а®жҐббг Ё - ў®®ЎйҐ ­Ґ Їа®Ё§ў®¤Ёв ­ЁЄ ЄЁе ¤Ґ©бвўЁ©. …б«Ё ¤Ґ©б⢨⥫쭮 - вॡгҐвбп ЇҐаҐ¤ вм гЇа ў«Ґ­ЁҐ б«Ґ¤го饬㠯а®жҐббг - (§ Є®­зЁвм ⥪гйЁ© Єў ­в ўаҐ¬Ґ­Ё), ЁбЇ®«м§г©вҐ Ї®¤дг­ЄжЁо 1 - дг­ЄжЁЁ 68. - -====================================================================== -=============== ”г­ЄжЁп 6 - Їа®зЁв вм д ©« б а ¬¤ЁбЄ . =============== -====================================================================== -Џ а ¬Ґвал: - * eax = 6 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё¬п д ©«  - * ecx = ­®¬Ґа бв ав®ў®Ј® Ў«®Є , бзЁв п б 1; - ecx=0 - зЁв вм б ­ з «  д ©«  (в® ¦Ґ б ¬®Ґ, зв® Ё ecx=1) - * edx = зЁб«® Ў«®Є®ў ¤«п з⥭Ёп; - edx=0 - зЁв вм ®¤Ё­ Ў«®Є (в® ¦Ґ б ¬®Ґ, зв® Ё edx=1) - * esi = гЄ § вҐ«м ­  ®Ў« бвм Ї ¬пвЁ, Єг¤  Ўг¤гв § ЇЁб ­л ¤ ­­лҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ¤«Ё­  д ©«  ў Ў ©в е, Ґб«Ё д ©« гбЇҐи­® Їа®зЁв ­ - * eax = -1, Ґб«Ё д ©« ­Ґ ­ ©¤Ґ­ -‡ ¬Ґз ­Ёп: - * „ ­­ п дг­ЄжЁп пў«пҐвбп гбв аҐўиҐ©; дг­ЄжЁп 70 - Ї®§ў®«пҐв ўлЇ®«­пвм ⥠¦Ґ ¤Ґ©бвўЁп б а биЁаҐ­­л¬Ё ў®§¬®¦­®бвп¬Ё. - * Ѓ«®Є = 512 Ў ©в. - * „«п з⥭Ёп ўбҐЈ® д ©«  ¬®¦­® гЄ § вм § ўҐ¤®¬® Ў®«м讥 §­ зҐ­ЁҐ - ў edx, ­ ЇаЁ¬Ґа, edx = -1; ­® ў н⮬ б«гз Ґ Ўг¤м⥠Ј®в®ўл Є ⮬г, - зв® Їа®Ја ¬¬  "гЇ ¤Ґв", Ґб«Ё д ©« ®Є ¦Ґвбп б«ЁиЄ®¬ Ў®«миЁ¬ - Ё "­Ґ ў«Ґ§Ґв" ў Ї ¬пвм Їа®Ја ¬¬л. - * €¬п д ©«  ¤®«¦­® Ўлвм «ЁЎ® ў д®а¬ вҐ 8+3 бЁ¬ў®«®ў - (ЇҐаўлҐ 8 бЁ¬ў®«®ў - б®Ўб⢥­­® Ё¬п, Ї®б«Ґ¤­ЁҐ 3 - а биЁаҐ­ЁҐ, - Є®а®вЄЁҐ Ё¬Ґ­  Ё а биЁаҐ­Ёп ¤®Ї®«­повбп Їа®ЎҐ« ¬Ё), - «ЁЎ® ў д®а¬ вҐ 8.3 бЁ¬ў®«®ў "FILE.EXT"/"FILE.EX " - (Ё¬п ­Ґ Ў®«ҐҐ 8 бЁ¬ў®«®ў, в®зЄ , а биЁаҐ­ЁҐ 3 бЁ¬ў®« , - ¤®Ї®«­Ґ­­®Ґ ЇаЁ ­Ґ®Ўе®¤Ё¬®бвЁ Їа®ЎҐ« ¬Ё). - €¬п д ©«  ¤®«¦­® Ўлвм § ЇЁб ­® § Ј« ў­л¬Ё ЎгЄў ¬Ё. - ‡ ўҐаи ойЁ© бЁ¬ў®« б Є®¤®¬ 0 ­Ґ ­г¦Ґ­ (­Ґ ASCIIZ-бва®Є ). - * ќв  дг­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґв Ї ЇЄЁ ­  а ¬¤ЁбЄҐ. - -====================================================================== -=============== ”г­ЄжЁп 7 - ўлўҐбвЁ Ё§®Ўа ¦Ґ­ЁҐ ў ®Є­®. ============== -====================================================================== -Џ а ¬Ґвал: - * eax = 7 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё§®Ўа ¦Ґ­ЁҐ ў д®а¬ вҐ BBGGRRBBGGRR... - * ecx = [а §¬Ґа Ї® ®бЁ x]*65536 + [а §¬Ґа Ї® ®бЁ y] - * edx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [Є®®а¤Ё­ в  Ї® ®бЁ y] -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Љ®®а¤Ё­ вл Ё§®Ўа ¦Ґ­Ёп - нв® Є®®а¤Ё­ вл ўҐае­ҐЈ® «Ґў®Ј® гЈ«  - Ё§®Ўа ¦Ґ­Ёп ®в­®бЁвҐ«м­® ®Є­ . - * ђ §¬Ґа Ё§®Ўа ¦Ґ­Ёп ў Ў ©в е Ґбвм 3*xsize*ysize. - -====================================================================== -=============== ”г­ЄжЁп 8 - ®ЇаҐ¤Ґ«Ёвм/г¤ «Ёвм Є­®ЇЄг. =============== -====================================================================== -Џ а ¬Ґвал ¤«п ®ЇаҐ¤Ґ«Ґ­Ёп Є­®ЇЄЁ: - * eax = 8 - ­®¬Ґа дг­ЄжЁЁ - * ebx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [а §¬Ґа Ї® ®бЁ x] - * ecx = [Є®®а¤Ё­ в  Ї® ®бЁ y]*65536 + [а §¬Ґа Ї® ®бЁ y] - * edx = 0xXYnnnnnn, Ј¤Ґ: - * nnnnnn = Ё¤Ґ­вЁдЁЄ в®а Є­®ЇЄЁ - * бв аиЁ© (31-©) ЎЁв edx бЎа®иҐ­ - * Ґб«Ё 30-© ЎЁв edx гбв ­®ў«Ґ­ - ­Ґ Їа®аЁб®ўлў вм Є­®ЇЄг - * Ґб«Ё 29-© ЎЁв edx гбв ­®ў«Ґ­ - ­Ґ аЁб®ў вм а ¬Єг - ЇаЁ ­ ¦ вЁЁ ­  Є­®ЇЄг - * esi = 0x00RRGGBB - 梥⠪­®ЇЄЁ -Џ а ¬Ґвал ¤«п г¤ «Ґ­Ёп Є­®ЇЄЁ: - * eax = 8 - ­®¬Ґа дг­ЄжЁЁ - * edx = 0x80nnnnnn, Ј¤Ґ nnnnnn - Ё¤Ґ­вЁдЁЄ в®а Є­®ЇЄЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ђ §¬Ґал Є­®ЇЄЁ ¤®«¦­л Ўлвм Ў®«миҐ 0 Ё ¬Ґ­миҐ 0x8000. - * „«п ®Є®­ б® бЄЁ­®¬ ЇаЁ ®ЇаҐ¤Ґ«Ґ­ЁЁ ®Є­  (ўл§®ўҐ 0-© дг­ЄжЁЁ) - ᮧ¤ овбп ¤ўҐ бв ­¤ ав­лҐ Є­®ЇЄЁ - § ЄалвЁп ®Є­  - б Ё¤Ґ­вЁдЁЄ в®а®¬ 1 Ё ¬Ё­Ё¬Ё§ жЁЁ ®Є­  б Ё¤Ґ­вЁдЁЄ в®а®¬ 0xffff. - * ‘®§¤ ­ЁҐ ¤ўге Є­®Ї®Є б ®¤Ё­ Є®ўл¬Ё Ё¤Ґ­вЁдЁЄ в®а ¬Ё - ўЇ®«­Ґ ¤®ЇгбвЁ¬®. - * Љ­®ЇЄ  б Ё¤Ґ­вЁдЁЄ в®а®¬ 0xffff ЇаЁ ­ ¦ вЁЁ Ё­вҐаЇаҐвЁагҐвбп - бЁб⥬®© Є Є Є­®ЇЄ  ¬Ё­Ё¬Ё§ жЁЁ, бЁб⥬  ®Ўа Ў влў Ґв в Є®Ґ - ­ ¦ вЁҐ б ¬®бв®п⥫쭮, ­Ґ ®Ўа й пбм Є ЇаЁ«®¦Ґ­Ёо. - ‚ ®бв «м­®¬ нв® ®Ўлз­ п Є­®ЇЄ . - * ЋЎйҐҐ Є®«ЁзҐбвў® Є­®Ї®Є ¤«п ўбҐе ЇаЁ«®¦Ґ­Ё© ®Ја ­ЁзҐ­® - зЁб«®¬ 4095. - -====================================================================== -============= ”г­ЄжЁп 9 - Ё­д®а¬ жЁп ® Ї®в®ЄҐ ўлЇ®«­Ґ­Ёп. ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 9 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  ЎгдҐа а §¬Ґа  1 ЉЎ - * ecx = ­®¬Ґа б«®в  Ї®в®Є  - ecx = -1 - Ї®«гзЁвм Ё­д®а¬ жЁо ® ⥪г饬 Ї®в®ЄҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ¬ ЄбЁ¬ «м­л© ­®¬Ґа б«®в  Ї®в®Є  - * ЎгдҐа, ­  Є®в®ал© гЄ §лў Ґв ebx, ᮤҐа¦Ёв б«Ґ¤гойго Ё­д®а¬ жЁо: - * +0: dword: ЁбЇ®«м§®ў ­ЁҐ Їа®жҐбб®а  (бЄ®«мЄ® в Єв®ў ў ᥪ㭤г - г室Ёв ­  ЁбЇ®«­Ґ­ЁҐ Ё¬Ґ­­® нв®Ј® Ї®в®Є ) - * +4: word: Ї®§ЁжЁп ®Є­  Ї®в®Є  ў ®Є®­­®¬ бвнЄҐ - * +6: word: (­Ґ Ё¬ҐҐв ®в­®иҐ­Ёп Є § Їа®иҐ­­®¬г Ї®в®Єг) - ­®¬Ґа б«®в  Ї®в®Є , ®Є­® Є®в®а®Ј® ­ е®¤Ёвбп ў ®Є®­­®¬ бвнЄҐ - ў Ї®§ЁжЁЁ ecx - * +8: word: § аҐ§ҐаўЁа®ў ­® - * +10 = +0xA: 11 Ў ©в: Ё¬п Їа®жҐбб  - (Ё¬п ᮮ⢥вбвўго饣® ЁбЇ®«­пҐ¬®Ј® д ©«  ў д®а¬ вҐ 8+3) - * +21 = +0x15: byte: § аҐ§ҐаўЁа®ў ­®, нв®в Ў ©в ­Ґ Ё§¬Ґ­пҐвбп - * +22 = +0x16: dword:  ¤аҐб Їа®жҐбб  ў Ї ¬пвЁ - * +26 = +0x1A: dword: а §¬Ґа ЁбЇ®«м§гҐ¬®© Ї ¬пвЁ - 1 - * +30 = +0x1E: dword: Ё¤Ґ­вЁдЁЄ в®а (PID/TID) - * +34 = +0x22: dword: Є®®а¤Ё­ в  ®Є­  Ї®в®Є  Ї® ®бЁ x - * +38 = +0x26: dword: Є®®а¤Ё­ в  ®Є­  Ї®в®Є  Ї® ®бЁ y - * +42 = +0x2A: dword: а §¬Ґа ®Є­  Ї®в®Є  Ї® ®бЁ x - * +46 = +0x2E: dword: а §¬Ґа ®Є­  Ї®в®Є  Ї® ®бЁ y - * +50 = +0x32: word: б®бв®п­ЁҐ б«®в  Ї®в®Є : - * 0 = Ї®в®Є ўлЇ®«­пҐвбп - * 1 = Ї®в®Є ЇаЁ®бв ­®ў«Ґ­ - * 2 = Ї®в®Є ЇаЁ®бв ­®ў«Ґ­ ў ¬®¬Ґ­в ®¦Ё¤ ­Ёп б®ЎлвЁп - * 3 = Ї®в®Є § ўҐаи Ґвбп ў १г«мв вҐ ўл§®ў  дг­ЄжЁЁ -1 Ё«Ё - ­ бЁ«мб⢥­­® Є Є б«Ґ¤бвўЁҐ ўл§®ў  Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 18 - Ё«Ё § ўҐа襭Ёп а Ў®вл бЁб⥬л - * 4 = Ї®в®Є § ўҐаи Ґвбп ў १г«мв вҐ ЁбЄ«о祭Ёп - * 5 = Ї®в®Є ®¦Ё¤ Ґв б®ЎлвЁп - * 9 = § Їа®иҐ­­л© б«®в бў®Ў®¤Ґ­, ўбп ®бв «м­ п Ё­д®а¬ жЁп ® - ᫮⥠­Ґ Ё¬ҐҐв б¬лб«  - * +52 = +0x34: word: § аҐ§ҐаўЁа®ў ­®, нв® б«®ў® ­Ґ Ё§¬Ґ­пҐвбп - * +54 = +0x36: dword: Є®®а¤Ё­ в  ­ з «  Є«ЁҐ­вбЄ®© ®Ў« бвЁ - Ї® ®бЁ x - * +58 = +0x3A: dword: Є®®а¤Ё­ в  ­ з «  Є«ЁҐ­вбЄ®© ®Ў« бвЁ - Ї® ®бЁ y - * +62 = +0x3E: dword: иЁаЁ­  Є«ЁҐ­вбЄ®© ®Ў« бвЁ - * +66 = +0x42: dword: ўлб®в  Є«ЁҐ­вбЄ®© ®Ў« бвЁ - * +70 = +0x46: byte: б®бв®п­ЁҐ ®Є­  - ЎЁв®ў®Ґ Ї®«Ґ - * ЎЁв 0 (¬ бЄ  1): ®Є­® ¬ ЄбЁ¬Ё§Ёа®ў ­® - * ЎЁв 1 (¬ бЄ  2): ®Є­® ¬Ё­Ё¬Ё§Ёа®ў ­® ў Ї ­Ґ«м § ¤ з - * ЎЁв 2 (¬ бЄ  4): ®Є­® бўса­гв® ў § Ј®«®ў®Є -‡ ¬Ґз ­Ёп: - * ‘«®вл ­г¬Ґаговбп б 1. - * ‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ ­Ґ Ґбвм ®ЎйҐҐ зЁб«® Ї®в®Є®ў, Ї®бЄ®«мЄг - Ўлў ов бў®Ў®¤­лҐ б«®вл. - * ЏаЁ ᮧ¤ ­ЁЁ Їа®жҐбб   ўв®¬ вЁзҐбЄЁ ᮧ¤ Ґвбп Ї®в®Є ўлЇ®«­Ґ­Ёп. - * ”г­ЄжЁп ўл¤ Ґв Ё­д®а¬ жЁо ® Ї®в®ЄҐ. Љ ¦¤л© Їа®жҐбб Ё¬ҐҐв - е®вп Ўл ®¤Ё­ Ї®в®Є. Ћ¤Ё­ Їа®жҐбб ¬®¦Ґв ᮧ¤ вм ­ҐбЄ®«мЄ® Ї®в®Є®ў, - ў н⮬ б«гз Ґ Є ¦¤л© Ї®в®Є Ї®«гз Ґв бў®© б«®в, ЇаЁзҐ¬ Ї®«п - +10, +22, +26 ў нвЁе б«®в е б®ўЇ ¤ ов. - „«п ЇаЁ«®¦Ґ­Ё© ­Ґ бгйҐбвўгҐв ®ЎйҐЈ® бЇ®б®Ў  ®ЇаҐ¤Ґ«Ёвм, - ЇаЁ­ ¤«Ґ¦ в «Ё ¤ў  Ї®в®Є  ®¤­®¬г Їа®жҐббг. - * ЂЄвЁў­®Ґ ®Є­® - ®Є­®, ­ е®¤п饥бп ­  ўҐаиЁ­Ґ ®Є®­­®Ј® бвнЄ , - ®­® Ї®«гз Ґв б®®ЎйҐ­Ёп ® ўў®¤Ґ б Є« ўЁ вгал. „«п ­ҐЈ® Ї®§ЁжЁп ў - ®Є®­­®¬ бвнЄҐ б®ўЇ ¤ Ґв б ў®§ўа й Ґ¬л¬ §­ зҐ­ЁҐ¬. - * ‘«®в 1 ᮮ⢥вбвўгҐв бЇҐжЁ «м­®¬г Ї®в®Єг ®ЇҐа жЁ®­­®© бЁб⥬л, - ¤«п Є®в®а®Ј®: - * ®Є­® ­ е®¤Ёвбп ў­Ё§г ®Є®­­®Ј® бвнЄ , Ї®«п +4 Ё +6 ᮤҐа¦ в - §­ зҐ­ЁҐ 1 - * Ё¬п Їа®жҐбб  - "OS/IDLE" (¤®Ї®«­Ґ­­®Ґ Їа®ЎҐ« ¬Ё) - *  ¤аҐб Їа®жҐбб  ў Ї ¬пвЁ а ўҐ­ 0, а §¬Ґа ЁбЇ®«м§гҐ¬®© Ї ¬пвЁ - 16 Mb (0x1000000) - * PID=1 - * Є®®а¤Ё­ вл Ё а §¬Ґал ®Є­ , а ў­® Є Є Ё Є«ЁҐ­вбЄ®© ®Ў« бвЁ, - гб«®ў­® Ї®« Ј овбп а ў­л¬Ё 0 - * б®бв®п­ЁҐ б«®в  - ўбҐЈ¤  0 (ўлЇ®«­пҐвбп) - * ўаҐ¬п ўлЇ®«­Ґ­Ёп бЄ« ¤лў Ґвбп Ё§ ўаҐ¬Ґ­Ё, г室п饣® ­  - б®Ўб⢥­­® а Ў®вг, Ё ўаҐ¬Ґ­Ё Їа®бв®п ў ®¦Ё¤ ­ЁЁ ЇаҐалў ­Ёп - (Є®в®а®Ґ ¬®¦­® Ї®«гзЁвм ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 4 дг­ЄжЁЁ 18). - * Ќ зЁ­ п б® б«®в  2, а §¬Ґй овбп ®Ўлз­лҐ ЇаЁ«®¦Ґ­Ёп. - * ЋЎлз­лҐ ЇаЁ«®¦Ґ­Ёп а §¬Ґй овбп ў Ї ¬пвЁ Ї®  ¤аҐбг 0x60400000 - (Є®­бв ­в  п¤а  std_application_base_address). - Ќ «®¦Ґ­Ёп ­Ґ Їа®Ёб室Ёв, Ї®бЄ®«мЄг г Є ¦¤®Ј® Їа®жҐбб  бў®п - в Ў«Ёж  бва ­Ёж. - * ЏаЁ ᮧ¤ ­ЁЁ Ї®в®Є  Ґ¬г ­ §­ з овбп б«®в ў бЁб⥬­®© в Ў«ЁжҐ Ё - Ё¤Ґ­вЁдЁЄ в®а (Process/Thread IDentifier = PID/TID), Є®в®алҐ ¤«п - § ¤ ­­®Ј® Ї®в®Є  ­Ґ Ё§¬Ґ­повбп б® ўаҐ¬Ґ­Ґ¬. - Џ®б«Ґ § ўҐа襭Ёп Ї®в®Є  ҐЈ® б«®в ¬®¦Ґв Ўлвм § ­®ў® ЁбЇ®«м§®ў ­ - ¤«п ¤агЈ®Ј® Ї®в®Є . €¤Ґ­вЁдЁЄ в®а Ї®в®Є  ­Ґ ¬®¦Ґв Ўлвм ­ §­ зҐ­ - ¤агЈ®¬г Ї®в®Єг ¤ ¦Ґ Ї®б«Ґ § ўҐа襭Ёп ЇҐаў®Ј®. - Ќ §­ з Ґ¬лҐ ­®ўл¬ Ї®в®Є ¬ Ё¤Ґ­вЁдЁЄ в®ал ¬®­®в®­­® а бвгв. - * …б«Ё Ї®в®Є ҐйҐ ­Ґ ®ЇаҐ¤Ґ«Ё« бў®Ґ ®Є­® ўл§®ў®¬ дг­ЄжЁЁ 0, в® - Ї®«®¦Ґ­ЁҐ Ё а §¬Ґал нв®Ј® ®Є­  Ї®« Ј овбп ­г«п¬Ё. - * Љ®®а¤Ё­ вл Є«ЁҐ­вбЄ®© ®Ў« бвЁ ®Є­  ЎҐагвбп ®в­®бЁвҐ«м­® ®Є­ . - * ‚ ¤ ­­л© ¬®¬Ґ­в ЁбЇ®«м§гҐвбп в®«мЄ® з бвм ЎгдҐа  а §¬Ґа®¬ - 71 = 0x47 Ў ©в . ’Ґ¬ ­Ґ ¬Ґ­ҐҐ ४®¬Ґ­¤гҐвбп ЁбЇ®«м§®ў вм ЎгдҐа - а §¬Ґа®¬ 1 ЉЎ ¤«п Ўг¤г饩 б®ў¬ҐбвЁ¬®бвЁ, ў Ўг¤г饬 ¬®Јгв Ўлвм - ¤®Ў ў«Ґ­л ­ҐЄ®в®алҐ Ї®«п. - -====================================================================== -==================== ”г­ЄжЁп 10 - ®¦Ё¤ вм б®ЎлвЁп. =================== -====================================================================== -…б«Ё ®зҐаҐ¤м б®®ЎйҐ­Ё© Їгбв , в® ¦¤Ґв Ї®пў«Ґ­Ёп б®®ЎйҐ­Ёп ў ®зҐаҐ¤Ё. -‚ в Є®¬ б®бв®п­ЁЁ Ї®в®Є ­Ґ Ї®«гз Ґв Їа®жҐбб®а­®Ј® ўаҐ¬Ґ­Ё. -‡ вҐ¬ бзЁвлў Ґв б®®ЎйҐ­ЁҐ Ё§ ®зҐаҐ¤Ё. - -Џ а ¬Ґвал: - * eax = 10 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = б®ЎлвЁҐ (ᬮваЁ бЇЁб®Є б®ЎлвЁ©) -‡ ¬Ґз ­Ёп: - * “зЁвлў овбп в®«мЄ® ⥠ᮡлвЁп, Є®в®алҐ ўе®¤пв ў ¬ бЄг, - гбв ­ ў«Ёў Ґ¬го дг­ЄжЁҐ© 40. Џ® 㬮«з ­Ёо нв® б®ЎлвЁп - ЇҐаҐаЁб®ўЄЁ, ­ ¦ вЁп ­  Є« ўЁиЁ Ё ­  Є­®ЇЄЁ. - * „«п Їа®ўҐаЄЁ, Ґбвм «Ё б®®ЎйҐ­ЁҐ ў ®зҐаҐ¤Ё, ЁбЇ®«м§г©вҐ дг­ЄжЁо 11. - —в®Ўл ¦¤ вм ­Ґ Ў®«ҐҐ ®ЇаҐ¤Ґ«Ґ­­®Ј® ўаҐ¬Ґ­Ё, ЁбЇ®«м§г©вҐ - дг­ЄжЁо 23. - -====================================================================== -======= ”г­ЄжЁп 11 - Їа®ўҐаЁвм, Ґбвм «Ё б®ЎлвЁҐ, ЎҐ§ ®¦Ё¤ ­Ёп. ======= -====================================================================== -…б«Ё ў ®зҐаҐ¤Ё б®®ЎйҐ­Ё© Ґбвм Є Є®Ґ-в® б®ЎлвЁҐ, в® бзЁвлў Ґв Ё -ў®§ўа й Ґв ҐЈ®. …б«Ё ®зҐаҐ¤м Їгбв , ў®§ўа й Ґв ­г«м. -Џ а ¬Ґвал: - * eax = 11 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ®зҐаҐ¤м б®®ЎйҐ­Ё© Їгбв  - * Ё­ зҐ eax = б®ЎлвЁҐ (ᬮваЁ бЇЁб®Є б®ЎлвЁ©) -‡ ¬Ґз ­Ёп: - * “зЁвлў овбп в®«мЄ® ⥠ᮡлвЁп, Є®в®алҐ ўе®¤пв ў ¬ бЄг, - гбв ­ ў«Ёў Ґ¬го дг­ЄжЁҐ© 40. Џ® 㬮«з ­Ёо нв® б®ЎлвЁп - ЇҐаҐаЁб®ўЄЁ, ­ ¦ вЁп ­  Є« ўЁиЁ Ё ­  Є­®ЇЄЁ. - * „«п ®¦Ё¤ ­Ёп Ї®пў«Ґ­Ёп б®ЎлвЁп ў ®зҐаҐ¤Ё, ЁбЇ®«м§г©вҐ дг­ЄжЁо 10. - —в®Ўл ¦¤ вм ­Ґ Ў®«ҐҐ ®ЇаҐ¤Ґ«Ґ­­®Ј® ўаҐ¬Ґ­Ё, ЁбЇ®«м§г©вҐ - дг­ЄжЁо 23. - -====================================================================== -=========== ”г­ЄжЁп 12 - ­ з вм/§ Є®­зЁвм ЇҐаҐаЁб®ўЄг ®Є­ . ========== -====================================================================== - --------------- Џ®¤дг­ЄжЁп 1 - ­ з вм ЇҐаҐаЁб®ўЄг ®Є­ . --------------- -Џ а ¬Ґвал: - * eax = 12 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -------------- Џ®¤дг­ЄжЁп 2 - § Є®­зЁвм ЇҐаҐаЁб®ўЄг ®Є­ . ------------- -Џ а ¬Ґвал: - * eax = 12 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп ­ з «  ЇҐаҐаЁб®ўЄЁ г¤ «пҐв ўбҐ ®ЇаҐ¤Ґ«с­­лҐ - дг­ЄжЁҐ© 8 Є­®ЇЄЁ, Ёе б«Ґ¤гҐв ®ЇаҐ¤Ґ«Ёвм Ї®ўв®а­®. - -====================================================================== -============ ”г­ЄжЁп 13 - ­ аЁб®ў вм Їаאַ㣮«м­ЁЄ ў ®Є­Ґ. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 13 - ­®¬Ґа дг­ЄжЁЁ - * ebx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [а §¬Ґа Ї® ®бЁ x] - * ecx = [Є®®а¤Ё­ в  Ї® ®бЁ y]*65536 + [а §¬Ґа Ї® ®бЁ y] - * edx = 梥в 0xRRGGBB Ё«Ё 0x80RRGGBB ¤«п Ја ¤ЁҐ­в­®© § «ЁўЄЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џ®¤ Є®®а¤Ё­ в ¬Ё Ї®­Ё¬ овбп Є®®а¤Ё­ вл «Ґў®Ј® ўҐае­ҐЈ® гЈ«  - Їаאַ㣮«м­ЁЄ  ®в­®бЁвҐ«м­® ®Є­ . - -====================================================================== -================ ”г­ЄжЁп 14 - Ї®«гзЁвм а §¬Ґал нЄа ­ . =============== -====================================================================== -Џ а ¬Ґвал: - * eax = 14 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = [xsize]*65536 + [ysize], Ј¤Ґ - * xsize = x-Є®®а¤Ё­ в  Їа ў®Ј® ­Ё¦­ҐЈ® гЈ«  нЄа ­  = - а §¬Ґа Ї® Ј®аЁ§®­в «Ё - 1 - * ysize = y-Є®®а¤Ё­ в  Їа ў®Ј® ­Ё¦­ҐЈ® гЈ«  нЄа ­  = - а §¬Ґа Ї® ўҐавЁЄ «Ё - 1 -‡ ¬Ґз ­Ёп: - * ‘¬®ваЁ в Є¦Ґ Ї®¤дг­ЄжЁо 5 дг­ЄжЁЁ 48 - Ї®«гзЁвм а §¬Ґал а Ў®зҐ© - ®Ў« бвЁ нЄа ­ . - -====================================================================== -= ”г­ЄжЁп 15, Ї®¤дг­ЄжЁп 1 - гбв ­®ўЁвм а §¬Ґа д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп. = -====================================================================== -Џ а ¬Ґвал: - * eax = 15 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = иЁаЁ­  Ё§®Ўа ¦Ґ­Ёп - * edx = ўлб®в  Ё§®Ўа ¦Ґ­Ёп -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ‚맮ў дг­ЄжЁЁ ®Ўп§ вҐ«Ґ­ ЇҐаҐ¤ ўл§®ў®¬ Ї®¤дг­ЄжЁ© 2 Ё 5. - * „«п ®Ў­®ў«Ґ­Ёп нЄа ­  (Ї®б«Ґ § ўҐа襭Ёп бҐаЁЁ Є®¬ ­¤, а Ў®в ойЁе б - д®­®¬) ўл§лў ©вҐ Ї®¤дг­ЄжЁо 3 ЇҐаҐаЁб®ўЄЁ д®­ . - * …бвм Ї а­ п дг­ЄжЁп Ї®«г祭Ёп а §¬Ґа®ў д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп - - Ї®¤дг­ЄжЁп 1 дг­ЄжЁЁ 39. - -====================================================================== -= ”г­ЄжЁп 15, Ї®¤дг­ЄжЁп 2 - Ї®бв ўЁвм в®зЄг ­  д®­®ў®¬ Ё§®Ўа ¦Ґ­ЁЁ. = -====================================================================== -Џ а ¬Ґвал: - * eax = 15 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ᬥ饭ЁҐ - * edx = 梥в в®зЄЁ 0xRRGGBB -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ‘¬ҐйҐ­ЁҐ ¤«п в®зЄЁ б Є®®а¤Ё­ в ¬Ё (x,y) ўлзЁб«пҐвбп Є Є - (x+y*xsize)*3. - * …б«Ё гЄ § ­­®Ґ ᬥ饭ЁҐ ЇаҐўли Ґв гбв ­®ў«Ґ­­л© Ї®¤дг­ЄжЁҐ© 1 - а §¬Ґа, ўл§®ў ЁЈ­®аЁагҐвбп. - * „«п ®Ў­®ў«Ґ­Ёп нЄа ­  (Ї®б«Ґ § ўҐа襭Ёп бҐаЁЁ Є®¬ ­¤, а Ў®в ойЁе б - д®­®¬) ўл§лў ©вҐ Ї®¤дг­ЄжЁо 3 ЇҐаҐаЁб®ўЄЁ д®­ . - * …бвм Ї а­ п дг­ЄжЁп Ї®«г祭Ёп в®зЄЁ б д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп - - Ї®¤дг­ЄжЁп 2 дг­ЄжЁЁ 39. - -====================================================================== -============ ”г­ЄжЁп 15, Ї®¤дг­ЄжЁп 3 - ЇҐаҐаЁб®ў вм д®­. ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 15 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -====================================================================== -===== ”г­ЄжЁп 15, Ї®¤дг­ЄжЁп 4 - гбв ­®ўЁвм ०Ё¬ ®ваЁб®ўЄЁ д®­ . ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 15 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ०Ё¬ ®ваЁб®ўЄЁ: - * 1 = § ¬®бвЁвм - * 2 = а бвп­гвм -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * „«п ®Ў­®ў«Ґ­Ёп нЄа ­  (Ї®б«Ґ § ўҐа襭Ёп бҐаЁЁ Є®¬ ­¤, а Ў®в ойЁе б - д®­®¬) ўл§лў ©вҐ Ї®¤дг­ЄжЁо 3 ЇҐаҐаЁб®ўЄЁ д®­ . - * …бвм Ї а­ п Є®¬ ­¤  Ї®«г祭Ёп ०Ё¬  ®ваЁб®ўЄЁ д®­  - - Ї®¤дг­ЄжЁп 4 дг­ЄжЁЁ 39. - -====================================================================== -===== ”г­ЄжЁп 15, Ї®¤дг­ЄжЁп 5 - Ї®¬ҐбвЁвм Ў«®Є ЇЁЄбҐ«Ґ© ­  д®­. ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 15 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ¤ ­­лҐ ў д®а¬ вҐ BBGGRRBBGGRR... - * edx = ᬥ饭ЁҐ ў ¤ ­­ле д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп - * esi = а §¬Ґа ¤ ­­ле ў Ў ©в е = 3 * зЁб«® ЇЁЄбҐ«Ґ© -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џа®ўҐаЄЁ Є®а४⭮б⨠ᬥ饭Ёп Ё а §¬Ґа  ­Ґ Їа®Ё§ў®¤Ёвбп. - * –ўҐв Є ¦¤®Ј® ЇЁЄбҐ«п еа ­Ёвбп Є Є 3-Ў ©в­ п ўҐ«ЁзЁ­  BBGGRR. - * ЏЁЄбҐ«Ё д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп § ЇЁблў овбп Ї®б«Ґ¤®ў вҐ«м­® - б«Ґў  ­ Їа ў®, ᢥаег ў­Ё§. - * ‘¬ҐйҐ­ЁҐ ЇЁЄбҐ«п б Є®®а¤Ё­ в ¬Ё (x,y) Ґбвм (x+y*xsize)*3. - * „«п ®Ў­®ў«Ґ­Ёп нЄа ­  (Ї®б«Ґ § ўҐа襭Ёп бҐаЁЁ Є®¬ ­¤, а Ў®в ойЁе б - д®­®¬) ўл§лў ©вҐ Ї®¤дг­ЄжЁо 3 ЇҐаҐаЁб®ўЄЁ д®­ . - -====================================================================== -====================== ”г­ЄжЁп 15, Ї®¤дг­ЄжЁп 6 ====================== -==== ‘Їа®ҐжЁа®ў вм ¤ ­­лҐ д®­  ­   ¤аҐб­®Ґ Їа®бва ­бвў® Їа®жҐбб . ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 15 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = гЄ § вҐ«м ­  ¤ ­­лҐ д®­ , 0 ЇаЁ ®иЁЎЄҐ -‡ ¬Ґз ­Ёп: - * ‘Їа®ҐжЁа®ў ­­лҐ ¤ ­­лҐ ¤®бвгЇ­л ­  з⥭ЁҐ Ё § ЇЁбм. - * ђ §¬Ґа ¤ ­­ле д®­  а ўҐ­ 3*xsize*ysize. €§¬Ґ­Ґ­ЁҐ а §¬Ґа®ў д®­  - Ў«®ЄЁагҐвбп ­  ўаҐ¬п а Ў®вл б бЇа®ҐжЁа®ў ­­л¬Ё ¤ ­­л¬Ё. - * –ўҐв Є ¦¤®Ј® ЇЁЄбҐ«п еа ­Ёвбп Є Є 3-Ў ©в®ў п ўҐ«ЁзЁ­  BBGGRR. - * ЏЁЄбҐ«Ё д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп § ЇЁблў овбп Ї®б«Ґ¤®ў вҐ«м­® - б«Ґў  ­ Їа ў®, ᢥаег ў­Ё§. - -====================================================================== -====================== ”г­ЄжЁп 15, Ї®¤дг­ЄжЁп 7 ====================== -=== ‡ Єалвм Їа®ҐЄжЁо ¤ ­­ле д®­  ­   ¤аҐб­®Ґ Їа®бва ­бвў® Їа®жҐбб . == -====================================================================== -Џ а ¬Ґвал: - * eax = 15 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 7 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ¤ ­­лҐ д®­  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 1 ЇаЁ гбЇҐеҐ, 0 ЇаЁ ®иЁЎЄҐ - -====================================================================== -============= ”г­ЄжЁп 16 - б®еа ­Ёвм а ¬¤ЁбЄ ­  ¤ЁбЄҐвг. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 16 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 Ё«Ё ebx = 2 - ­  Є Єго ¤ЁбЄҐвг б®еа ­пвм -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ®иЁЎЄ  - -====================================================================== -============== ”г­ЄжЁп 17 - Ї®«гзЁвм Є®¤ ­ ¦ в®© Є­®ЇЄЁ. ============= -====================================================================== -‡ ЎЁа Ґв Є®¤ ­ ¦ в®© Є­®ЇЄЁ Ё§ ЎгдҐа . -Џ а ¬Ґвал: - * eax = 17 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё ЎгдҐа Їгбв, ў®§ўа й Ґвбп eax=1 - * Ґб«Ё ЎгдҐа ­ҐЇгбв: - * бв аиЁҐ 24 ЎЁв  eax ᮤҐа¦ в Ё¤Ґ­вЁдЁЄ в®а Є­®ЇЄЁ - (ў з бв­®бвЁ, ў ah ®Є §лў Ґвбп ¬« ¤иЁ© Ў ©в Ё¤Ґ­вЁдЁЄ в®а ; - Ґб«Ё ўбҐ Є­®ЇЄЁ Ё¬Ґов Ё¤Ґ­вЁдЁЄ в®а, ¬Ґ­миЁ© 256, - в® ¤«п а §«ЁзҐ­Ёп ¤®бв в®з­® ah) - * al = 0 - Є­®ЇЄ  Ўл«  ­ ¦ в  «Ґў®© Є­®ЇЄ®© ¬лиЁ - * al = ЎЁв, ᮮ⢥вбвўгойЁ© ­ ¦ ўиҐ© Є­®ЇЄҐ ¬лиЁ, Ґб«Ё ­Ґ «Ґў®© -‡ ¬Ґз ­Ёп: - * "ЃгдҐа" еа ­Ёв в®«мЄ® ®¤­г Є­®ЇЄг, ЇаЁ ­ ¦ вЁЁ ­®ў®© Є­®ЇЄЁ - Ё­д®а¬ жЁп ® бв а®© вҐапҐвбп. - * ЏаЁ ўл§®ўҐ нв®© дг­ЄжЁЁ ЇаЁ«®¦Ґ­ЁҐ¬ б ­Ґ ЄвЁў­л¬ ®Є­®¬ - ў®§ўа й Ґвбп ®вўҐв "ЎгдҐа Їгбв". - * ‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ al ᮮ⢥вбвўгҐв б®бв®п­Ёо Є­®Ї®Є ¬лиЁ - ў д®а¬ вҐ Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 37 ў ¬®¬Ґ­в ­ з «  ­ ¦ вЁп - ­  Є­®ЇЄг, §  ЁбЄ«о祭ЁҐ¬ ¬« ¤иҐЈ® ЎЁв  (ᮮ⢥вбвўго饣® «Ґў®© - Є­®ЇЄҐ ¬лиЁ), Є®в®ал© бЎа блў Ґвбп. - -====================================================================== -==== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 2 - § ўҐаиЁвм Їа®жҐбб/Ї®в®Є Ї® б«®вг. ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ­®¬Ґа б«®в  Їа®жҐбб /Ї®в®Є  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ЌҐ«м§п § ўҐаиЁвм Ї®в®Є ®ЇҐа жЁ®­­®© бЁб⥬л OS/IDLE (­®¬Ґа б«®в  - 1), ¬®¦­® § ўҐаиЁвм «оЎ®© ®Ўлз­л© Ї®в®Є/Їа®жҐбб. - * ‘¬®ваЁ в Є¦Ґ Ї®¤дг­ЄжЁо 18 - § ўҐа襭ЁҐ - Їа®жҐбб /Ї®в®Є  б § ¤ ­­л¬ Ё¤Ґ­вЁдЁЄ в®а®¬. - -====================================================================== -= ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 3 - ᤥ« вм  ЄвЁў­л¬ ®Є­® § ¤ ­­®Ј® Ї®в®Є . = -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ­®¬Ґа б«®в  Ї®в®Є  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ЏаЁ гЄ § ­ЁЁ Є®а४⭮Ј®, ­® ­ҐбгйҐбвўго饣® б«®в   ЄвЁўЁ§ЁагҐвбп - Є Є®Ґ-в® ®Є­®. - * “§­ вм, Є Є®Ґ ®Є­® пў«пҐвбп  ЄвЁў­л¬, ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 7. - -====================================================================== - ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 4 - Ї®«гзЁвм бзсвзЁЄ Їгбвле в Єв®ў ў ᥪ㭤г. -====================================================================== -Џ®¤ Їгбвл¬Ё в Єв ¬Ё Ї®­Ё¬ Ґвбп ўаҐ¬п, ў Є®в®а®Ґ Їа®жҐбб®а Їа®бв Ёў Ґв -ў ®¦Ё¤ ­ЁЁ ЇаҐалў ­Ёп (ў Ё­бвагЄжЁЁ hlt). - -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = §­ зҐ­ЁҐ бзсвзЁЄ  Їгбвле в Єв®ў ў ᥪ㭤г - -====================================================================== -======== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 5 - Ї®«гзЁвм в Єв®ўго з бв®вг. ======= -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = в Єв®ў п з бв®в  (Ї® ¬®¤г«о 2^32 в Єв®ў = 4ѓѓж) - -====================================================================== - ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 6 - б®еа ­Ёвм а ¬¤ЁбЄ ў д ©« ­  ¦сбвЄ®¬ ¤ЁбЄҐ. -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  бва®Єг б Ї®«­л¬ Ё¬Ґ­Ґ¬ д ©«  - (­ ЇаЁ¬Ґа, "/hd0/1/kolibri/kolibri.img") -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * Ё­ зҐ eax = Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л -‡ ¬Ґз ­Ёп: - * ‚ᥠЇ ЇЄЁ ў гЄ § ­­®¬ ЇгвЁ ¤®«¦­л бгйҐбвў®ў вм, Ё­ зҐ ўҐа­свбп - §­ зҐ­ЁҐ 5, "д ©« ­Ґ ­ ©¤Ґ­". - -====================================================================== -====== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 7 - Ї®«гзЁвм ­®¬Ґа  ЄвЁў­®Ј® ®Є­ . ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 7 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ­®¬Ґа  ЄвЁў­®Ј® ®Є­  (­®¬Ґа б«®в  Ї®в®Є , ®Є­® Є®в®а®Ј® -  ЄвЁў­®) -‡ ¬Ґз ­Ёп: - * ЂЄвЁў­®Ґ ®Є­® ­ е®¤Ёвбп ўўҐаег ®Є®­­®Ј® бвнЄ  Ё Ї®«гз Ґв - б®®ЎйҐ­Ёп ®Ў® ўбс¬ ўў®¤Ґ б Є« ўЁ вгал. - * ‘¤Ґ« вм ®Є­®  ЄвЁў­л¬ ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 3. - -====================================================================== -==== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 8 - ®вЄ«озЁвм/а §аҐиЁвм §ўгЄ бЇЁЄҐа . ==== -====================================================================== -ЏаЁ ®вЄ«озс­­®¬ §ўгЄҐ ўл§®ўл Ї®¤дг­ЄжЁЁ 55 дг­ЄжЁЁ 55 ЁЈ­®аЁаговбп. -ЏаЁ ўЄ«озс­­®¬ - ­ Їа ў«повбп ­  ўбв஥­­л© бЇЁЄҐа. - ---------------- Џ®¤Ї®¤дг­ЄжЁп 1 - Ї®«гзЁвм б®бв®п­ЁҐ. ---------------- -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 1 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - §ўгЄ бЇЁЄҐа  а §аҐис­; 1 - § ЇаҐйс­ - --------------- Џ®¤Ї®¤дг­ЄжЁп 2 - ЇҐаҐЄ«озЁвм б®бв®п­ЁҐ. -------------- -ЏҐаҐЄ«оз Ґв б®бв®п­Ёп а §аҐиҐ­Ёп/§ ЇаҐйҐ­Ёп. -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 2 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -====================================================================== -= ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 9 - § ўҐа襭ЁҐ а Ў®вл бЁб⥬л б Ї а ¬Ґв஬. = -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 9 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ї а ¬Ґва: - * 2 = ўлЄ«озЁвм Є®¬ЇмовҐа - * 3 = ЇҐаҐ§ Јаг§Ёвм Є®¬ЇмовҐа - * 4 = ЇҐаҐ§ ЇгбвЁвм п¤а® Ё§ д ©«  kernel.mnt ­  а ¬¤ЁбЄҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ЇаЁ ­ҐўҐа­®¬ ecx ॣЁбвал ­Ґ ¬Ґ­повбп (в.Ґ. eax=18) - * ЇаЁ Їа ўЁ«м­®¬ ўл§®ўҐ ўбҐЈ¤  ў®§ўа й Ґвбп ЇаЁ§­ Є гбЇҐе  eax=0 -‡ ¬Ґз ­Ёп: - * ЌҐ б«Ґ¤гҐв Ї®« Ј вмбп ­  ў®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ ЇаЁ ­ҐўҐа­®¬ - ўл§®ўҐ, ®­® ¬®¦Ґв Ё§¬Ґ­Ёвмбп ў Ї®б«Ґ¤гойЁе ўҐабЁпе п¤а . - -====================================================================== -======== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 10 - ᢥа­гвм ®Є­® ЇаЁ«®¦Ґ­Ёп. ======= -====================================================================== -‘ў®а зЁў Ґв б®Ўб⢥­­®Ґ ®Є­®. -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 10 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ЊЁ­Ё¬Ё§Ёа®ў ­­®Ґ ®Є­® б в®зЄЁ §аҐ­Ёп дг­ЄжЁЁ 9 б®еа ­пҐв Ї®«®¦Ґ­ЁҐ - Ё а §¬Ґал. - * ‚®ббв ­®ў«Ґ­ЁҐ ®Є­  ЇаЁ«®¦Ґ­Ёп Їа®Ёб室Ёв ЇаЁ  ЄвЁўЁ§Ёа®ў ­ЁЁ - Ї®¤дг­ЄжЁҐ© 3. - * ЋЎлз­® ­Ґв ­Ґ®Ўе®¤Ё¬®бвЁ пў­® бў®а зЁў вм/а §ў®а зЁў вм бў®с ®Є­®: - бў®а зЁў ­ЁҐ ®Є­  ®бгйҐбвў«пҐвбп бЁб⥬®© ЇаЁ ­ ¦ вЁЁ ­  Є­®ЇЄг - ¬Ё­Ё¬Ё§ жЁЁ (Є®в®а п ¤«п ®Є®­ б® бЄЁ­®¬ ®ЇаҐ¤Ґ«пҐвбп  ўв®¬ вЁзҐбЄЁ - дг­ЄжЁҐ© 0, ¤«п ®Є®­ ЎҐ§ бЄЁ­  Ґс ¬®¦­® ®ЇаҐ¤Ґ«Ёвм дг­ЄжЁҐ© 8), - ў®ббв ­®ў«Ґ­ЁҐ - ЇаЁ«®¦Ґ­ЁҐ¬ @panel. - -====================================================================== -====================== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 11 ===================== -============= Џ®«гзЁвм Ё­д®а¬ жЁо ® ¤ЁбЄ®ў®© Ї®¤бЁб⥬Ґ. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 11 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = вЁЇ в Ў«Ёжл: - * 1 = Є®а®вЄ п ўҐабЁп, 10 Ў ©в - * 2 = Ї®«­ п ўҐабЁп, 65536 Ў ©в - * edx = гЄ § вҐ«м ­  ЎгдҐа (ў ЇаЁ«®¦Ґ­ЁЁ) ¤«п в Ў«Ёжл -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -”®а¬ в в Ў«Ёжл: Є®а®вЄ п ўҐабЁп: - * +0: byte: Ё­д®а¬ жЁп ® ЌѓЊ„ (¤ЁбЄ®ў®¤ е ¤«п ¤ЁбЄҐв), AAAABBBB, - Ј¤Ґ AAAA § ¤ св вЁЇ ЇҐаў®Ј® ¤ЁбЄ®ў®¤ , BBBB - ўв®а®Ј® б®Ј« б­® - б«Ґ¤го饬г бЇЁбЄг: - * 0 = ­Ґв ¤ЁбЄ®ў®¤  - * 1 = 360Kb, 5.25'' - * 2 = 1.2Mb, 5.25'' - * 3 = 720Kb, 3.5'' - * 4 = 1.44Mb, 3.5'' - * 5 = 2.88Mb, 3.5'' (в ЄЁҐ ¤ЁбЄҐвл ᥩз б 㦥 ­Ґ ЁбЇ®«м§говбп) - Ќ ЇаЁ¬Ґа, ¤«п бв ­¤ ав­®© Є®­дЁЈга жЁЁ Ё§ ®¤­®Ј® 1.44-¤ЁбЄ®ў®¤  - §¤Ґбм Ўг¤Ґв 40h,   ¤«п б«гз п 1.2Mb ­  A: Ё 1.44Mb ­  B: - §­ зҐ­ЁҐ ®Є §лў Ґвбп 24h. - * +1: byte: Ё­д®а¬ жЁп ® ¦сбвЄЁе ¤ЁбЄ е Ё CD-ЇаЁў®¤ е, AABBCCDD, - Ј¤Ґ AA ᮮ⢥вбвўгҐв Є®­ва®««Ґаг IDE0, ..., DD - IDE3: - * 0 = гбва®©бвў® ®вбгвбвўгҐв - * 1 = ¦сбвЄЁ© ¤ЁбЄ - * 2 = CD-ЇаЁў®¤ - Ќ ЇаЁ¬Ґа, ў б«гз Ґ HD ­  IDE0 Ё CD ­  IDE2 §¤Ґбм Ўг¤Ґв 48h. - * +2: 4 db: зЁб«® ­ ©¤Ґ­­ле а §¤Ґ«®ў ­  ¦сбвЄЁе ¤ЁбЄ е б - ᮮ⢥вб⢥­­® IDE0,...,IDE3. - ЏаЁ ®вбгвбвўЁЁ ¦сбвЄ®Ј® ¤ЁбЄ  ­  IDEx ᮮ⢥вбвўгойЁ© Ў ©в - ­г«Ґў®©, ЇаЁ ­ «ЁзЁЁ Ї®Є §лў Ґв зЁб«® а бЇ®§­ ­­ле а §¤Ґ«®ў, - Є®в®але ¬®¦Ґв Ё ­Ґ Ўлвм (Ґб«Ё ­®бЁвҐ«м ­Ґ ®вд®а¬ вЁа®ў ­ Ё«Ё - Ґб«Ё д ©«®ў п бЁб⥬  ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп). ‚ ⥪г饩 ўҐабЁЁ п¤а  - ¤«п ¦сбвЄЁе ¤ЁбЄ®ў Ї®¤¤Ґа¦Ёў овбп в®«мЄ® FAT16, FAT32 Ё NTFS. - * +6: 4 db: § аҐ§ҐаўЁа®ў ­® -”®а¬ в в Ў«Ёжл: Ї®«­ п ўҐабЁп: - * +0: 10 db: в ЄЁҐ ¦Ґ, Є Є Ё ў Є®а®вЄ®© ўҐабЁЁ - * +10: 100 db: ¤ ­­лҐ ¤«п ЇҐаў®Ј® а §¤Ґ«  - * +110: 100 db: ¤ ­­лҐ ¤«п ўв®а®Ј® а §¤Ґ«  - * ... - * +10+100*(n-1): 100 db: ¤ ­­лҐ ¤«п Ї®б«Ґ¤­ҐЈ® а §¤Ґ«  -ђ §¤Ґ«л а бЇ®«®¦Ґ­л ў б«Ґ¤го饬 Ї®ап¤ЄҐ: б­ з «  Ї®б«Ґ¤®ў вҐ«м­® ўбҐ -а бЇ®§­ ­­лҐ а §¤Ґ«л ­  HD ­  IDE0 (Ґб«Ё Ґбвм), -§ вҐ¬ ­  HD ­  IDE1 (Ґб«Ё Ґбвм) Ё в.¤. ¤® IDE3. -”®а¬ в Ё­д®а¬ жЁЁ ® а §¤Ґ«Ґ: - * +0: dword: ­ з «м­л© дЁ§ЁзҐбЄЁ© ᥪв®а а §¤Ґ«  - * +4: dword: Ї®б«Ґ¤­Ё© дЁ§ЁзҐбЄЁ© ᥪв®а а §¤Ґ«  - (ЇаЁ­ ¤«Ґ¦Ёв а §¤Ґ«г) - * +8: byte: вЁЇ д ©«®ў®© бЁб⥬л: - 16=FAT16, 32=FAT32, 1=NTFS - * д®а¬ в ¤ «м­Ґ©иЁе ¤ ­­ле § ўЁбЁв ®в д ©«®ў®© бЁб⥬л, - ¬®¦Ґв ¬Ґ­пвмбп б Ё§¬Ґ­Ґ­Ёп¬Ё ў п¤аҐ Ё Ї®н⮬㠭Ґ ®ЇЁблў Ґвбп -‡ ¬Ґз ­Ёп: - * Љ®а®вЄ п в Ў«Ёж  ¬®¦Ґв Ўлвм ЁбЇ®«м§®ў ­  ¤«п Ї®«г祭Ёп Ё­д®а¬ жЁЁ - ®Ў Ё¬ҐойЁебп гбва®©бвў е. - -====================================================================== -========== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 13 - Ї®«гзЁвм ўҐабЁо п¤а . ========= -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ЎгдҐа (­Ґ ¬Ґ­ҐҐ 16 Ў ©в), Єг¤  Ўг¤Ґв Ї®¬ҐйҐ­  - Ё­д®а¬ жЁп -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‘вагЄвга  ЎгдҐа : -db a,b,c,d ¤«п ўҐабЁЁ a.b.c.d -db UID_xxx: ®¤­® Ё§ UID_NONE=0, UID_MENUET=1, UID_KOLIBRI=2 -dd REV - ­®¬Ґа svn-ॢЁ§ЁЁ п¤а  -„«п п¤а  Kolibri 0.7.1.0: -db 0,7,1,0 -db 2 -dd 638 - -====================================================================== -====================== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 14 ===================== -======= Ћ¦Ё¤ вм ­ з «  ®Ўа в­®Ј® 室  «гз  а §ўсавЄЁ ¬®­Ёв®а . ======= -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 14 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 Є Є ЇаЁ§­ Є гбЇҐе  -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп ЇаҐ¤­ §­ зҐ­  ЁбЄ«озЁвҐ«м­® ¤«п  ЄвЁў­ле - ўлб®Є®Їа®Ё§ў®¤ЁвҐ«м­ле Ја дЁзҐбЄЁе ЇаЁ«®¦Ґ­Ё©; ЁбЇ®«м§гҐвбп ¤«п - Ї« ў­®Ј® ўлў®¤  Ја дЁЄЁ. - -====================================================================== -== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 15 - Ї®¬ҐбвЁвм Єгаб®а ¬лиЁ ў 業ва нЄа ­ . = -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 15 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 Є Є ЇаЁ§­ Є гбЇҐе  - -====================================================================== -====================== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 16 ===================== -============ Џ®«гзЁвм а §¬Ґа бў®Ў®¤­®© ®ЇҐа вЁў­®© Ї ¬пвЁ. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 16 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = а §¬Ґа бў®Ў®¤­®© Ї ¬пвЁ ў ЄЁ«®Ў ©в е - -====================================================================== -====================== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 17 ===================== -============ Џ®«гзЁвм а §¬Ґа Ё¬Ґо饩бп ®ЇҐа вЁў­®© Ї ¬пвЁ. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 17 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ®ЎйЁ© а §¬Ґа Ё¬Ґо饩бп Ї ¬пвЁ ў ЄЁ«®Ў ©в е - -====================================================================== -====================== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 18 ===================== -============= ‡ ўҐаиЁвм Їа®жҐбб/Ї®в®Є Ї® Ё¤Ґ­вЁдЁЄ в®аг. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 18 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а Їа®жҐбб /Ї®в®Є  (PID/TID) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = -1 - ®иЁЎЄ  (Їа®жҐбб ­Ґ ­ ©¤Ґ­ Ё«Ё пў«пҐвбп бЁб⥬­л¬) -‡ ¬Ґз ­Ёп: - * ЌҐ«м§п § ўҐаиЁвм Ї®в®Є ®ЇҐа жЁ®­­®© бЁб⥬л OS/IDLE (­®¬Ґа б«®в  - 1), ¬®¦­® § ўҐаиЁвм «оЎ®© ®Ўлз­л© Ї®в®Є/Їа®жҐбб. - * ‘¬®ваЁ в Є¦Ґ Ї®¤дг­ЄжЁо 2 - § ўҐа襭ЁҐ - Їа®жҐбб /Ї®в®Є  Ї® § ¤ ­­®¬г б«®вг. - -====================================================================== -=== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 19 - Ї®«гзЁвм/гбв ­®ўЁвм ­ бва®©ЄЁ ¬лиЁ. == -====================================================================== - -------------- Џ®¤Ї®¤дг­ЄжЁп 0 - Ї®«гзЁвм бЄ®а®бвм ¬лиЁ. -------------- -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 19 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 0 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ⥪гй п бЄ®а®бвм ¬лиЁ - ------------- Џ®¤Ї®¤дг­ЄжЁп 1 - гбв ­®ўЁвм бЄ®а®бвм ¬лиЁ. ------------- -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 19 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 1 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ - * edx = ­®ў®Ґ §­ зҐ­ЁҐ бЄ®а®бвЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -------------- Џ®¤Ї®¤дг­ЄжЁп 2 - Ї®«гзЁвм § ¤Ґа¦Єг ¬лиЁ. -------------- -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 19 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 2 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ⥪гй п § ¤Ґа¦Є  ¬лиЁ - ------------- Џ®¤Ї®¤дг­ЄжЁп 3 - гбв ­®ўЁвм § ¤Ґа¦Єг ¬лиЁ. ------------- -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 19 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 3 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ - * edx = ­®ў®Ґ §­ зҐ­ЁҐ § ¤Ґа¦ЄЁ ¬лиЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - --------- Џ®¤Ї®¤дг­ЄжЁп 4 - гбв ­®ўЁвм Ї®«®¦Ґ­ЁҐ Єгаб®а  ¬лиЁ. -------- -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 19 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 4 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ - * edx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [Є®®а¤Ё­ в  Ї® ®бЁ y] -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -------- Џ®¤Ї®¤дг­ЄжЁп 5 - бЁ¬г«Ёа®ў вм б®бв®п­ЁҐ Є« ўЁи ¬лиЁ. -------- -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 19 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 5 - ­®¬Ґа Ї®¤Ї®¤дг­ЄжЁЁ - * edx = Ё­д®а¬ жЁп ® н¬г«Ёа㥬®¬ б®бв®п­ЁЁ Є­®Ї®Є ¬лиЁ: - (ᮮ⢥вбвўгҐв ў®§ўа й Ґ¬®¬г §­ зҐ­Ёо Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 37) - * ЎЁв 0 гбв ­®ў«Ґ­ = «Ґў п Є­®ЇЄ  ­ ¦ в  - * ЎЁв 1 гбв ­®ў«Ґ­ = Їа ў п Є­®ЇЄ  ­ ¦ в  - * ЎЁв 2 гбв ­®ў«Ґ­ = б।­пп Є­®ЇЄ  ­ ¦ в  - * ЎЁв 3 гбв ­®ў«Ґ­ = 4-п Є­®ЇЄ  ­ ¦ в  - * ЎЁв 4 гбв ­®ў«Ґ­ = 5-п Є­®ЇЄ  ­ ¦ в  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ђҐЄ®¬Ґ­¤гҐ¬ п бЄ®а®бвм ¬лиЁ (ў Ї®¤Ї®¤дг­ЄжЁЁ 1) ®в 1 ¤® 9. - “бв ­ ў«Ёў Ґ¬ п ўҐ«ЁзЁ­  ­Ґ Їа®ўҐапҐвбп Є®¤®¬ п¤а , Ї®н⮬г - ЁбЇ®«м§г©вҐ ®бв®а®¦­®, ЇаЁ ­ҐЄ®а४⭮¬ §­ зҐ­ЁЁ Єгаб®а ¬®¦Ґв - "§ ¬са§­гвм". ‘Є®а®бвм ¬лиЁ ¬®¦­® ॣ㫨஢ вм ў ЇаЁ«®¦Ґ­ЁЁ SETUP. - * ђҐЄ®¬Ґ­¤гҐ¬ п ўҐ«ЁзЁ­  § ¤Ґа¦ЄЁ (ў Ї®¤Ї®¤дг­ЄжЁЁ 3) = 10. - ЊҐ­миЁҐ §­ зҐ­Ёп ­Ґ ®Ўа Ў влў овбп COM-¬ли ¬Ё. ЏаЁ ®зҐ­м Ў®«миЁе - §­ зҐ­Ёпе ­Ґў®§¬®¦­® ЇҐаҐ¤ўЁ¦Ґ­ЁҐ ¬лиЁ ­  1 ЇЁЄбҐ«м Ё Єгаб®а Ўг¤Ґв - ЇалЈ вм ­  ўҐ«ЁзЁ­г гбв ­®ў«Ґ­­®© бЄ®а®бвЁ (Ї®¤Ї®¤дг­ЄжЁп 1). - “бв ­ ў«Ёў Ґ¬ п ўҐ«ЁзЁ­  ­Ґ Їа®ўҐапҐвбп Є®¤®¬ п¤а . - ‚Ґ«ЁзЁ­г § ¤Ґа¦ЄЁ ¬®¦­® ¬Ґ­пвм ў ЇаЁ«®¦Ґ­ЁЁ SETUP. - * Џ®¤Ї®¤дг­ЄжЁп 4 ­Ґ Їа®ўҐапҐв ЇҐаҐ¤ ­­®Ґ §­ зҐ­ЁҐ. ЏҐаҐ¤ ўл§®ў®¬ - ­Ґ®Ўе®¤Ё¬® г§­ вм ⥪г饥 а §аҐиҐ­ЁҐ нЄа ­  (Ї®¤дг­ЄжЁҐ© 14) - Ё Їа®ўҐаЁвм, зв® гбв ­ ў«Ёў Ґ¬®Ґ Ї®«®¦Ґ­ЁҐ ­Ґ ўл室Ёв §  ЇаҐ¤Ґ«л - нЄа ­ . - -====================================================================== -====================== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 20 ===================== -============= Џ®«гзЁвм Ё­д®а¬ жЁо ®Ў ®ЇҐа вЁў­®© Ї ¬пвЁ. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 20 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ЎгдҐа ¤«п Ё­д®а¬ жЁЁ (36 Ў ©в) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ®ЎйЁ© а §¬Ґа Ё¬Ґо饩бп ®ЇҐа вЁў­®© Ї ¬пвЁ ў Ў ©в е - Ё«Ё -1 ў б«гз Ґ ®иЁЎЄЁ - * ЎгдҐа, ­  Є®в®ал© гЄ §лў Ґв ecx, ᮤҐа¦Ёв б«Ґ¤гойго Ё­д®а¬ жЁо: - * +0: dword: ®ЎйЁ© а §¬Ґа Ё¬Ґо饩бп ®ЇҐа вЁў­®© Ї ¬пвЁ ў бва ­Ёж е - * +4: dword: а §¬Ґа бў®Ў®¤­®© ®ЇҐа вЁў­®© Ї ¬пвЁ ў бва ­Ёж е - * +8: dword: зЁб«® бва ­Ёз­ле ®иЁЎ®Є (ЁбЄ«о祭Ё© #PF) - ў ЇаЁ«®¦Ґ­Ёпе - * +12: dword: а §¬Ґа ЄгзЁ п¤а  ў Ў ©в е - * +16: dword: а §¬Ґа бў®Ў®¤­®© Ї ¬пвЁ ў ЄгзҐ п¤а  ў Ў ©в е - * +20: dword: ®ЎйҐҐ Є®«ЁзҐбвў® Ў«®Є®ў Ї ¬пвЁ ў ЄгзҐ п¤а  - * +24: dword: Є®«ЁзҐбвў® бў®Ў®¤­ле Ў«®Є®ў Ї ¬пвЁ ў ЄгзҐ п¤а  - * +28: dword: а §¬Ґа ­ ЁЎ®«м襣® бў®Ў®¤­®Ј® Ў«®Є  ў ЄгзҐ п¤а  - (§ аҐ§ҐаўЁа®ў ­®) - * +32: dword: а §¬Ґа ­ ЁЎ®«м襣® ўл¤Ґ«Ґ­­®Ј® Ў«®Є  ў ЄгзҐ п¤а  - (§ аҐ§ҐаўЁа®ў ­®) - -====================================================================== -====================== ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 21 ===================== -======= Џ®«гзЁвм ­®¬Ґа б«®в  Їа®жҐбб /Ї®в®Є  Ї® Ё¤Ґ­вЁдЁЄ в®аг. ====== -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 21 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а Їа®жҐбб /Ї®в®Є  (PID/TID) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ®иЁЎЄ  (­ҐўҐа­л© Ё¤Ґ­вЁдЁЄ в®а) - * Ё­ зҐ eax = ­®¬Ґа б«®в  - -====================================================================== - ”г­ЄжЁп 18, Ї®¤дг­ЄжЁп 22 - ®ЇҐа жЁЁ б ®Є­®¬ ¤агЈ®Ј® Їа®жҐбб /Ї®в®Є . -====================================================================== -Џ а ¬Ґвал: - * eax = 18 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 22 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = вЁЇ ®ЇҐа жЁЁ: - * 0 = ¬Ё­Ё¬Ё§ жЁп ®Є­ , Ї®в®Є § ¤ ­ ­®¬Ґа®¬ б«®в  - * 1 = ¬Ё­Ё¬Ё§ жЁп ®Є­ , Ї®в®Є § ¤ ­ Ё¤Ґ­вЁдЁЄ в®а®¬ - * 2 = ў®ббв ­®ў«Ґ­ЁҐ ®Є­ , Ї®в®Є § ¤ ­ ­®¬Ґа®¬ б«®в  - * 3 = ў®ббв ­®ў«Ґ­ЁҐ ®Є­ , Ї®в®Є § ¤ ­ Ё¤Ґ­вЁдЁЄ в®а®¬ - * edx = Ї а ¬Ґва ®ЇҐа жЁЁ (­®¬Ґа б«®в  Ё«Ё PID/TID) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = -1 - ®иЁЎЄ  (­ҐЇа ўЁ«м­л© Ї а ¬Ґва) -‡ ¬Ґз ­Ёп: - * Џ®в®Є ¬®¦Ґв ᢥа­гвм бў®с ®Є­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 10. - * ‚®ббв ­®ў«Ґ­ЁҐ ®Є­  б ®¤­®ўаҐ¬Ґ­­®©  ЄвЁўЁ§ жЁҐ© ®бгйҐбвў«пҐвбп - Ї®¤дг­ЄжЁЁ 3 (ЇаЁ­Ё¬ о饩 ­®¬Ґа б«®в ). - -====================================================================== -==================== ”г­ЄжЁп 20 - Ё­вҐа䥩б MIDI. ==================== -====================================================================== - ------------------------- Џ®¤дг­ЄжЁп 1 - бЎа®б ------------------------ -Џ а ¬Ґвал: - * eax = 20 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - --------------------- Џ®¤дг­ЄжЁп 2 - ўлўҐбвЁ Ў ©в --------------------- -Џ а ¬Ґвал: - * eax = 20 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * cl = Ў ©в ¤«п ўлў®¤  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ (®¤Ё­ Є®ў® ¤«п ®ЎҐЁе Ї®¤дг­ЄжЁ©): - * eax = 0 - гбЇҐи­® - * eax = 1 - ­Ґ ®ЇаҐ¤Ґ«с­ Ў §®ўл© Ї®ав -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм ®ЇаҐ¤Ґ«с­ Ў §®ўл© Ї®а⠢맮ў®¬ - Ї®¤дг­ЄжЁЁ 1 дг­ЄжЁЁ 21. - -====================================================================== -==== ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 1 - гбв ­®ўЁвм Ў §®ўл© Ї®ав MPU MIDI. ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ­®¬Ґа Ў §®ў®Ј® Ї®ав  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = -1 - ®иЁЎ®з­л© ­®¬Ґа Ї®ав  -‡ ¬Ґз ­Ёп: - * Ќ®¬Ґа Ї®ав  ¤®«¦Ґ­ 㤮ў«Ґвў®апвм гб«®ўЁп¬ 0x100<=ecx<=0xFFFF. - * “бв ­®ўЄ  Ў §л ­г¦­  ¤«п а Ў®вл дг­ЄжЁЁ 20. - * Џ®«гзЁвм гбв ­®ў«Ґ­­л© Ў §®ўл© Ї®ав ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 1 дг­ЄжЁЁ 26. - -====================================================================== -===== ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 2 - гбв ­®ўЁвм а бЄ« ¤Єг Є« ўЁ вгал. ==== -====================================================================== -ђ бЄ« ¤Є  Є« ўЁ вгал ЁбЇ®«м§гҐвбп ¤«п ЇаҐ®Ўа §®ў ­Ёп бЄ ­Є®¤®ў, -Ї®бвгЇ ойЁе ®в Є« ўЁ вгал, ў ASCII-Є®¤л, бзЁвлў Ґ¬лҐ дг­ЄжЁҐ© 2. -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Є Єго а бЄ« ¤Єг гбв ­ ў«Ёў вм: - * 1 = ­®а¬ «м­го - * 2 = а бЄ« ¤Єг ЇаЁ ­ ¦ в®¬ Shift - * 3 = а бЄ« ¤Єг ЇаЁ ­ ¦ в®¬ Alt - * edx = гЄ § вҐ«м ­  а бЄ« ¤Єг - в Ў«Ёжг ¤«Ё­®© 128 Ў ©в -€«Ё: - * ecx = 9 - * dx = Ё¤Ґ­вЁдЁЄ в®а бва ­л (1=eng, 2=fi, 3=ger, 4=rus) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - Ї а ¬Ґва § ¤ ­ ­ҐўҐа­® -‡ ¬Ґз ­Ёп: - * …б«Ё ­ ¦ в Alt, в® ЁбЇ®«м§гҐвбп а бЄ« ¤Є  б Alt; - Ґб«Ё ­Ґ ­ ¦ в Alt, ­® ­ ¦ в Shift, в® - ЁбЇ®«м§гҐвбп а бЄ« ¤Є  б Shift; - Ґб«Ё ­Ґ ­ ¦ вл Alt Ё Shift, ­® ­ ¦ в Ctrl, в® ЁбЇ®«м§гҐвбп - ­®а¬ «м­ п а бЄ« ¤Є , Ї®б«Ґ 祣® Ё§ Є®¤  ўлзЁв Ґвбп 0x60; - Ґб«Ё ­Ґ ­ ¦ в  ­Ё ®¤­  Ё§ гЇа ў«пойЁе Є« ўЁи, в® ЁбЇ®«м§гҐвбп - ­®а¬ «м­ п а бЄ« ¤Є . - * Џ®«гзЁвм а бЄ« ¤ЄЁ Ё Ё¤Ґ­вЁдЁЄ в®а бва ­л ¬®¦­® б Ї®¬®ймо - Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 26. - * €¤Ґ­вЁдЁЄ в®а бва ­л - Ј«®Ў «м­ п бЁб⥬­ п ЇҐаҐ¬Ґ­­ п, Є®в®а п - б ¬Ё¬ п¤а®¬ ­Ґ ЁбЇ®«м§гҐвбп; ®¤­ Є® ЇаЁ«®¦Ґ­ЁҐ @panel ®в®Ўа ¦ Ґв - ᮮ⢥вбвўгойго ⥪г饩 бва ­Ґ ЁЄ®­Єг. - * ЏаЁ«®¦Ґ­ЁҐ @panel ЇҐаҐЄ«оз Ґв а бЄ« ¤ЄЁ Ї® § Їа®бг Ї®«м§®ў вҐ«п. - -====================================================================== -=========== ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 3 - гбв ­®ўЁвм Ў §г CD. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ў §  CD: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 -‡ ¬Ґз ­Ёп: - * Ѓ §  CD ЁбЇ®«м§гҐвбп дг­ЄжЁҐ© 24. - * Џ®«гзЁвм гбв ­®ў«Ґ­­го Ў §г CD ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 3 дг­ЄжЁЁ 26. - -====================================================================== -========= ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 5 - гбв ­®ўЁвм п§лЄ бЁб⥬л. ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = п§лЄ бЁб⥬л (1=eng, 2=fi, 3=ger, 4=rus) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 -‡ ¬Ґз ­Ёп: - * џ§лЄ бЁб⥬л - Ј«®Ў «м­ п бЁб⥬­ п ЇҐаҐ¬Ґ­­ п, ­ЁЄ Є - ­Ґ ЁбЇ®«м§гҐ¬ п б ¬Ё¬ п¤а®¬, ®¤­ Є® ЇаЁ«®¦Ґ­ЁҐ @panel аЁбгҐв - ᮮ⢥вбвўгойго ЁЄ®­Єг. - * Џа®ўҐа®Є ­  Є®а४⭮бвм ­Ґ ¤Ґ« Ґвбп, Ї®бЄ®«мЄг п¤а® нвг - ЇҐаҐ¬Ґ­­го ­Ґ ЁбЇ®«м§гҐв. - * Џ®«гзЁвм п§лЄ бЁбвҐ¬л ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 5 дг­ЄжЁЁ 26. - -====================================================================== -=========== ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 7 - гбв ­®ўЁвм Ў §г HD. =========== -====================================================================== -Ѓ §  HD ­г¦­  ¤«п ®ЇаҐ¤Ґ«Ґ­Ёп, ­  Є Є®© ¦сбвЄЁ© ¤ЁбЄ ЇЁб вм, ЇаЁ -ЁбЇ®«м§®ў ­ЁЁ гбв аҐўиҐЈ® бЁ­в ЄбЁб  /HD ў гбв аҐўиҐ© дг­ЄжЁЁ 58; -ЇаЁ ЁбЇ®«м§®ў ­ЁЁ ᮢ६Ґ­­®Ј® бЁ­в ЄбЁб  /HD0,/HD1,/HD2,/HD3 -Ў §  гбв ­ ў«Ёў Ґвбп  ўв®¬ вЁзҐбЄЁ. -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 7 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ў §  HD: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 -‡ ¬Ґз ­Ёп: - * ‹оЎ®Ґ ЇаЁ«®¦Ґ­ЁҐ ў «оЎ®© ¬®¬Ґ­в ўаҐ¬Ґ­Ё ¬®¦Ґв Ё§¬Ґ­Ёвм Ў §г. - * ЌҐ б«Ґ¤гҐв Ё§¬Ґ­пвм Ў §г, Є®Ј¤  Є Є®Ґ-­ЁЎг¤м ЇаЁ«®¦Ґ­ЁҐ а Ў®в Ґв - б ¦сбвЄЁ¬ ¤ЁбЄ®¬. …б«Ё ­Ґ е®вЁвҐ Ј«оЄ®ў бЁб⥬л. - * Џ®«гзЁвм гбв ­®ў«Ґ­­го Ў §г ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 7 дг­ЄжЁЁ 26. - * ‘«Ґ¤гҐв в Є¦Ґ ®ЇаҐ¤Ґ«Ёвм ЁбЇ®«м§гҐ¬л© а §¤Ґ« ¦сбвЄ®Ј® ¤ЁбЄ  - Ї®¤дг­ЄжЁҐ© 8. - -====================================================================== -========== ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 8 - гбв ­®ўЁвм а §¤Ґ« HD. ========== -====================================================================== -ђ §¤Ґ« HD ­г¦Ґ­ ¤«п ®ЇаҐ¤Ґ«Ґ­Ёп, ­  Є Є®© а §¤Ґ« ¦сбвЄ®Ј® ¤ЁбЄ  -ЇЁб вм, ЇаЁ ЁбЇ®«м§®ў ­ЁЁ гбв аҐўиҐЈ® бЁ­в ЄбЁб  /HD ў гбв аҐўиҐ© -дг­ЄжЁЁ 58; ЇаЁ ЁбЇ®«м§®ў ­ЁЁ ᮢ६Ґ­­®Ј® бЁ­в ЄбЁб  -/HD0,/HD1,/HD2,/HD3 Ў §  Ё а §¤Ґ« гбв ­ ў«Ёў овбп  ўв®¬ вЁзҐбЄЁ. -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = а §¤Ґ« HD (бзЁв п б 1) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 -‡ ¬Ґз ­Ёп: - * ‹оЎ®Ґ ЇаЁ«®¦Ґ­ЁҐ ў «оЎ®© ¬®¬Ґ­в ўаҐ¬Ґ­Ё ¬®¦Ґв Ё§¬Ґ­Ёвм а §¤Ґ«. - * ЌҐ б«Ґ¤гҐв Ё§¬Ґ­пвм а §¤Ґ«, Є®Ј¤  Є Є®Ґ-­ЁЎг¤м ЇаЁ«®¦Ґ­ЁҐ а Ў®в Ґв - б ¦сбвЄЁ¬ ¤ЁбЄ®¬. …б«Ё ­Ґ е®вЁвҐ Ј«оЄ®ў бЁб⥬л. - * Џ®«гзЁвм гбв ­®ў«Ґ­­л© а §¤Ґ« ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 8 - дг­ЄжЁЁ 26. - * Џа®ўҐа®Є ­  Є®а४⭮бвм ­Ґ ¤Ґ« Ґвбп. - * “§­ вм зЁб«® а §¤Ґ«®ў ­  ¦сбвЄ®¬ ¤ЁбЄҐ ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 11 дг­ЄжЁЁ 18. - * ‘«Ґ¤гҐв в Є¦Ґ ®ЇаҐ¤Ґ«Ёвм ЁбЇ®«м§гҐ¬го Ў §г ¦сбвЄ®Ј® ¤ЁбЄ  - Ї®¤дг­ЄжЁҐ© 7. - -====================================================================== -====================== ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 11 ===================== -=========== ђ §аҐиЁвм/§ ЇаҐвЁвм ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є HD. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 11 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 0/1 - § ЇаҐвЁвм/а §аҐиЁвм -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 -‡ ¬Ґз ­Ёп: - * €бЇ®«м§гҐвбп ЇаЁ LBA-з⥭ЁЁ (Ї®¤дг­ЄжЁп 8 дг­ЄжЁЁ 58). - * ’ҐЄгй п ॠ«Ё§ жЁп ЁбЇ®«м§гҐв в®«мЄ® ¬« ¤иЁ© ЎЁв ecx. - * Џ®«гзЁвм ⥪г饥 б®бв®п­ЁҐ ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 11 дг­ЄжЁЁ 26. - -====================================================================== -====================== ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 12 ===================== -========== ђ §аҐиЁвм/§ ЇаҐвЁвм ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є PCI. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 12 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 0/1 - § ЇаҐвЁвм/а §аҐиЁвм -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 -‡ ¬Ґз ­Ёп: - * €бЇ®«м§гҐвбп ЇаЁ а Ў®вҐ б иЁ­®© PCI (дг­ЄжЁп 62). - * ’ҐЄгй п ॠ«Ё§ жЁп ЁбЇ®«м§гҐв в®«мЄ® ¬« ¤иЁ© ЎЁв ecx. - * Џ®«гзЁвм ⥪г饥 б®бв®п­ЁҐ ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 12 дг­ЄжЁЁ 26. - -====================================================================== -============= ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 13, Ї®¤Ї®¤дг­ЄжЁп 1 ============= -==== €­ЁжЁ «Ё§Ёа®ў вм + Ї®«гзЁвм Ё­д®а¬ жЁо ® ¤а ©ўҐаҐ vmode.mdr. ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 1 - ­®¬Ґа дг­ЄжЁЁ ¤а ©ўҐа  - * edx = гЄ § вҐ«м ­  ЎгдҐа а §¬Ґа  512 Ў ©в -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё ¤а ©ўҐа ­Ґ § Ја㦥­ (­ЁЄ®Ј¤  ­Ґ Ўлў Ґв ў ⥪г饩 ॠ«Ё§ жЁЁ): - * eax = -1 - * ebx, ecx а §аги овбп - * Ґб«Ё ¤а ©ўҐа § Ја㦥­: - * eax = 'MDAZ' (ў бвЁ«Ґ fasm' , в.Ґ. 'M' - ¬« ¤иЁ© Ў ©в, - 'Z' - бв аиЁ©) - бЁЈ­ вга  - * ebx = ⥪гй п з бв®в  а §ўсавЄЁ (ў ѓж) - * ecx а §аги Ґвбп - * ЎгдҐа, ­  Є®в®ал© гЄ §лў Ґв edx, § Ї®«­Ґ­ -”®а¬ в ЎгдҐа : - * +0: 32*byte: Ё¬п ¤а ©ўҐа , "Trans VideoDriver" (ЎҐ§ Є ўл祪, - ¤®Ї®«­Ґ­® Їа®ЎҐ« ¬Ё) - * +32 = +0x20: dword: ўҐабЁп ¤а ©ўҐа  (ўҐабЁп x.y Є®¤ЁагҐвбп Є Є - y*65536+x), ¤«п ⥪г饩 ॠ«Ё§ жЁЁ 1 (1.0) - * +36 = +0x24: 7*dword: § аҐ§ҐаўЁа®ў ­® (0 ў ⥪г饩 ॠ«Ё§ жЁЁ) - * +64 = +0x40: 32*word: бЇЁб®Є Ї®¤¤Ґа¦Ёў Ґ¬ле ўЁ¤Ґ®аҐ¦Ё¬®ў (Є ¦¤®Ґ - б«®ў® - ­®¬Ґа ўЁ¤Ґ®аҐ¦Ё¬ , Ї®б«Ґ б®Ўб⢥­­® бЇЁбЄ  Ё¤гв ­г«Ё) - * +128 = +0x80: 32*(5*word): бЇЁб®Є Ї®¤¤Ґа¦Ёў Ґ¬ле з бв®в а §ўсав®Є - ¤«п ўЁ¤Ґ®аҐ¦Ё¬®ў: ¤«п Є ¦¤®Ј® ўЁ¤Ґ®аҐ¦Ё¬ , гЄ § ­­®Ј® ў ЇаҐ¤л¤г饬 - Ї®«Ґ, гЄ § ­® ¤® 5 Ї®¤¤Ґа¦Ёў Ґ¬ле з бв®в - (ў ­ҐЁбЇ®«м§гҐ¬ле Ї®§ЁжЁпе § ЇЁб ­л ­г«Ё) -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп Ё­ЁжЁ «Ё§ЁагҐв ¤а ©ўҐа (Ґб«Ё ®­ Ґйс ­Ґ Ё­ЁжЁ «Ё§Ёа®ў ­) - Ё ¤®«¦­  ўл§лў вмбп ЇҐаў®©, ЇҐаҐ¤ ®бв «м­л¬Ё (Ё­ зҐ ®­Ё Ўг¤гв - ў®§ўа й вм -1, ­ЁзҐЈ® ­Ґ ¤Ґ« п). - * ‚ ⥪г饩 ॠ«Ё§ жЁЁ Ї®¤¤Ґа¦Ёў Ґвбп в®«мЄ® ®¤­  з бв®в  а §ўсавЄЁ - ­  ўЁ¤Ґ®аҐ¦Ё¬. - -====================================================================== -============= ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 13, Ї®¤Ї®¤дг­ЄжЁп 2 ============= -============= Џ®«гзЁвм Ё­д®а¬ жЁо ® ⥪г饬 ўЁ¤Ґ®аҐ¦Ё¬Ґ. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 2 - ­®¬Ґа дг­ЄжЁЁ ¤а ©ўҐа  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ¤а ©ўҐа ­Ґ § Ја㦥­ Ё«Ё ­Ґ Ё­ЁжЁ «Ё§Ёа®ў ­; - ebx,ecx а §аги овбп - * eax = [иЁаЁ­ ]*65536 + [ўлб®в ] - * ebx = з бв®в  ўҐавЁЄ «м­®© а §ўсавЄЁ (ў ѓж) - * ecx = ­®¬Ґа ⥪г饣® ўЁ¤Ґ®аҐ¦Ё¬  -‡ ¬Ґз ­Ёп: - * „а ©ўҐа ЇаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм Ё­ЁжЁ «Ё§Ёа®ў ­ ўл§®ў®¬ - дг­ЄжЁЁ ¤а ©ўҐа  1. - * …б«Ё ­г¦­л в®«мЄ® а §¬Ґал нЄа ­ , 楫Ґб®®Ўа §­Ґ© ЁбЇ®«м§®ў вм - дг­ЄжЁо 14 б гзс⮬ в®Ј®, зв® ®­  ў®§ўа й Ґв а §¬Ґал ­  1 ¬Ґ­миҐ. - -====================================================================== -= ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 13, Ї®¤Ї®¤дг­ЄжЁп 3 - гбв ­®ўЁвм ўЁ¤Ґ®аҐ¦Ё¬. -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 3 - ­®¬Ґа дг­ЄжЁЁ ¤а ©ўҐа  - * edx = [з бв®в  а §ўсавЄЁ]*65536 + [­®¬Ґа ўЁ¤Ґ®аҐ¦Ё¬ ] -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ¤а ©ўҐа ­Ґ § Ја㦥­, ­Ґ Ё­ЁжЁ «Ё§Ёа®ў ­ Ё«Ё - Їа®Ё§®и«  ®иЁЎЄ  - * eax = 0 - гбЇҐи­® - * ebx, ecx а §аги овбп -‡ ¬Ґз ­Ёп: - * „а ©ўҐа ЇаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм Ё­ЁжЁ «Ё§Ёа®ў ­ ўл§®ў®¬ - дг­ЄжЁЁ ¤а ©ўҐа  1. - * Ќ®¬Ґа ўЁ¤Ґ®аҐ¦Ё¬  Ё з бв®в  ¤®«¦­л Ўлвм ў в Ў«ЁжҐ, ў®§ўа й Ґ¬®© - дг­ЄжЁҐ© ¤а ©ўҐа  1. - -====================================================================== -============= ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 13, Ї®¤Ї®¤дг­ЄжЁп 4 ============= -================= ‚Ґа­гвмбп Є ­ з «м­®¬г ўЁ¤Ґ®аҐ¦Ё¬г. ================ -====================================================================== -‚®§ўа й Ґв нЄа ­ ў ўЁ¤Ґ®аҐ¦Ё¬, гбв ­®ў«Ґ­­л© ЇаЁ § Јаг§ЄҐ бЁб⥬л. -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 4 - ­®¬Ґа дг­ЄжЁЁ ¤а ©ўҐа  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ¤а ©ўҐа ­Ґ § Ја㦥­ Ё«Ё ­Ґ Ё­ЁжЁ «Ё§Ёа®ў ­ - * eax = 0 - гбЇҐи­® - * ebx, ecx а §аги овбп -‡ ¬Ґз ­Ёп: - * „а ©ўҐа ЇаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм Ё­ЁжЁ «Ё§Ёа®ў ­ ўл§®ў®¬ - дг­ЄжЁЁ ¤а ©ўҐа  1. - -====================================================================== -============= ”г­ЄжЁп 21, Ї®¤дг­ЄжЁп 13, Ї®¤Ї®¤дг­ЄжЁп 5 ============= -======== “ўҐ«ЁзЁвм/㬥­миЁвм а §¬Ґа ўЁ¤Ё¬®© ®Ў« бвЁ ¬®­Ёв®а . ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 21 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 5 - ­®¬Ґа дг­ЄжЁЁ ¤а ©ўҐа  - * edx = 0/1 - 㬥­миЁвм/㢥«ЁзЁвм а §¬Ґа Ї® Ј®аЁ§®­в «Ё - ­  ®¤­г Ї®§ЁжЁо - * edx = 2/3 - ў ⥪г饩 ॠ«Ё§ жЁЁ ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп; Ї« ­ЁагҐвбп - Є Є 㬥­м襭ЁҐ/㢥«ЁзҐ­ЁҐ а §¬Ґа  Ї® ўҐавЁЄ «Ё ­  ®¤­г Ї®§ЁжЁо -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ¤а ©ўҐа ­Ґ § Ја㦥­ Ё«Ё ­Ґ Ё­ЁжЁ «Ё§Ёа®ў ­ - * eax = 0 - гбЇҐи­® - * ebx, ecx а §аги овбп -‡ ¬Ґз ­Ёп: - * „а ©ўҐа ЇаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм Ё­ЁжЁ «Ё§Ёа®ў ­ ўл§®ў®¬ - дг­ЄжЁЁ ¤а ©ўҐа  1. - * ”г­ЄжЁп ў«ЁпҐв в®«мЄ® ­  дЁ§ЁзҐбЄЁ© а §¬Ґа Ё§®Ўа ¦Ґ­Ёп - ­  ¬®­Ёв®аҐ; «®ЈЁзҐбЄЁ© а §¬Ґа (зЁб«® ЇЁЄбҐ«Ґ©) ­Ґ ¬Ґ­пҐвбп. - -====================================================================== -============ ”г­ЄжЁп 22 - гбв ­®ўЁвм бЁб⥬­го ¤ вг/ўаҐ¬п. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 22 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - гбв ­®ўЁвм ўаҐ¬п - * ecx = 0x00SSMMHH - ўаҐ¬п ў ¤ў®Ёз­®-¤ҐбпвЁз­®¬ Є®¤Ґ (BCD): - * HH=з б 00..23 - * MM=¬Ё­гв  00..59 - * SS=ᥪ㭤  00..59 - * ebx = 1 - гбв ­®ўЁвм ¤ вг - * ecx = 0x00DDMMYY - ¤ в  ў ¤ў®Ёз­®-¤ҐбпвЁз­®¬ Є®¤Ґ (BCD): - * DD=¤Ґ­м 01..31 - * MM=¬Ґбпж 01..12 - * YY=Ј®¤ 00..99 - * ebx = 2 - гбв ­®ўЁвм ¤Ґ­м ­Ґ¤Ґ«Ё - * ecx = 1 ¤«п ў®бЄаҐбҐ­мп, ..., 7 ¤«п бгЎЎ®вл - * ebx = 3 - гбв ­®ўЁвм Ўг¤Ё«м­ЁЄ - * ecx = 0x00SSMMHH -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - Ї а ¬Ґва § ¤ ­ ­ҐўҐа­® - * eax = 2 - CMOS-Ў в аҐ©ЄЁ а §ап¤Ё«Ёбм -‡ ¬Ґз ­Ёп: - * –Ґ­­®бвм гбв ­®ўЄЁ ¤­п ­Ґ¤Ґ«Ё ЇаҐ¤бв ў«пҐвбп ᮬ­ЁвҐ«м­®©, - Ї®бЄ®«мЄг ®­ ¬ «® Ј¤Ґ ЁбЇ®«м§гҐвбп - (¤Ґ­м ­Ґ¤Ґ«Ё ¬®¦­® а ббзЁв вм Ї® ¤ вҐ). - * Ѓг¤Ё«м­ЁЄ ¬®¦­® гбв ­®ўЁвм ­  ба Ў влў ­ЁҐ ў § ¤ ­­®Ґ ўаҐ¬п - Є ¦¤лҐ бгвЄЁ. ЏаЁ н⮬ ®вЄ«озЁвм ҐЈ® бгйҐбвўгойЁ¬Ё бЁб⥬­л¬Ё - дг­ЄжЁп¬Ё ­Ґ«м§п. - * ‘а Ў влў ­ЁҐ Ўг¤Ё«м­ЁЄ  § Є«оз Ґвбп ў ЈҐ­Ґа жЁЁ IRQ8. - * ‚®®ЎйҐ-в® CMOS Ї®¤¤Ґа¦Ёў Ґв ¤«п Ўг¤Ё«м­ЁЄ  гбв ­®ўЄг §­ зҐ­Ёп - 0xFF ў Є зҐб⢥ ®¤­®Ј® Ё§ Ї а ¬Ґва®ў Ё ®§­ з Ґв нв®, зв® - ᮮ⢥вбвўгойЁ© Ї а ¬Ґва ЁЈ­®аЁагҐвбп. Ќ® ў ⥪г饩 ॠ«Ё§ жЁЁ - нв® ­Ґ Їа®©¤св (ўҐа­свбп §­ зҐ­ЁҐ 1). - * Ѓг¤Ё«м­ЁЄ - Ј«®Ў «м­л© бЁб⥬­л© аҐбгаб; гбв ­®ўЄ  Ўг¤Ё«м­ЁЄ  -  ўв®¬ вЁзҐбЄЁ ®в¬Ґ­пҐв ЇаҐ¤л¤гйго гбв ­®ўЄг. ‚Їа®зҐ¬, ­  ¤ ­­л© - ¬®¬Ґ­в ­Ё ®¤­  Їа®Ја ¬¬  ҐЈ® ­Ґ ЁбЇ®«м§гҐв. - -====================================================================== -============== ”г­ЄжЁп 23 - ®¦Ё¤ вм б®ЎлвЁп б в ©¬ г⮬. ============= -====================================================================== -…б«Ё ®зҐаҐ¤м б®®ЎйҐ­Ё© Їгбв , ¦¤св Ї®пў«Ґ­Ёп б®®ЎйҐ­Ёп ў ®зҐаҐ¤Ё, -­® ­Ґ Ў®«ҐҐ гЄ § ­­®Ј® ўаҐ¬Ґ­Ё. ‡ вҐ¬ бзЁвлў Ґв б®®ЎйҐ­ЁҐ Ё§ ®зҐаҐ¤Ё. - -Џ а ¬Ґвал: - * eax = 23 - ­®¬Ґа дг­ЄжЁЁ - * ebx = в ©¬ гв (ў б®вле ¤®«пе ᥪ㭤л) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ®зҐаҐ¤м б®®ЎйҐ­Ё© Їгбв  - * Ё­ зҐ eax = б®ЎлвЁҐ (ᬮваЁ бЇЁб®Є б®ЎлвЁ©) -‡ ¬Ґз ­Ёп: - * “зЁвлў овбп в®«мЄ® ⥠ᮡлвЁп, Є®в®алҐ ўе®¤пв ў ¬ бЄг, - гбв ­ ў«Ёў Ґ¬го дг­ЄжЁҐ© 40. Џ® 㬮«з ­Ёо нв® б®ЎлвЁп - ЇҐаҐаЁб®ўЄЁ, ­ ¦ вЁп ­  Є« ўЁиЁ Ё ­  Є­®ЇЄЁ. - * „«п Їа®ўҐаЄЁ, Ґбвм «Ё б®®ЎйҐ­ЁҐ ў ®зҐаҐ¤Ё, ЁбЇ®«м§г©вҐ дг­ЄжЁо 11. - —в®Ўл ¦¤ вм бЄ®«м гЈ®¤­® ¤®«Ј®, ЁбЇ®«м§г©вҐ дг­ЄжЁо 10. - * ЏҐаҐ¤ з  ebx=0 ЇаЁў®¤Ёв Є ¬®¬Ґ­в «м­®¬г ў®§ўа йҐ­Ёо eax=0. - * ЏаЁ ⥪г饩 ॠ«Ё§ жЁЁ Їа®Ё§®©¤св ­Ґ¬Ґ¤«Ґ­­л© ў®§ўа в Ё§ дг­ЄжЁЁ - б eax=0, Ґб«Ё б«®¦Ґ­ЁҐ ebx б ⥪гйЁ¬ §­ зҐ­ЁҐ¬ бзсвзЁЄ  ўаҐ¬Ґ­Ё - ўл§®ўҐв 32-ЎЁв­®Ґ ЇҐаҐЇ®«­Ґ­ЁҐ. - -====================================================================== -======= ”г­ЄжЁп 24, Ї®¤дг­ЄжЁп 1 - ­ з вм Їа®ЁЈалў вм CD-audio. ====== -====================================================================== -Џ а ¬Ґвал: - * eax = 24 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 0x00FRSSMM, Ј¤Ґ - * MM = ­ з «м­ п ¬Ё­гв  - * SS = ­ з «м­ п ᥪ㭤  - * FR = ­ з «м­л© д३¬ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ­Ґ ®ЇаҐ¤Ґ«Ґ­  Ў §  CD -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ­г¦­® ®ЇаҐ¤Ґ«Ёвм Ў §®ўл© Ї®ав CD ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 3 дг­ЄжЁЁ 21. - * ‚ ᥪ㭤Ґ 75 д३¬®ў, ў ¬Ё­г⥠60 ᥪ㭤. - * ”г­ЄжЁп  бЁ­еа®­­  (ў®§ўа й Ґв гЇа ў«Ґ­ЁҐ, Є®Ј¤  ­ з «®бм - Їа®ЁЈалў ­ЁҐ). - -====================================================================== -===== ”г­ЄжЁп 24, Ї®¤дг­ЄжЁп 2 - Ї®«гзЁвм Ё­д®а¬ жЁо ® ¤®а®¦Є е. ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 24 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ЎгдҐа ¤«п в Ў«Ёжл - (¬ ЄбЁ¬г¬ 8*64h+4 Ў ©в=100 ¤®а®¦ҐЄ) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ­Ґ ®ЇаҐ¤Ґ«Ґ­  Ў §  CD -‡ ¬Ґз ­Ёп: - * ”®а¬ в в Ў«Ёжл б Ё­д®а¬ жЁҐ© ® ¤®а®¦Є е в Є®© ¦Ґ, Є Є Ё ¤«п - ATAPI-CD Є®¬ ­¤л 43h (READ TOC), ®Ўлз­®© в Ў«Ёжл (Ї®¤Є®¬ ­¤  00h). - Ђ¤аҐб  ў®§ўа й овбп ў д®а¬ вҐ MSF. - * ЏаҐ¤ў аЁвҐ«м­® ­г¦­® ®ЇаҐ¤Ґ«Ёвм Ў §®ўл© Ї®ав CD ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 3 дг­ЄжЁЁ 21. - * ”г­ЄжЁп ў®§ўа й Ґв Ё­д®а¬ жЁо в®«мЄ® ® ­Ґ Ў®«ҐҐ 祬 100 - ЇҐаўле ¤®а®¦Є е. ‚ Ў®«миЁ­б⢥ б«гз Ґў нв®Ј® ¤®бв в®з­®. - -====================================================================== -==== ”г­ЄжЁп 24, Ї®¤дг­ЄжЁп 3 - ®бв ­®ўЁвм Їа®ЁЈалў Ґ¬®Ґ CD-audio. === -====================================================================== -Џ а ¬Ґвал: - * eax = 24 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ­Ґ ®ЇаҐ¤Ґ«Ґ­  Ў §  CD -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ­г¦­® ®ЇаҐ¤Ґ«Ёвм Ў §®ўл© Ї®ав CD ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 3 дг­ЄжЁЁ 21. - -====================================================================== -======= ”г­ЄжЁп 24, Ї®¤дг­ЄжЁп 4 - Ё§ў«Ґзм «®в®Є ЇаЁў®¤  ¤ЁбЄ . ====== -====================================================================== -Џ а ¬Ґвал: - * eax = 24 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ­®¬Ґа CD/DVD-¤ЁбЄ  - (®в 0=Primary Master ¤® 3=Secondary Slave) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп Ї®¤¤Ґа¦Ёў Ґвбп в®«мЄ® ¤«п ATAPI-гбва®©бвў (CD Ё DVD). - * ЏаЁ Ё§ў«ҐзҐ­ЁЁ «®вЄ  Їа®Ё§ў®¤Ёвбп а §Ў«®ЄЁа®ўЄ  агз­®Ј® гЇа ў«Ґ­Ёп - ¬Ґе ­Ё§¬®¬ «®вЄ . - * ЏаЁ Ё§ў«ҐзҐ­ЁЁ «®вЄ  Є®¤ Їа®Ё§ў®¤Ёв ®зЁбвЄг Єни  б®®вўҐвбвўго饣® - гбва®©бвў . - * ЏаЁ¬Ґа®¬ ЁбЇ®«м§®ў ­Ёп дг­ЄжЁЁ пў«пҐвбп ЇаЁ«®¦Ґ­ЁҐ CD_tray. - -====================================================================== -====== ”г­ЄжЁп 24, Ї®¤дг­ЄжЁп 5 - § Јаг§Ёвм «®в®Є ЇаЁў®¤  ¤ЁбЄ . ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 24 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ­®¬Ґа CD/DVD-¤ЁбЄ  - (®в 0=Primary Master ¤® 3=Secondary Slave) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп Ї®¤¤Ґа¦Ёў Ґвбп в®«мЄ® ¤«п ATAPI-гбва®©бвў (CD Ё DVD). - * ЏаЁ¬Ґа®¬ ЁбЇ®«м§®ў ­Ёп дг­ЄжЁЁ пў«пҐвбп ЇаЁ«®¦Ґ­ЁҐ CD_tray. - -====================================================================== -===== ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 1 - Ї®«гзЁвм Ў §®ўл© Ї®ав MPU MIDI. ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ­®¬Ґа Ї®ав  -‡ ¬Ґз ­Ёп: - * “бв ­®ўЁвм Ў §®ўл© Ї®ав ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 1 дг­ЄжЁЁ 21. - -====================================================================== -====== ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 2 - Ї®«гзЁвм а бЄ« ¤Єг Є« ўЁ вгал. ===== -====================================================================== -ђ бЄ« ¤Є  Є« ўЁ вгал ЁбЇ®«м§гҐвбп ¤«п ЇаҐ®Ўа §®ў ­Ёп бЄ ­Є®¤®ў, -Ї®бвгЇ ойЁе ®в Є« ўЁ вгал, ў ASCII-Є®¤л, бзЁвлў Ґ¬лҐ дг­ЄжЁҐ© 2. -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Є Єго а бЄ« ¤Єг Ї®«гз вм: - * 1 = ­®а¬ «м­го - * 2 = а бЄ« ¤Єг ЇаЁ ­ ¦ в®¬ Shift - * 3 = а бЄ« ¤Єг ЇаЁ ­ ¦ в®¬ Alt - * edx = гЄ § вҐ«м ­  ЎгдҐа ¤«Ё­®© 128 Ў ©в, Єг¤  Ўг¤Ґв бЄ®ЇЁа®ў ­  - а бЄ« ¤Є  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -€«Ё: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 9 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = Ё¤Ґ­вЁдЁЄ в®а бва ­л (1=eng, 2=fi, 3=ger, 4=rus) -‡ ¬Ґз ­Ёп: - * …б«Ё ­ ¦ в Alt, в® ЁбЇ®«м§гҐвбп а бЄ« ¤Є  б Alt; - Ґб«Ё ­Ґ ­ ¦ в Alt, ­® ­ ¦ в Shift, в® ЁбЇ®«м§гҐвбп - а бЄ« ¤Є  б Shift; - Ґб«Ё ­Ґ ­ ¦ вл Alt Ё Shift, ­® ­ ¦ в Ctrl, в® ЁбЇ®«м§гҐвбп - ­®а¬ «м­ п а бЄ« ¤Є , Ї®б«Ґ 祣® Ё§ Є®¤  ўлзЁв Ґвбп 0x60; - Ґб«Ё ­Ґ ­ ¦ в  ­Ё ®¤­  Ё§ гЇа ў«пойЁе Є« ўЁи, в® ЁбЇ®«м§гҐвбп - ­®а¬ «м­ п а бЄ« ¤Є . - * “бв ­®ўЁвм а бЄ« ¤ЄЁ Ё Ё¤Ґ­вЁдЁЄ в®а бва ­л ¬®¦­® б Ї®¬®ймо - Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 21. - * €¤Ґ­вЁдЁЄ в®а бва ­л - Ј«®Ў «м­ п бЁб⥬­ п ЇҐаҐ¬Ґ­­ п, Є®в®а п - б ¬Ё¬ п¤а®¬ ­Ґ ЁбЇ®«м§гҐвбп; ®¤­ Є® ЇаЁ«®¦Ґ­ЁҐ @panel ®в®Ўа ¦ Ґв - ᮮ⢥вбвўгойго ⥪г饩 бва ­Ґ ЁЄ®­Єг - (ЁбЇ®«м§гп ®ЇЁблў Ґ¬го дг­ЄжЁо). - * ЏаЁ«®¦Ґ­ЁҐ @panel ЇҐаҐЄ«оз Ґв а бЄ« ¤ЄЁ Ї® § Їа®бг Ї®«м§®ў вҐ«п. - -====================================================================== -============ ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 3 - Ї®«гзЁвм Ў §г CD. ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = Ў §  CD: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -‡ ¬Ґз ­Ёп: - * Ѓ §  CD ЁбЇ®«м§гҐвбп дг­ЄжЁҐ© 24. - * “бв ­®ўЁвм Ў §г CD ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 3 дг­ЄжЁЁ 21. - -====================================================================== -========== ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 5 - Ї®«гзЁвм п§лЄ бЁб⥬л. ========= -====================================================================== -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = п§лЄ бЁб⥬л (1=eng, 2=fi, 3=ger, 4=rus) -‡ ¬Ґз ­Ёп: - * џ§лЄ бЁб⥬л - Ј«®Ў «м­ п бЁб⥬­ п ЇҐаҐ¬Ґ­­ п, ­ЁЄ Є - ­Ґ ЁбЇ®«м§гҐ¬ п б ¬Ё¬ п¤а®¬, ®¤­ Є® ЇаЁ«®¦Ґ­ЁҐ @panel аЁбгҐв - ᮮ⢥вбвўгойго ЁЄ®­Єг (ЁбЇ®«м§гп ®ЇЁблў Ґ¬го дг­ЄжЁо). - * “бв ­®ўЁвм п§лЄ бЁбвҐ¬л ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 5 дг­ЄжЁЁ 21. - -====================================================================== -============ ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 7 - Ї®«гзЁвм Ў §г HD. ============ -====================================================================== -Ѓ §  HD ­г¦­  ¤«п ®ЇаҐ¤Ґ«Ґ­Ёп, ­  Є Є®© ¦сбвЄЁ© ¤ЁбЄ ЇЁб вм, ЇаЁ -ЁбЇ®«м§®ў ­ЁЁ гбв аҐўиҐЈ® бЁ­в ЄбЁб  /HD ў гбв аҐўиҐ© дг­ЄжЁЁ 58; -ЇаЁ ЁбЇ®«м§®ў ­ЁЁ ᮢ६Ґ­­®Ј® бЁ­в ЄбЁб  /HD0,/HD1,/HD2,/HD3 -Ў §  гбв ­ ў«Ёў Ґвбп  ўв®¬ вЁзҐбЄЁ. -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 7 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = Ў §  HD: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -‡ ¬Ґз ­Ёп: - * ‹оЎ®Ґ ЇаЁ«®¦Ґ­ЁҐ ў «оЎ®© ¬®¬Ґ­в ўаҐ¬Ґ­Ё ¬®¦Ґв Ё§¬Ґ­Ёвм Ў §г. - * “бв ­®ўЁвм Ў §г ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 7 дг­ЄжЁЁ 21. - * Џ®«гзЁвм ЁбЇ®«м§гҐ¬л© а §¤Ґ« ¦сбвЄ®Ј® ¤ЁбЄ  ¬®¦­® Ї®¤дг­ЄжЁҐ© 8. - -====================================================================== -=========== ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 8 - Ї®«гзЁвм а §¤Ґ« HD. =========== -====================================================================== -ђ §¤Ґ« HD ­г¦Ґ­ ¤«п ®ЇаҐ¤Ґ«Ґ­Ёп, ­  Є Є®© а §¤Ґ« ¦сбвЄ®Ј® ¤ЁбЄ  -ЇЁб вм, ЇаЁ ЁбЇ®«м§®ў ­ЁЁ гбв аҐўиҐЈ® бЁ­в ЄбЁб  /HD ў гбв аҐўиҐ© -дг­ЄжЁЁ 58; ЇаЁ ЁбЇ®«м§®ў ­ЁЁ ᮢ६Ґ­­®Ј® бЁ­в ЄбЁб  -/HD0,/HD1,/HD2,/HD3 Ў §  Ё а §¤Ґ« гбв ­ ў«Ёў овбп  ўв®¬ вЁзҐбЄЁ. -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = а §¤Ґ« HD (бзЁв п б 1) -‡ ¬Ґз ­Ёп: - * ‹оЎ®Ґ ЇаЁ«®¦Ґ­ЁҐ ў «оЎ®© ¬®¬Ґ­в ўаҐ¬Ґ­Ё ¬®¦Ґв Ё§¬Ґ­Ёвм а §¤Ґ«. - * “бв ­®ўЁвм а §¤Ґ« ¬®¦­® ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 8 дг­ЄжЁЁ 21. - * “§­ вм зЁб«® а §¤Ґ«®ў ­  ¦сбвЄ®¬ ¤ЁбЄҐ ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 11 дг­ЄжЁЁ 18. - * Џ®«гзЁвм ЁбЇ®«м§гҐ¬го Ў §г ¦сбвЄ®Ј® ¤ЁбЄ  ¬®¦­® Ї®¤дг­ЄжЁҐ© 7. - -====================================================================== -=== ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 9 - Ї®«гзЁвм §­ зҐ­ЁҐ бзсвзЁЄ  ўаҐ¬Ґ­Ё. === -====================================================================== -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 9 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = зЁб«® б®вле ¤®«Ґ© ᥪ㭤л, Їа®иҐ¤иЁе б ¬®¬Ґ­в  - § ЇгбЄ  бЁб⥬л -‡ ¬Ґз ­Ёп: - * ‘зсвзЁЄ ЎҐасвбп Ї® ¬®¤г«о 2^32, з⮠ᮮ⢥вбвўгҐв ­Ґ¬­®ЈЁ¬ Ў®«ҐҐ - 497 бгв®Є. - * ‘Ёб⥬­®Ґ ўаҐ¬п ¬®¦­® Ї®«гзЁвм дг­ЄжЁҐ© 3. - -====================================================================== -====================== ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 11 ===================== -=========== “§­ вм, а §аҐис­ «Ё ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є HD. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 11 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0/1 - § ЇаҐйс­/а §аҐис­ -‡ ¬Ґз ­Ёп: - * €бЇ®«м§гҐвбп ЇаЁ LBA-з⥭ЁЁ (Ї®¤дг­ЄжЁп 8 дг­ЄжЁЁ 58). - * “бв ­®ўЁвм ⥪г饥 б®бв®п­ЁҐ ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 11 дг­ЄжЁЁ 21. - -====================================================================== -====================== ”г­ЄжЁп 26, Ї®¤дг­ЄжЁп 12 ===================== -========== “§­ вм, а §аҐис­ «Ё ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є PCI. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 26 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 12 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0/1 - § ЇаҐйс­/а §аҐис­ -‡ ¬Ґз ­Ёп: - * €бЇ®«м§гҐвбп ЇаЁ а Ў®вҐ б иЁ­®© PCI (дг­ЄжЁп 62). - * ’ҐЄгй п ॠ«Ё§ жЁп ЁбЇ®«м§гҐв в®«мЄ® ¬« ¤иЁ© ЎЁв ecx. - * “бв ­®ўЁвм ⥪г饥 б®бв®п­ЁҐ ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 12 дг­ЄжЁЁ 21. - -====================================================================== -================ ”г­ЄжЁп 29 - Ї®«гзЁвм бЁб⥬­го ¤ вг. =============== -====================================================================== -Џ а ¬Ґвал: - * eax = 29 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0x00DDMMYY, Ј¤Ґ - (ЁбЇ®«м§гҐвбп ¤ў®Ёз­®-¤ҐбпвЁз­®Ґ Є®¤Ёа®ў ­ЁҐ, BCD) - * YY = ¤ўҐ ¬« ¤иЁҐ жЁдал Ј®¤  (00..99) - * MM = ¬Ґбпж (01..12) - * DD = ¤Ґ­м (01..31) -‡ ¬Ґз ­Ёп: - * ‘Ёб⥬­го ¤ вг ¬®¦­® гбв ­®ўЁвм дг­ЄжЁҐ© 22. - -====================================================================== -================ ”г­ЄжЁп 30 - а Ў®в  б ⥪г饩 Ї ЇЄ®©. =============== -====================================================================== - --------- Џ®¤дг­ЄжЁп 1 - гбв ­®ўЁвм ⥪гйго Ї ЇЄг ¤«п Ї®в®Є . --------- -Џ а ¬Ґвал: - * eax = 30 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Їгвс¬ Є ­®ў®© ⥪г饩 Ї ЇЄҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - ---------- Џ®¤дг­ЄжЁп 2 - Ї®«гзЁвм ⥪гйго Ї ЇЄг ¤«п Ї®в®Є . ---------- -Џ а ¬Ґвал: - * eax = 30 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ЎгдҐа - * edx = а §¬Ґа ЎгдҐа  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ¤«Ё­  Ё¬Ґ­Ё ⥪г饩 Ї ЇЄЁ (ўЄ«оз п § ўҐаи ойЁ© 0) -‡ ¬Ґз ­Ёп: - * …б«Ё а §¬Ґа  ЎгдҐа  ­Ґ¤®бв в®з­® ¤«п Є®ЇЁа®ў ­Ёп ўбҐЈ® Ё¬Ґ­Ё, - Є®ЇЁаговбп в®«мЄ® ЇҐаўлҐ (edx-1) Ў ©в - Ё ў Є®­жҐ бв ўЁвбп § ўҐаи ойЁ© 0. - -====================================================================== -================ ”г­ЄжЁп 32 - г¤ «Ёвм д ©« б а ¬¤ЁбЄ . =============== -====================================================================== -Џ а ¬Ґвал: - * eax = 32 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё¬п д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®; Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л -‡ ¬Ґз ­Ёп: - * ќв  дг­ЄжЁп гбв аҐ« ; дг­ЄжЁп 58 Ї®§ў®«пҐв ўлЇ®«­пвм - ⥠¦Ґ ¤Ґ©бвўЁп б а биЁаҐ­­л¬Ё ў®§¬®¦­®бвп¬Ё. - * ’ҐЄгй п ॠ«Ё§ жЁп ў®§ўа й Ґв в®«мЄ® §­ зҐ­Ёп 0(гбЇҐе) Ё - 5(д ©« ­Ґ ­ ©¤Ґ­). - * €¬п д ©«  ¤®«¦­® Ўлвм «ЁЎ® ў д®а¬ вҐ 8+3 бЁ¬ў®«®ў (ЇҐаўлҐ - 8 бЁ¬ў®«®ў - б®Ўб⢥­­® Ё¬п, Ї®б«Ґ¤­ЁҐ 3 - а биЁаҐ­ЁҐ, - Є®а®вЄЁҐ Ё¬Ґ­  Ё а биЁаҐ­Ёп ¤®Ї®«­повбп Їа®ЎҐ« ¬Ё), - «ЁЎ® ў д®а¬ вҐ 8.3 бЁ¬ў®«®ў "FILE.EXT"/"FILE.EX " - (Ё¬п ­Ґ Ў®«ҐҐ 8 бЁ¬ў®«®ў, в®зЄ , а биЁаҐ­ЁҐ 3 бЁ¬ў®« , - ¤®Ї®«­Ґ­­®Ґ ЇаЁ ­Ґ®Ўе®¤Ё¬®бвЁ Їа®ЎҐ« ¬Ё). - €¬п д ©«  ¤®«¦­® Ўлвм § ЇЁб ­® § Ј« ў­л¬Ё ЎгЄў ¬Ё. - ‡ ўҐаи ойЁ© бЁ¬ў®« б Є®¤®¬ 0 ­Ґ ­г¦Ґ­ (­Ґ ASCIIZ-бва®Є ). - * ќв  дг­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґв Ї Ї®Є ­  а ¬¤ЁбЄҐ. - -====================================================================== -=============== ”г­ЄжЁп 33 - § ЇЁб вм д ©« ­  а ¬¤ЁбЄ. =============== -====================================================================== -Џ а ¬Ґвал: - * eax = 33 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё¬п д ©«  - * ecx = гЄ § вҐ«м ­  ¤ ­­лҐ ¤«п § ЇЁбЁ - * edx = зЁб«® Ў ©в ¤«п § ЇЁбЁ - * б«Ґ¤гҐв гбв ­ ў«Ёў вм esi=0 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л -‡ ¬Ґз ­Ёп: - * ќв  дг­ЄжЁп гбв аҐ« ; дг­ЄжЁп 70 Ї®§ў®«пҐв ўлЇ®«­пвм - ⥠¦Ґ ¤Ґ©бвўЁп б а биЁаҐ­­л¬Ё ў®§¬®¦­®бвп¬Ё. - * …б«Ё гЄ § вм ­Ґ­г«Ґў®Ґ §­ зҐ­ЁҐ ў esi Ё ­  а ¬¤ЁбЄҐ 㦥 Ґбвм - гЄ § ­­л© д ©«, в® Ўг¤Ґв ᮧ¤ ­ Ґйс ®¤Ё­ д ©« б ⥬ ¦Ґ Ё¬Ґ­Ґ¬. - * ‚ Їа®вЁў­®¬ б«гз Ґ д ©« ЇҐаҐ§ ЇЁблў Ґвбп. - * €¬п д ©«  ¤®«¦­® Ўлвм «ЁЎ® ў д®а¬ вҐ 8+3 бЁ¬ў®«®ў - (ЇҐаўлҐ 8 бЁ¬ў®«®ў - б®Ўб⢥­­® Ё¬п, Ї®б«Ґ¤­ЁҐ 3 - а биЁаҐ­ЁҐ, - Є®а®вЄЁҐ Ё¬Ґ­  Ё а биЁаҐ­Ёп ¤®Ї®«­повбп Їа®ЎҐ« ¬Ё), - «ЁЎ® ў д®а¬ вҐ 8.3 бЁ¬ў®«®ў "FILE.EXT"/"FILE.EX " - (Ё¬п ­Ґ Ў®«ҐҐ 8 бЁ¬ў®«®ў, в®зЄ , а биЁаҐ­ЁҐ 3 бЁ¬ў®« , - ¤®Ї®«­Ґ­­®Ґ ЇаЁ ­Ґ®Ўе®¤Ё¬®бвЁ Їа®ЎҐ« ¬Ё). - €¬п д ©«  ¤®«¦­® Ўлвм § ЇЁб ­® § Ј« ў­л¬Ё ЎгЄў ¬Ё. - ‡ ўҐаи ойЁ© бЁ¬ў®« б Є®¤®¬ 0 ­Ґ ­г¦Ґ­ (­Ґ ASCIIZ-бва®Є ). - * ќв  дг­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґв Ї Ї®Є ­  а ¬¤ЁбЄҐ. - -====================================================================== -============ ”г­ЄжЁп 35 - Їа®зЁв вм 梥в в®зЄЁ ­  нЄа ­Ґ. ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 35 - * ebx = y*xsize+x, Ј¤Ґ - * (x,y) = Є®®а¤Ё­ вл в®зЄЁ (бзЁв п ®в 0) - * xsize = а §¬Ґа нЄа ­  Ї® Ј®аЁ§®­в «Ё -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 梥в 0x00RRGGBB -‡ ¬Ґз ­Ёп: - * “§­ вм а §¬Ґал нЄа ­  ¬®¦­® ўл§®ў®¬ дг­ЄжЁЁ 14. ЋЎа вЁвҐ ў­Ё¬ ­ЁҐ, - зв® ®­  ўлзЁв Ґв 1 Ё§ ®Ў®Ёе а §¬Ґа®ў. - * Љ ўЁ¤Ґ®Ї ¬пвЁ Ґбвм в Є¦Ґ Їаאַ© ¤®бвгЇ (ЎҐ§ ўл§®ў®ў бЁб⥬­ле - дг­ЄжЁ©) зҐаҐ§ ᥫҐЄв®а gs. Џ а ¬Ґвал ⥪г饣® ўЁ¤Ґ®аҐ¦Ё¬  - ¬®¦­® Ї®«гзЁвм дг­ЄжЁҐ© 61. - -====================================================================== -=============== ”г­ЄжЁп 36 - Їа®зЁв вм ®Ў« бвм нЄа ­ . =============== -====================================================================== -Џ а ¬Ґвал: - * eax = 36 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  ЇаҐ¤ў аЁвҐ«м­® ўл¤Ґ«Ґ­­го ®Ў« бвм Ї ¬пвЁ, - Єг¤  Ўг¤Ґв Ї®¬ҐйҐ­® Ё§®Ўа ¦Ґ­ЁҐ ў д®а¬ вҐ BBGGRRBBGGRR... - * ecx = [а §¬Ґа Ї® ®бЁ x]*65536 + [а §¬Ґа Ї® ®бЁ y] - * edx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [Є®®а¤Ё­ в  Ї® ®бЁ y] -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Љ®®а¤Ё­ вл ®Ў« бвЁ - нв® Є®®а¤Ё­ вл ўҐае­ҐЈ® «Ґў®Ј® гЈ«  - ®Ў« бвЁ ®в­®бЁвҐ«м­® нЄа ­ . - * ђ §¬Ґа Ё§®Ўа ¦Ґ­Ёп ў Ў ©в е Ґбвм 3*xsize*ysize. - -====================================================================== -==================== ”г­ЄжЁп 37 - а Ў®в  б ¬лимо. ==================== -====================================================================== - --------------- Џ®¤дг­ЄжЁп 0 - нЄа ­­лҐ Є®®а¤Ё­ вл ¬лиЁ --------------- -Џ а ¬Ґвал: - * eax = 37 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = x*65536 + y, (x,y)=Є®®а¤Ё­ вл Єгаб®а  ¬лиЁ (бзЁв п ®в 0) - ----------- Џ®¤дг­ЄжЁп 1 - Є®®а¤Ё­ вл ¬лиЁ ®в­®бЁвҐ«м­® ®Є­  ---------- -Џ а ¬Ґвал: - * eax = 37 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = x*65536 + y, (x,y)=Є®®а¤Ё­ вл Єгаб®а  ¬лиЁ ®в­®бЁвҐ«м­® - ®Є­  ЇаЁ«®¦Ґ­Ёп (бзЁв п ®в 0) -‡ ¬Ґз ­Ёп: - * ‡­ зҐ­ЁҐ ўлзЁб«пҐвбп Ї® д®а¬г«Ґ (x-xwnd)*65536 + (y-ywnd). - …б«Ё y>=ywnd, в® ¬« ¤иҐҐ б«®ў® ­Ґ®ваЁж вҐ«м­® Ё ᮤҐа¦Ёв - ®в­®бЁвҐ«м­го y-Є®®а¤Ё­ вг,   бв а襥 - ®в­®бЁвҐ«м­го x-Є®®а¤Ё­ вг - (Їа ўЁ«м­®Ј® §­ Є ). ‚ Їа®вЁў­®¬ б«гз Ґ ¬« ¤иҐҐ б«®ў® ®ваЁж вҐ«м­® - Ё ўбс а ў­® ᮤҐа¦Ёв ®в­®бЁвҐ«м­го y-Є®®а¤Ё­ вг, -   Є бв а襬г б«®ўг б«Ґ¤гҐв ЇаЁЎ ўЁвм 1. - ------------------ Џ®¤дг­ЄжЁп 2 - ­ ¦ влҐ Є­®ЇЄЁ ¬лиЁ ----------------- -Џ а ¬Ґвал: - * eax = 37 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax ᮤҐа¦Ёв Ё­д®а¬ жЁо ® ­ ¦ вле Є­®ЇЄ е ¬лиЁ: - * ЎЁв 0 гбв ­®ў«Ґ­ = «Ґў п Є­®ЇЄ  ­ ¦ в  - * ЎЁв 1 гбв ­®ў«Ґ­ = Їа ў п Є­®ЇЄ  ­ ¦ в  - * ЎЁв 2 гбв ­®ў«Ґ­ = б।­пп Є­®ЇЄ  ­ ¦ в  - * ЎЁв 3 гбв ­®ў«Ґ­ = 4-п Є­®ЇЄ  ­ ¦ в  - * ЎЁв 4 гбв ­®ў«Ґ­ = 5-п Є­®ЇЄ  ­ ¦ в  - * Їа®зЁҐ ЎЁвл бЎа®иҐ­л - ------------------- Џ®¤дг­ЄжЁп 4 - § Јаг§Ёвм Єгаб®а ------------------- -Џ а ¬Ґвал: - * eax = 37 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * dx = Ёбв®з­ЁЄ ¤ ­­ле: - * dx = LOAD_FROM_FILE = 0 - ¤ ­­лҐ ў д ©«Ґ - * ecx = гЄ § вҐ«м ­  Ї®«­л© Їгвм Є д ©«г Єгаб®а  - * д ©« Єгаб®а  ¤®«¦Ґ­ Ўлвм ў д®а¬ вҐ .cur, бв ­¤ ав­®¬ ¤«п - MS Windows, ЇаЁзс¬ а §¬Ґа®¬ 32*32 ЇЁЄбҐ«п - * dx = LOAD_FROM_MEM = 1 - ¤ ­­лҐ д ©«  㦥 § Ја㦥­л ў Ї ¬пвм - * ecx = гЄ § вҐ«м ­  ¤ ­­лҐ д ©«  Єгаб®а  - * д®а¬ в ¤ ­­ле в Є®© ¦Ґ, Є Є Ё ў ЇаҐ¤л¤г饬 б«гз Ґ - * dx = LOAD_INDIRECT = 2 - ¤ ­­лҐ ў Ї ¬пвЁ - * ecx = гЄ § вҐ«м ­  ®Ўа § Єгаб®а  ў д®а¬ вҐ ARGB 32*32 ЇЁЄбҐ«п - * edx = 0xXXYY0002, Ј¤Ґ - * XX = x-Є®®а¤Ё­ в  "Ј®ап祩 в®зЄЁ" Єгаб®а  - * YY = y-Є®®а¤Ё­ в  - * 0 <= XX, YY <= 31 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ­Ґг¤ з  - * Ё­ зҐ eax = ен­¤« Єгаб®а  - ------------------- Џ®¤дг­ЄжЁп 5 - гбв ­®ўЁвм Єгаб®а ------------------ -“бв ­ ў«Ёў Ґв ­®ўл© Єгаб®а ¤«п ®Є­  ⥪г饣® Ї®в®Є . -Џ а ¬Ґвал: - * eax = 37 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« Єгаб®а  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ен­¤« ЇаҐ¤л¤г饣® гбв ­®ў«Ґ­­®Ј® Єгаб®а  -‡ ¬Ґз ­Ёп: - * …б«Ё ЇҐаҐ¤ ­ ­ҐЄ®а४в­л© ен­¤«, в® дг­ЄжЁп ў®ббв ­®ўЁв Єгаб®а - Ї® 㬮«з ­Ёо (бв ­¤ ав­го бв५Єг). ‚ з бв­®бвЁ, Є ў®ббв ­®ў«Ґ­Ёо - Єгаб®а  Ї® 㬮«з ­Ёо ЇаЁў®¤Ёв ЇҐаҐ¤ з  ecx=0. - -------------------- Џ®¤дг­ЄжЁп 6 - г¤ «Ёвм Єгаб®а -------------------- -Џ а ¬Ґвал: - * eax = 37 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« Єгаб®а  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * Љгаб®а ¤®«¦Ґ­ Ўл« Ўлвм а ­ҐҐ § Ја㦥­ ⥪гйЁ¬ Ї®в®Є®¬ - (ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 4). ”г­ЄжЁп ­Ґ г¤ «пҐв бЁб⥬­лҐ Єгаб®ал Ё - Єгаб®ал, § Ја㦥­­лҐ ¤агЈЁ¬Ё ЇаЁ«®¦Ґ­Ёп¬Ё. - * …б«Ё г¤ «пҐвбп  ЄвЁў­л© (гбв ­®ў«Ґ­­л© Ї®¤дг­ЄжЁҐ© 5) Єгаб®а, в® - ў®ббв ­ ў«Ёў Ґвбп Єгаб®а Ї® 㬮«з ­Ёо (бв ­¤ ав­ п бв५Є ). - ------------------- Џ®¤дг­ЄжЁп 7 - ¤ ­­лҐ Їа®ЄагвЄЁ ------------------- -Џ а ¬Ґвал: - * eax = 37 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = [horizontal offset]*65536 + [vertical offset] -‡ ¬Ґз ­Ёп: - * „ ­­лҐ ¤®бвгЇ­л в®«мЄ®  ЄвЁў­®¬г ®Є­г. - * Џ®б«Ґ Їа®з⥭Ёп §­ зҐ­Ёп ®Ў­г«повбп. - * „ ­­лҐ Ё¬Ґов §­ Є®ўлҐ §­ зҐ­Ёп. - -====================================================================== -================== ”г­ЄжЁп 38 - ­ аЁб®ў вм ®в१®Є. ================== -====================================================================== -Џ а ¬Ґвал: - * eax = 38 - ­®¬Ґа дг­ЄжЁЁ - * ebx = [Є®®а¤Ё­ в  ­ з «  Ї® ®бЁ x]*65536 + - [Є®®а¤Ё­ в  Є®­ж  Ї® ®бЁ x] - * ecx = [Є®®а¤Ё­ в  ­ з «  Ї® ®бЁ y]*65536 + - [Є®®а¤Ё­ в  Є®­ж  Ї® ®бЁ y] - * edx = 0x00RRGGBB - 梥в - edx = 0x01xxxxxx - аЁб®ў вм Ё­ўҐаб­л© ®в१®Є - (¬« ¤иЁҐ 24 ЎЁв  ЁЈ­®аЁаговбп) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Љ®®а¤Ё­ вл ЎҐагвбп ®в­®бЁвҐ«м­® ®Є­ . - * Љ®­Ґз­ п в®зЄ  в Є¦Ґ аЁбгҐвбп. - -====================================================================== -== ”г­ЄжЁп 39, Ї®¤дг­ЄжЁп 1 - Ї®«гзЁвм а §¬Ґа д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп. == -====================================================================== -Џ а ¬Ґвал: - * eax = 39 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = [иЁаЁ­ ]*65536 + [ўлб®в ] -‡ ¬Ґз ­Ёп: - * …бвм Ї а­ п Є®¬ ­¤  гбв ­®ўЄЁ а §¬Ґа®ў д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп - - Ї®¤дг­ЄжЁп 1 дг­ЄжЁЁ 15. Џ®б«Ґ Є®в®а®©, ࠧ㬥Ґвбп, б«Ґ¤гҐв - § ­®ў® ®ЇаҐ¤Ґ«Ёвм б ¬® Ё§®Ўа ¦Ґ­ЁҐ. - -====================================================================== -= ”г­ЄжЁп 39, Ї®¤дг­ЄжЁп 2 - Їа®зЁв вм в®зЄг б д®­®ў®Ј® Ё§®Ўа ¦Ґ­Ёп. = -====================================================================== -Џ а ¬Ґвал: - * eax = 39 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ᬥ饭ЁҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0x00RRGGBB - 梥в в®зЄЁ, Ґб«Ё ᬥ饭ЁҐ ¤®ЇгбвЁ¬® - (¬Ґ­миҐ 0x160000-16) - * eax = 2 - Ё­ зҐ -‡ ¬Ґз ­Ёп: - * ЌҐ б«Ґ¤гҐв Ї®« Ј вмбп ­  ў®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ ў б«гз Ґ ­ҐўҐа­®Ј® - ᬥ饭Ёп, ®­® ¬®¦Ґв Ё§¬Ґ­Ёвмбп ў б«Ґ¤гойЁе ўҐабЁпе п¤а . - * ‘¬ҐйҐ­ЁҐ в®зЄЁ б Є®®а¤Ё­ в ¬Ё (x,y) ўлзЁб«пҐвбп Є Є (x+y*xsize)*3. - * …бвм Ї а­ п дг­ЄжЁп гбв ­®ўЄЁ в®зЄЁ ­  д®­®ў®¬ Ё§®Ўа ¦Ґ­ЁЁ - - Ї®¤дг­ЄжЁп 2 дг­ЄжЁЁ 15. - -====================================================================== -====== ”г­ЄжЁп 39, Ї®¤дг­ЄжЁп 4 - Ї®«гзЁвм ०Ё¬ ®ваЁб®ўЄЁ д®­ . ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 39 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 1 - § ¬®бвЁвм - * eax = 2 - а бвп­гвм -‡ ¬Ґз ­Ёп: - * …бвм Ї а­ п дг­ЄжЁп гбв ­®ўЄЁ ०Ё¬  ®ваЁб®ўЄЁ д®­  - - Ї®¤дг­ЄжЁп 4 дг­ЄжЁЁ 15. - -====================================================================== -======== ”г­ЄжЁп 40 - гбв ­®ўЁвм ¬ бЄг ¤«п ®¦Ё¤ Ґ¬ле б®ЎлвЁ©. ======== -====================================================================== -Њ бЄ  ¤«п ®¦Ё¤ Ґ¬ле б®ЎлвЁ© ў«ЁпҐв ­  дг­ЄжЁЁ а Ў®вл б б®ЎлвЁп¬Ё 10, -11, 23 - ®­Ё б®®Ўй ов в®«мЄ® ® б®ЎлвЁпе, а §аҐис­­ле нв®© ¬ бЄ®©. -Џ а ¬Ґвал: - * eax = 40 - ­®¬Ґа дг­ЄжЁЁ - * ebx = ¬ бЄ : ЎЁв i ᮮ⢥вбвўгҐв б®ЎлвЁо i+1 (б¬. бЇЁб®Є б®ЎлвЁ©) - (гбв ­®ў«Ґ­­л© ЎЁв а §аҐи Ґв Ё§ўҐйҐ­ЁҐ ® б®ЎлвЁЁ) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Њ бЄ  Ї® 㬮«з ­Ёо (7=111b) а §аҐи Ґв Ё§ўҐйҐ­Ёп ® ЇҐаҐаЁб®ўЄҐ - Ё ­ ¦ вЁпе Є« ўЁи Ё Є­®Ї®Є. - ќв®Ј® ¤®бв в®з­® ¤«п Ў®«миЁ­бвў  ЇаЁ«®¦Ґ­Ё©. - * ‘®ЎлвЁп, § ЇаҐйс­­лҐ ў ¬ бЄҐ, ўбс а ў­® б®еа ­повбп, Ґб«Ё - ЇаЁе®¤пв; ® ­Ёе Їа®бв® ­Ґ Ё§ўҐй ов дг­ЄжЁЁ а Ў®вл б б®ЎлвЁп¬Ё. - * ”г­ЄжЁЁ а Ў®вл б б®ЎлвЁп¬Ё гзЁвлў ов ¬ бЄг ­  ¬®¬Ґ­в - ўл§®ў  дг­ЄжЁЁ,   ­Ґ ­  ¬®¬Ґ­в Ї®бвгЇ«Ґ­Ёп б®®ЎйҐ­Ёп. - -====================================================================== -================= ”г­ЄжЁп 41 - г§­ вм ў« ¤Ґ«мж  IRQ. ================= -====================================================================== -Џ а ¬Ґвал: - * eax = 41 - ­®¬Ґа дг­ЄжЁЁ - * ebx = ­®¬Ґа IRQ, 0..15 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = PID ў« ¤Ґ«мж  - * eax = 0, Ґб«Ё ў« ¤Ґ«мж  ­Ґв - * eax = -1 ¤«п ­ҐЄ®а४⭮Ј® ebx - -====================================================================== -========= ”г­ЄжЁп 42 - а Ў®в  б ¤ ­­л¬Ё, Ї®«г祭­л¬Ё Ї® IRQ. ========= -====================================================================== -ЏаЁ ў®§­ЁЄ­®ўҐ­ЁЁ IRQ бЁб⥬  ¬®¦Ґв бзЁвлў вм ¤ ­­лҐ Ё§ гЄ § ­­ле -а ­ҐҐ дг­ЄжЁҐ© 44 Ї®ав®ў Ё § ЇЁблў вм нвЁ ¤ ­­лҐ ў ЎгдҐа. - --------------------- Џ®¤дг­ЄжЁп 0 - з⥭ЁҐ ¤ ­­ле -------------------- -Џ а ¬Ґвал: - * eax = 42 - ­®¬Ґа дг­ЄжЁЁ - * bl = ­®¬Ґа IRQ, 0..15 - * bh = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ®бв «м­ п з бвм ॣЁбва  ebx ¤®«¦­  Ўлвм ®Ў­г«Ґ­  - * ecx = гЄ § вҐ«м ­  ЎгдҐа а §¬Ґа®¬ ­Ґ ¬Ґ­ҐҐ 4000 Ў ©в -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: (бЁвг жЁо ¬®¦­® а §«ЁзЁвм Ї® §­ зҐ­Ёо eax) - * Ґб«Ё Ї®в®Є ­Ґ пў«пҐвбп ў« ¤Ґ«м楬 IRQ - (Ё«Ё ­®¬Ґа IRQ § ¤ ­ ­ҐўҐа­®): eax = -1 - * Ґб«Ё ¤ ­­ле ­Ґв: eax = 0 - * Ґб«Ё ўбс ў Ї®ап¤ЄҐ Ё ¤ ­­лҐ Ўл«Ё: - eax = а §¬Ґа ¤ ­­ле, Їа®зЁв ­­ле Ё§ ЎгдҐа  (ў Ў ©в е) - ------------- Џ®¤дг­ЄжЁп 1 - г§­ вм а §¬Ґа ¤ ­­ле ў ЎгдҐаҐ ------------ -Џ а ¬Ґвал: - * eax = 42 - ­®¬Ґа дг­ЄжЁЁ - * bl = ­®¬Ґа IRQ, 0..15 - * bh = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ®бв «м­ п з бвм ॣЁбва  ebx ¤®«¦­  Ўлвм ®Ў­г«Ґ­  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё Ї®в®Є ­Ґ пў«пҐвбп ў« ¤Ґ«м楬 IRQ - (Ё«Ё ­®¬Ґа IRQ § ¤ ­ ­ҐўҐа­®): eax = -1 - * Ё­ зҐ eax = а §¬Ґа ¤ ­­ле ў ЎгдҐаҐ -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® Ї®в®Є ¤®«¦Ґ­ § аҐ§ҐаўЁа®ў вм ¤«п ᥡп гЄ § ­­л© IRQ - дг­ЄжЁҐ© 45. - * ђ §¬Ґа ЎгдҐа  ¤«п ¤ ­­ле - 4000 Ў ©в, ЇаЁ ЇҐаҐЇ®«­Ґ­ЁЁ - "ᢥ¦ЁҐ" ¤ ­­лҐ ЇҐаҐбв ов § ЇЁблў вмбп ў ЎгдҐа. - -====================================================================== -=================== ”г­ЄжЁп 43 - ўў®¤/ўлў®¤ ў Ї®ав. ================== -====================================================================== - ------------------------- ‚лў®¤ ¤ ­­ле ў Ї®ав ------------------------- -Џ а ¬Ґвал: - * eax = 43 - ­®¬Ґа дг­ЄжЁЁ - * bl = Ў ©в ¤«п ўлў®¤  - * ecx = ­®¬Ґа Ї®ав  0xnnnn (®в 0 ¤® 0xFFFF) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - Ї®в®Є ­Ґ § аҐ§ҐаўЁа®ў « гЄ § ­­л© Ї®ав - ------------------------- ‚ў®¤ ¤ ­­ле Ё§ Ї®ав  ------------------------ -Џ а ¬Ґвал: - * eax = 43 - ­®¬Ґа дг­ЄжЁЁ - * ebx ЁЈ­®аЁагҐвбп - * ecx = 0x8000nnnn, Ј¤Ґ nnnn = ­®¬Ґа Ї®ав  (®в 0 ¤® 0xFFFF) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, ЇаЁ н⮬ ebx = ўўҐ¤с­­л© Ў ©в - * eax = 1 - Ї®в®Є ­Ґ § аҐ§ҐаўЁа®ў « ¤ ­­л© Ї®ав -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® Ї®в®Є ¤®«¦Ґ­ § аҐ§ҐаўЁа®ў вм §  б®Ў®© - гЄ § ­­л© Ї®ав дг­ЄжЁҐ© 46. - * „«п § аҐ§ҐаўЁа®ў ­­ле Ї®ав®ў ў¬Ґбв® ўл§®ў  нвЁе дг­ЄжЁ© - «гзиҐ ЁбЇ®«м§®ў вм Є®¬ ­¤л Їа®жҐбб®а  in/out - нв® §­ зЁвҐ«м­® - Ўлбв॥ Ё ­ҐбЄ®«мЄ® Є®а®зҐ Ё Їа®йҐ. €§ ­Ґ§ аҐ§ҐаўЁа®ў ­­ле - Ї®ав®ў зЁв вм ўбс а ў­® ­Ґ«м§п. - -====================================================================== -======== ”г­ЄжЁп 44 - ®ЇаҐ¤Ґ«Ёвм ¤Ґ©бвўЁп ЇаЁ Ї®бвгЇ«Ґ­ЁЁ IRQ. ======= -====================================================================== -ЏаЁ ў®§­ЁЄ­®ўҐ­ЁЁ IRQ бЁб⥬  ¬®¦Ґв бзЁвлў вм ¤ ­­лҐ Ё§ гЄ § ­­ле нв®© -дг­ЄжЁҐ© Ї®ав®ў Ё § ЇЁблў вм нвЁ ¤ ­­лҐ ў ЎгдҐа, ®вЄг¤  Ёе ¬®¦­® -Їа®зЁв вм дг­ЄжЁҐ© 42. -Џ а ¬Ґвал: - * eax = 44 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  ¬ ббЁў бвагЄвга, ®ЇЁблў ойЁе Ї® ®¤­®¬г Ї®авг: - * +0: word: 0 ®§­ з Ґв Є®­Ґж ¬ ббЁў , Ё­ зҐ ­®¬Ґа Ї®ав  - * +2: byte: § аҐ§ҐаўЁа®ў ­® (ЁЈ­®аЁагҐвбп) - * +3: byte: 1=бзЁвлў вм Ў ©в Ё§ нв®Ј® Ї®ав , 2=бзЁвлў вм б«®ў® - * ecx = ­®¬Ґа IRQ, 0..15 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - Ї®в®Є ­Ґ пў«пҐвбп ў« ¤Ґ«м楬 гЄ § ­­®Ј® IRQ -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® Ї®в®Є ¤®«¦Ґ­ § аҐ§ҐаўЁа®ў вм §  б®Ў®© - гЄ §лў Ґ¬л© IRQ дг­ЄжЁҐ© 45. - * ЏаЁ­Ё¬ овбп ў® ў­Ё¬ ­ЁҐ в®«мЄ® ЇҐаўлҐ 16 Ї®ав®ў. - * ’ҐЄгй п ॠ«Ё§ жЁп а бб¬ ваЁў Ґв ­ҐЇа ўЁ«м­®Ґ §­ зҐ­ЁҐ Ї®«п +3 - Є Є бЁЈ­ « ЇаҐЄа йҐ­Ёп ®Ўа Ў®вЄЁ IRQ. - -====================================================================== -============ ”г­ЄжЁп 45 - § аҐ§ҐаўЁа®ў вм/®бў®Ў®¤Ёвм IRQ. ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 45 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - § аҐ§ҐаўЁа®ў вм, 1 = ®бў®Ў®¤Ёвм - * ecx = ­®¬Ґа IRQ, 0..15 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ®иЁЎЄ  (­ҐўҐа­л© ­®¬Ґа IRQ Ё«Ё - Ї®ЇлвЄ  § аҐ§ҐаўЁа®ў вм ­Ґбў®Ў®¤­л© IRQ Ё«Ё ®бў®Ў®¤Ёвм IRQ, ­Ґ - § аҐ§ҐаўЁа®ў ­­л© ⥪гйЁ¬ Ї®в®Є®¬) -‡ ¬Ґз ­Ёп: - * ђҐ§ҐаўЁа®ў ­ЁҐ IRQ ­г¦­® ¤«п а Ў®вл дг­ЄжЁ© 42 Ё 44. - * ’®«мЄ® ®¤Ё­ Ї®в®Є ¬®¦Ґв § аҐ§ҐаўЁа®ў вм Є®­ЄаҐв­л© IRQ. - * IRQ, ®Ўа Ў влў Ґ¬лҐ бЁб⥬®© б ¬®бв®п⥫쭮, १ҐаўЁаговбп - бЁб⥬®© (Ї®в®Є®¬ 1) ЇаЁ § Јаг§ЄҐ. - * ЏаЁ § ўҐа襭ЁЁ Ї®в®Є   ўв®¬ вЁзҐбЄЁ ®бў®Ў®¦¤ овбп - ўбҐ § аҐ§ҐаўЁа®ў ­­лҐ Ё¬ IRQ. - -====================================================================== -= ”г­ЄжЁп 46 - § аҐ§ҐаўЁа®ў вм/®бў®Ў®¤Ёвм ЈагЇЇг Ї®ав®ў ўў®¤ /ўлў®¤ . -====================================================================== -Љ § аҐ§ҐаўЁа®ў ­­л¬ Ї®ав ¬ ¬®¦­® ®Ўа й вмбп ­ Їап¬го Ё§ ЇаЁ«®¦Ґ­Ёп -Є®¬ ­¤ ¬Ё in/out (४®¬Ґ­¤гҐ¬л© бЇ®б®Ў) Ё ўл§®ў®¬ дг­ЄжЁЁ 43 -(­ҐаҐЄ®¬Ґ­¤гҐ¬л© бЇ®б®Ў). -Џ а ¬Ґвал: - * eax = 46 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - § аҐ§ҐаўЁа®ў вм, 1 - ®бў®Ў®¤Ёвм - * ecx = ­®¬Ґа ­ з «  ¤Ё Ї §®­  Ї®ав®ў - * edx = ­®¬Ґа Є®­ж  ¤Ё Ї §®­  Ї®ав®ў (ўЄ«озЁвҐ«м­®) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ®иЁЎЄ  -‡ ¬Ґз ­Ёп: - * ‚ б«гз Ґ १ҐаўЁа®ў ­Ёп Ї®ав®ў ®иЁЎЄ®© бзЁв Ґвбп ўлЇ®«­Ґ­ЁҐ - ®¤­®Ј® Ё§ гб«®ўЁ©: - * ­ з «м­л©  ¤аҐб Ў®«миҐ Є®­Ґз­®Ј®; - * гЄ § ­­л© ¤Ё Ї §®­ ᮤҐа¦Ёв ­ҐЄ®а४в­л© ­®¬Ґа Ї®ав  - (Є®а४в­лҐ - ®в 0 ¤® 0xFFFF); - * ЇаҐўл襭® ®Ја ­ЁзҐ­ЁҐ ­  ®ЎйҐҐ зЁб«® § аҐ§ҐаўЁа®ў ­­ле ®Ў« б⥩ - - ¤®ЇгбЄ Ґвбп ¬ ЄбЁ¬г¬ 255; - * гЄ § ­­л© ¤Ё Ї §®­ ЇҐаҐбҐЄ Ґвбп б ®¤­Ё¬ Ё§ - а ­ҐҐ § аҐ§ҐаўЁа®ў ­­ле - * ‚ б«гз Ґ ®бў®Ў®¦¤Ґ­Ёп Ї®ав®ў ®иЁЎЄ®© бзЁв Ґвбп Ї®ЇлвЄ  - ®бў®Ў®¦¤Ґ­Ёп ¤Ё Ї §®­ , Є®в®ал© а ­ҐҐ ­Ґ Ўл« 楫ЁЄ®¬ - § аҐ§ҐаўЁа®ў ­ нв®© ¦Ґ дг­ЄжЁҐ© (б в ЄЁ¬Ё ¦Ґ §­ зҐ­Ёп¬Ё ecx,edx). - * ЏаЁ ®Ў­ а㦥­ЁЁ ®иЁЎЄЁ (ў ®Ў®Ёе б«гз пе) ­ЁЄ ЄЁе ¤Ґ©бвўЁ© - ­Ґ Їа®Ё§ў®¤Ёвбп. - * ЏаЁ § Јаг§ЄҐ бЁб⥬  १ҐаўЁагҐв §  б®Ў®© Ї®авл - 0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (ўЄ«озЁвҐ«м­®). - * ЏаЁ § ўҐа襭ЁЁ Ї®в®Є   ўв®¬ вЁзҐбЄЁ ®бў®Ў®¦¤ овбп ўбҐ - § аҐ§ҐаўЁа®ў ­­лҐ Ё¬ Ї®авл. - -====================================================================== -================= ”г­ЄжЁп 47 - ўлўҐбвЁ зЁб«® ў ®Є­®. ================= -====================================================================== -Џ а ¬Ґвал: - * eax = 47 - ­®¬Ґа дг­ЄжЁЁ - * ebx = Ї а ¬Ґвал ЇаҐ®Ўа §®ў ­Ёп зЁб«  ў ⥪бв: - * bl = 0 - ecx ᮤҐа¦Ёв зЁб«® - * bl = 1 - ecx ᮤҐа¦Ёв гЄ § вҐ«м ­  dword/qword-зЁб«® - * bh = 0 - ®в®Ўа ¦ вм ў ¤ҐбпвЁз­®© бЁб⥬Ґ бзЁб«Ґ­Ёп - * bh = 1 - ®в®Ўа ¦ вм ў иҐбв­ ¤ж вҐаЁз­®© бЁб⥬Ґ - * bh = 2 - ®в®Ўа ¦ вм ў ¤ў®Ёз­®© бЁб⥬Ґ - * ЎЁвл 16-21 = бЄ®«мЄ® жЁда ®в®Ўа ¦ вм - * ЎЁвл 22-29 § аҐ§ҐаўЁа®ў ­л Ё ¤®«¦­л Ўлвм гбв ­®ў«Ґ­л ў 0 - * ЎЁв 30 гбв ­®ў«Ґ­ = ўлў®¤Ёвм qword (64-ЎЁв­®Ґ зЁб«®); - ЇаЁ н⮬ ¤®«¦­® Ўлвм bl = 1 - * ЎЁв 31 гбв ­®ў«Ґ­ = ­Ґ ўлў®¤Ёвм ўҐ¤гйЁҐ ­г«Ё зЁб«  - * ecx = зЁб«® (ЇаЁ bl=0) Ё«Ё гЄ § вҐ«м (ЇаЁ bl=1) - * edx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [Є®®а¤Ё­ в  Ї® ®бЁ y] - * esi = 0xX0RRGGBB: - * RR, GG, BB § ¤ ов 梥в - * X = ABnn (ЎЁвл) - * nn = иаЁдв (0/1) - * A ЁЈ­®аЁагҐвбп - * B=1 - § Єа иЁў вм д®­ 梥⮬ edi -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * “Є § ­­ п ¤«Ё­  ­Ґ ¤®«¦­  ЇаҐў®б室Ёвм 60. - * ‚лў®¤Ёвбп а®ў­® гЄ § ­­®Ґ Є®«ЁзҐбвў® жЁда. …б«Ё зЁб«® ¬ «® Ё - ¬®¦Ґв Ўлвм § ЇЁб ­® ¬Ґ­миЁ¬ Є®«ЁзҐбвў®¬ жЁда, ®­® ¤®Ї®«­пҐвбп - ўҐ¤гйЁ¬Ё ­г«п¬Ё; Ґб«Ё зЁб«® ўҐ«ЁЄ® Ё ­Ґ ¬®¦Ґв Ўлвм § ЇЁб ­® - в ЄЁ¬ Є®«ЁзҐбвў®¬ жЁда, "«Ёи­ЁҐ" ўҐ¤гйЁҐ жЁдал ®ЎаҐ§ овбп. - * Џ а ¬Ґвал иаЁдв®ў гЄ § ­л ў ®ЇЁб ­ЁЁ дг­ЄжЁЁ 4 (ўлў®¤  ⥪бв ). - -====================================================================== -======= ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 0 - ЇаЁ¬Ґ­Ёвм ­ бва®©ЄЁ нЄа ­ . ======= -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 0 - § аҐ§ҐаўЁа®ў ­® -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп ЇҐаҐаЁб®ўлў Ґв нЄа ­ Ї®б«Ґ Ё§¬Ґ­Ґ­Ёп Ї а ¬Ґва®ў - Ї®¤дг­ЄжЁп¬Ё 1 Ё 2. - * ‚맮ў дг­ЄжЁЁ ЎҐ§ ЇаҐ¤иҐбвўгойЁе ўл§®ў®ў гЄ § ­­ле Ї®¤дг­ЄжЁ© - ЁЈ­®аЁагҐвбп. - * ‚맮ў дг­ЄжЁЁ б ­Ґ­г«Ґўл¬ ecx ЁЈ­®аЁагҐвбп. - -====================================================================== -========= ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 1 - гбв ­®ўЁвм бвЁ«м Є­®Ї®Є. ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = вЁЇ Є­®Ї®Є: - * 0 = Ї«®бЄЁҐ - * 1 = ®Ўкс¬­лҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џ®б«Ґ ўл§®ў  ®ЇЁблў Ґ¬®© дг­ЄжЁЁ б«Ґ¤гҐв ЇҐаҐаЁб®ў вм нЄа ­ - Ї®¤дг­ЄжЁҐ© 0. - * ’ЁЇ Є­®Ї®Є ў«ЁпҐв в®«мЄ® ­  Ёе Їа®аЁб®ўЄг дг­ЄжЁҐ© 8. - -====================================================================== -==== ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 2 - гбв ­®ўЁвм бв ­¤ ав­лҐ жўҐв  ®Є®­. === -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  в Ў«Ёжг 梥⮢ - * edx = а §¬Ґа в Ў«Ёжл 梥⮢ - (¤®«¦Ґ­ Ўлвм 40 Ў ©в ¤«п Ўг¤г饩 б®ў¬ҐбвЁ¬®бвЁ) -”®а¬ в в Ў«Ёжл 梥⮢ гЄ § ­ ў ®ЇЁб ­ЁЁ Ї®¤дг­ЄжЁЁ 3. -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џ®б«Ґ ўл§®ў  ®ЇЁблў Ґ¬®© дг­ЄжЁЁ б«Ґ¤гҐв ЇҐаҐаЁб®ў вм нЄа ­ - Ї®¤дг­ЄжЁҐ© 0. - * ’ Ў«Ёж  бв ­¤ ав­ле 梥⮢ ў«ЁпҐв в®«мЄ® ­  ЇаЁ«®¦Ґ­Ёп, - Є®в®алҐ нвг в Ў«Ёжг пў­л¬ ®Ўа §®¬ Ї®«гз ов (Ї®¤дг­ЄжЁҐ© 3) Ё - ЁбЇ®«м§гов (гЄ §лў п жўҐв  Ё§ ­Ґс ЇаЁ ўл§®ў е дг­ЄжЁ© аЁб®ў ­Ёп). - * ’ Ў«Ёж  бв ­¤ ав­ле 梥⮢ ўе®¤Ёв ў бЄЁ­ Ё гбв ­ ў«Ёў Ґвбп § ­®ў® - ЇаЁ гбв ­®ўЄҐ бЄЁ­  (Ї®¤дг­ЄжЁЁ 8). - * ’ Ў«Ёжг 梥⮢ ¬®¦­® Їа®б¬ ваЁў вм/Ё§¬Ґ­пвм Ё­вҐа ЄвЁў­® б Ї®¬®ймо - ЇаЁ«®¦Ґ­Ёп desktop. - -====================================================================== -===== ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 3 - Ї®«гзЁвм бв ­¤ ав­лҐ жўҐв  ®Є®­. ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ЎгдҐа а §¬Ґа®¬ edx Ў ©в, - Єг¤  Ўг¤Ґв § ЇЁб ­  в Ў«Ёж  - * edx = а §¬Ґа в Ў«Ёжл 梥⮢ - (¤®«¦Ґ­ Ўлвм 40 Ў ©в ¤«п Ўг¤г饩 б®ў¬ҐбвЁ¬®бвЁ) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -”®а¬ в в Ў«Ёжл 梥⮢: Є ¦¤л© н«Ґ¬Ґ­в - -dword-§­ зҐ­ЁҐ жўҐв  0x00RRGGBB - * +0: dword: frames - 梥в а ¬ЄЁ - * +4: dword: grab - 梥⠧ Ј®«®ўЄ  - * +8: dword: grab_button - 梥⠪­®ЇЄЁ ­  Ї®«®бҐ § Ј®«®ўЄ  - * +12 = +0xC: dword: grab_button_text - 梥в ⥪бв  ­  Є­®ЇЄҐ - ­  Ї®«®бҐ § Ј®«®ўЄ  - * +16 = +0x10: dword: grab_text - 梥в ⥪бв  ­  § Ј®«®ўЄҐ - * +20 = +0x14: dword: work - 梥в а Ў®зҐ© ®Ў« бвЁ - * +24 = +0x18: dword: work_button - 梥⠪­®ЇЄЁ ў а Ў®зҐ© ®Ў« бвЁ - * +28 = +0x1C: dword: work_button_text - 梥в ⥪бв  ­  Є­®ЇЄҐ - ў а Ў®зҐ© ®Ў« бвЁ - * +32 = +0x20: dword: work_text - 梥в ⥪бв  ў а Ў®зҐ© ®Ў« бвЁ - * +36 = +0x24: dword: work_graph - 梥⠣а дЁЄЁ ў а Ў®зҐ© ®Ў« бвЁ -‡ ¬Ґз ­Ёп: - * ‘вагЄвга  в Ў«Ёжл 梥⮢ ®ЇЁб ­  ў бв ­¤ ав­®¬ ўЄ«оз Ґ¬®¬ д ©«Ґ - macros.inc Ї®¤ ­ §ў ­ЁҐ¬ system_colors; ­ ЇаЁ¬Ґа, ¬®¦­® ЇЁб вм: - sc system_colors ; ®Ўкпў«Ґ­ЁҐ ЇҐаҐ¬Ґ­­®© - ... ; Ј¤Ґ-в® ­ ¤® ўл§ў вм - ; ®ЇЁблў Ґ¬го дг­ЄжЁо б ecx=sc - mov ecx, [sc.work_button_text] ; зЁв Ґ¬ 梥в ⥪бв  - ; ­  Є­®ЇЄҐ ў а Ў®зҐ© ®Ў« бвЁ - * €бЇ®«м§®ў ­ЁҐ/­ҐЁбЇ®«м§®ў ­ЁҐ нвЁе 梥⮢ - ¤Ґ«® ЁбЄ«озЁвҐ«м­® - б ¬®© Їа®Ја ¬¬л. „«п ЁбЇ®«м§®ў ­Ёп ­г¦­® Їа®бв® ЇаЁ ўл§®ўҐ дг­ЄжЁ© - аЁб®ў ­Ёп гЄ §лў вм 梥в, ў§пвл© Ё§ нв®© в Ў«Ёжл. - * ЏаЁ Ё§¬Ґ­Ґ­ЁЁ в Ў«Ёжл бв ­¤ ав­ле 梥⮢ (Ї®¤дг­ЄжЁҐ© 2 б - Ї®б«Ґ¤гойЁ¬ ЇаЁ¬Ґ­Ґ­ЁҐ¬ Ё§¬Ґ­Ґ­Ё© Ї®¤дг­ЄжЁҐ© 0 Ё«Ё - ЇаЁ гбв ­®ўЄҐ бЄЁ­  Ї®¤дг­ЄжЁҐ© 8) ўбҐ¬ ®Є­ ¬ Ї®бл« Ґвбп б®®ЎйҐ­ЁҐ - ® ­Ґ®Ўе®¤Ё¬®бвЁ ЇҐаҐаЁб®ўЄЁ (б®ЎлвЁҐ б Є®¤®¬ 1). - * ‘в ­¤ ав­лҐ жўҐв  ¬®¦­® Їа®б¬ ваЁў вм/Ё§¬Ґ­пвм Ё­вҐа ЄвЁў­® - б Ї®¬®ймо ЇаЁ«®¦Ґ­Ёп desktop. - -====================================================================== -========== ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 4 - Ї®«гзЁвм ўлб®вг бЄЁ­ . ========= -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ўлб®в  бЄЁ­  -‡ ¬Ґз ­Ёп: - * ‚лб®в®© бЄЁ­  Ї® ®ЇаҐ¤Ґ«Ґ­Ёо бзЁв Ґвбп ўлб®в  § Ј®«®ўЄ  ®Є®­, - ЁбЇ®«м§гойЁе бЄЁ­. - * ‘¬®ваЁ в Є¦Ґ ®Ўйго бвагЄвгаг ®Є­  ў ®ЇЁб ­ЁЁ дг­ЄжЁЁ 0. - -====================================================================== -===== ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 5 - Ї®«гзЁвм а Ў®зго ®Ў« бвм нЄа ­ . ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = [left]*65536 + [right] - * ebx = [top]*65536 + [bottom] -‡ ¬Ґз ­Ёп: - * ђ Ў®з п ®Ў« бвм нЄа ­  ®ЇаҐ¤Ґ«пҐв Ї®«®¦Ґ­ЁҐ Ё Є®®а¤Ё­ вл - ¬ ЄбЁ¬Ё§Ёа®ў ­­®Ј® ®Є­ . - * ђ Ў®з п ®Ў« бвм нЄа ­  ЇаЁ ­®а¬ «м­®© а Ў®вҐ Ґбвм ўҐбм нЄа ­ - §  ўлзҐв®¬ Ї ­Ґ«Ё (@panel). - * (left,top) - Є®®а¤Ё­ вл «Ґў®Ј® ўҐае­ҐЈ® гЈ« , - (right,bottom) - Є®®а¤Ё­ вл Їа ў®Ј® ­Ё¦­ҐЈ®. - ’ ЄЁ¬ ®Ўа §®¬, а §¬Ґа а Ў®зҐ© ®Ў« бвЁ Ї® ®бЁ x ®ЇаҐ¤Ґ«пҐвбп - д®а¬г«®© right-left+1, Ї® ®бЁ y - д®а¬г«®© bottom-right+1. - * ‘¬®ваЁ в Є¦Ґ дг­ЄжЁо 14, - Ї®§ў®«пойго ®ЇаҐ¤Ґ«Ёвм а §¬Ґал ўбҐЈ® нЄа ­ . - * …бвм Ї а­ п дг­ЄжЁп гбв ­®ўЄЁ а Ў®зҐ© ®Ў« бвЁ - Ї®¤дг­ЄжЁп 6. - -====================================================================== -==== ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 6 - гбв ­®ўЁвм а Ў®зго ®Ў« бвм нЄа ­ . === -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = [left]*65536 + [right] - * edx = [top]*65536 + [bottom] -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ђ Ў®з п ®Ў« бвм нЄа ­  ®ЇаҐ¤Ґ«пҐв Ї®«®¦Ґ­ЁҐ Ё Є®®а¤Ё­ вл - ¬ ЄбЁ¬Ё§Ёа®ў ­­®Ј® ®Є­ . - * ќв  дг­ЄжЁп ЁбЇ®«м§гҐвбп в®«мЄ® ЇаЁ«®¦Ґ­ЁҐ¬ @panel, - гбв ­ ў«Ёў ойЁ¬ а Ў®зҐ© ®Ў« бвмо ўҐбм нЄа ­ §  ўлзҐв®¬ Ї ­Ґ«Ё. - * (left,top) - Є®®а¤Ё­ вл «Ґў®Ј® ўҐае­ҐЈ® гЈ« , - (right,bottom) - Є®®а¤Ё­ вл Їа ў®Ј® ­Ё¦­ҐЈ®. - ’ ЄЁ¬ ®Ўа §®¬, а §¬Ґа а Ў®зҐ© ®Ў« бвЁ Ї® ®бЁ x ®ЇаҐ¤Ґ«пҐвбп - д®а¬г«®© right-left+1, Ї® ®бЁ y - д®а¬г«®© bottom-right+1. - * …б«Ё left>=right, в® x-Є®®а¤Ё­ вл а Ў®зҐ© ®Ў« бвЁ ­Ґ Ё§¬Ґ­повбп. - …б«Ё left<0, в® left ­Ґ гбв ­ ў«Ёў Ґвбп. …б«Ё right Ў®«миҐ - Ё«Ё а ў­® иЁаЁ­л нЄа ­ , в® right ­Ґ гбв ­ ў«Ёў Ґвбп. - Ђ­ «®ЈЁз­® Ї® ®бЁ y. - * ‘¬®ваЁ в Є¦Ґ дг­ЄжЁо 14, - Ї®§ў®«пойго ®ЇаҐ¤Ґ«Ёвм а §¬Ґал ўбҐЈ® нЄа ­ . - * …бвм Ї а­ п дг­ЄжЁп Ї®«г祭Ёп а Ў®зҐ© ®Ў« бвЁ - - Ї®¤дг­ЄжЁп 5. - * ќв  дг­ЄжЁп  ўв®¬ вЁзҐбЄЁ ЇҐаҐаЁб®ўлў Ґв нЄа ­, Ї® 室㠤Ґ«  - ®Ў­®ў«пҐв Є®®а¤Ё­ вл Ё а §¬Ґал ¬ ЄбЁ¬Ё§Ёа®ў ­­ле ®Є®­. - ‚ᥠ®Є­  Ё§ўҐй овбп ® ­Ґ®Ўе®¤Ё¬®бвЁ ЇҐаҐаЁб®ўЄЁ (б®ЎлвЁҐ 1). - -====================================================================== -====================== ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 7 ====================== -============ Џ®«гзЁвм ®Ў« бвм бЄЁ­  ¤«п ⥪бв  § Ј®«®ўЄ . ============ -====================================================================== -‚®§ўа й Ґв ®Ў« бвм § Ј®«®ўЄ  ®Є­  б® бЄЁ­®¬, ЇаҐ¤­ §­ зҐ­­го -¤«п ўлў®¤  ⥪бв  § Ј®«®ўЄ . -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 7 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = [left]*65536 + [right] - * ebx = [top]*65536 + [bottom] -‡ ¬Ґз ­Ёп: - * €бЇ®«м§®ў ­ЁҐ/­ҐЁбЇ®«м§®ў ­ЁҐ нв®© дг­ЄжЁЁ - - «Ёз­®Ґ ¤Ґ«® ЇаЁ«®¦Ґ­Ёп. - * ђҐЄ®¬Ґ­¤гҐвбп гзЁвлў вм §­ зҐ­Ёп, ў®§ўа й Ґ¬лҐ нв®© дг­ЄжЁҐ©, - ЇаЁ ўлЎ®аҐ ¬Ґбв  ¤«п аЁб®ў ­Ёп ⥪бв  § Ј®«®ўЄ  (дг­ЄжЁҐ© 4) Ё«Ё - Є Є®Ј®-­ЁЎг¤м § ¬Ґ­ЁвҐ«п ⥪бв  § Ј®«®ўЄ  - (Ї® гᬮв७Ёо ЇаЁ«®¦Ґ­Ёп). - -====================================================================== -==== ”г­ЄжЁп 48, Ї®¤дг­ЄжЁп 8 - гбв ­®ўЁвм ЁбЇ®«м§гҐ¬л© бЄЁ­ ®Є®­. === -====================================================================== -Џ а ¬Ґвал: - * eax = 48 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  Ё¬п д ©«  бЄЁ­  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ­Ґ г¤ «®бм § Јаг§Ёвм д ©« - * eax = 2 - д ©« ­Ґ пў«пҐвбп д ©«®¬ бЄЁ­  -‡ ¬Ґз ­Ёп: - * ЏаЁ гбЇҐи­®© § Јаг§ЄҐ бЄЁ­  ўбҐ ®Є­  Ё§ўҐй овбп ® ­Ґ®Ўе®¤Ё¬®бвЁ - ЇҐаҐаЁб®ўЄЁ (б®ЎлвЁҐ 1). - * ЏаЁ § Јаг§ЄҐ бЁб⥬  бзЁвлў Ґв бЄЁ­ Ё§ д ©«  default.skn - ­  а ¬¤ЁбЄҐ. - * Џ®«м§®ў вҐ«м ¬®¦Ґв Ё§¬Ґ­пвм бЄЁ­ бв вЁзҐбЄЁ, ᮧ¤ ў бў®© - default.skn, Ё«Ё ¤Ё­ ¬ЁзҐбЄЁ б Ї®¬®ймо ЇаЁ«®¦Ґ­Ёп desktop. - -====================================================================== -============ ”г­ЄжЁп 49 - Advanced Power Management (APM). =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 49 - ­®¬Ґа дг­ЄжЁЁ - * dx = ­®¬Ґа дг­ЄжЁЁ APM ( ­ «®Ј ax ў бЇҐжЁдЁЄ жЁЁ) - * bx, cx = Ї а ¬Ґвал дг­ЄжЁЁ APM -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * 16-ЎЁв­лҐ ॣЁбвал ax, bx, cx, dx, si, di Ё д« Ј CF - гбв ­®ў«Ґ­л ў ᮮ⢥вбвўЁЁ б® бЇҐжЁдЁЄ жЁҐ© APM - * бв аиЁҐ Ї®«®ўЁ­л 32-ЎЁв­ле ॣЁбва®ў eax, ebx, ecx, - edx, esi, edi а §аги овбп -‡ ¬Ґз ­Ёп: - * ‘ЇҐжЁдЁЄ жЁп APM 1.2 ®ЇЁблў Ґвбп ў ¤®Єг¬Ґ­вҐ - "Advanced Power Management (APM) BIOS Specification" - (Revision 1.2), ¤®бвгЇ­®¬ ­  - http://www.microsoft.com/whdc/archive/amp_12.mspx; - Єа®¬Ґ в®Ј®, ®­  ўЄ«о祭  ў Ё§ўҐбв­л© Interrupt List by Ralf Brown - (http://www.pobox.com/~ralf/files.html, - ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/). - -====================================================================== -================= ”г­ЄжЁп 50 - гбв ­®ўЄ  д®а¬л ®Є­ . ================= -====================================================================== -ЋЎлз­лҐ ®Є­  ЇаҐ¤бв ў«пов б®Ў®© Їаאַ㣮«м­ЁЄЁ. ‘ Ї®¬®ймо нв®© дг­ЄжЁЁ -®Є­г ¬®¦­® ЇаЁ¤ вм Їа®Ё§ў®«м­го д®а¬г. ”®а¬  § ¤ свбп ­ Ў®а®¬ в®зҐЄ -ў­гваЁ ®Ўа ¬«по饣® Їаאַ㣮«м­ЁЄ , ЇаЁ­ ¤«Ґ¦ йЁе ®Є­г. Џ®«®¦Ґ­ЁҐ Ё -а §¬Ґал ®Ўа ¬«по饣® Їаאַ㣮«м­ЁЄ  § ¤ овбп дг­ЄжЁҐ© 0 Ё Ё§¬Ґ­повбп -дг­ЄжЁҐ© 67. - ---------------- “бв ­®ўЄ  ¤ ­­ле б Ё­д®а¬ жЁҐ© ® д®а¬Ґ --------------- -Џ а ¬Ґвал: - * eax = 50 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ¤ ­­лҐ д®а¬л (¬ ббЁў Ў ©в 0/1) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - ------------------- “бв ­®ўЄ  ¬ бив Ў  ¤ ­­ле д®а¬л ------------------- -Џ а ¬Ґвал: - * eax = 50 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx § ¤ св ¬ бив Ў: Є ¦¤л© Ў ©в ¤ ­­ле ®ЇаҐ¤Ґ«пҐв - (2^scale)*(2^scale) ЇЁЄбҐ«Ґ© -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Њ бив Ў Ї® 㬮«з ­Ёо а ўҐ­ 0 (¬ бив ЎЁагойЁ© ¬­®¦ЁвҐ«м 1). …б«Ё ў - ¤ ­­ле д®а¬л ®¤Ё­ Ў ©в ᮮ⢥вбвўгҐв ®¤­®¬г ЇЁЄбҐ«о, в® ¬ бив Ў - ¬®¦­® ­Ґ гбв ­ ў«Ёў вм. - * ЋЎ®§­ зЁ¬ xsize = иЁаЁ­  ®Є­  (ў ЇЁЄбҐ«пе), ysize = ўлб®в ; - ®Ўа вЁвҐ ў­Ё¬ ­ЁҐ, зв® ®­Ё ­  Ґ¤Ё­Ёжг Ў®«миҐ, 祬 гбв ­ ў«Ёў Ґ¬лҐ - дг­ЄжЁп¬Ё 0, 67. - * Џ® ®ЇаҐ¤Ґ«Ґ­Ёо ¬ бив Ў  xsize Ё ysize ¤®«¦­л ¤Ґ«Ёвмбп ­  2^scale. - * Ѓ ©в ¤ ­­ле Ї® ᬥ饭Ёо a ¤®«¦Ґ­ Ўлвм 0/1 Ё - ®ЇаҐ¤Ґ«пҐв ЇаЁ­ ¤«Ґ¦­®бвм ®Є­г Єў ¤а в  б® бв®а®­®© 2^scale - (ЇаЁ scale=0 Ї®«гз Ґ¬ ЇЁЄбҐ«м) Ё Є®®а¤Ё­ в ¬Ё «Ґў®Ј® ўҐае­ҐЈ® гЈ«  - (a mod (xsize shr scale), a div (xsize shr scale)) - * ђ §¬Ґа ¤ ­­ле: (xsize shr scale)*(ysize shr scale). - * „ ­­лҐ ¤®«¦­л ЇаЁбгвбвў®ў вм ў Ї ¬пвЁ Ё ­Ґ ¬Ґ­пвмбп - Ї®б«Ґ гбв ­®ўЄЁ д®а¬л. - * ‘Ёб⥬  Їа®б¬ ваЁў Ґв ¤ ­­лҐ ® д®а¬Ґ ЇаЁ Є ¦¤®© ЇҐаҐаЁб®ўЄҐ ®Є­  - дг­ЄжЁҐ© 0. - * ‚맮ў Ї®¤дг­ЄжЁЁ 0 б ­г«Ґўл¬ гЄ § вҐ«Ґ¬ ЇаЁў®¤Ёв Є ў®§ўа вг - Є Їаאַ㣮«м­®© д®а¬Ґ. - -====================================================================== -===================== ”г­ЄжЁп 51 - ᮧ¤ вм Ї®в®Є. ==================== -====================================================================== -Џ а ¬Ґвал: - * eax = 51 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - Ґ¤Ё­б⢥­­ п Ї®¤дг­ЄжЁп - * ecx =  ¤аҐб в®зЄЁ ўе®¤  Ї®в®Є  (­ з «м­л© eip) - * edx = гЄ § вҐ«м бвнЄ  Ї®в®Є  (­ з «м­л© esp) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ®иЁЎЄ  (ў бЁб⥬Ґ б«ЁиЄ®¬ ¬­®Ј® Ї®в®Є®ў) - * Ё­ зҐ eax = TID - Ё¤Ґ­вЁдЁЄ в®а Ї®в®Є  - -====================================================================== -= ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 0 - Ї®«гзЁвм Є®­дЁЈга жЁо бҐвҐў®Ј® ¤а ©ўҐа . -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ¤ў®©­®Ґ б«®ў® Є®­дЁЈга жЁЁ -‡ ¬Ґз ­Ёп: - * ‘«®ў® Є®­дЁЈга жЁЁ ¬®¦­® гбв ­®ўЁвм Ї®¤дг­ЄжЁҐ© 2. - * џ¤а® ­Ґ ЁбЇ®«м§гҐв ᮮ⢥вбвўгойго ЇҐаҐ¬Ґ­­го. - –Ґ­­®бвм нв®© ЇҐаҐ¬Ґ­­®© Ё а Ў®в ойЁе б ­Ґ© Ї®¤дг­ЄжЁ© 0 Ё 2 - ЇаҐ¤бв ў«пҐвбп ᮬ­ЁвҐ«м­®©. - -====================================================================== -======= ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 1 - Ї®«гзЁвм «®Є «м­л© IP- ¤аҐб. ====== -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = IP- ¤аҐб (4 Ў ©в ) -‡ ¬Ґз ­Ёп: - * ‹®Є «м­л© IP- ¤аҐб гбв ­ ў«Ёў Ґвбп Ї®¤дг­ЄжЁҐ© 3. - -====================================================================== - ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 2 - гбв ­®ўЁвм Є®­дЁЈга жЁо бҐвҐў®Ј® ¤а ©ўҐа . -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ¤ў®©­®Ґ б«®ў® Є®­дЁЈга жЁЁ; Ґб«Ё ¬« ¤иЁҐ 7 ЎЁв ®Ўа §гов - зЁб«® 3, нв® ў®бЇаЁ­Ё¬ Ґвбп Є Є § Їа®б ­  [ЇҐаҐ-]Ё­ЁжЁ «Ё§ жЁо - Ethernet-Є авл, ў Їа®вЁў­®¬ б«гз Ґ Ethernet ўлЄ«оз Ґвбп -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё ­Ґ § Їа®иҐ­ Ethernet-Ё­вҐа䥩б, в® ў®§ўа й Ґвбп eax=2, - ­® нв® ¬®¦Ґв Ё§¬Ґ­Ёвмбп ў Ўг¤гйЁе ўҐабЁпе п¤а  - * Ґб«Ё § Їа®иҐ­ Ethernet-Ё­вҐа䥩б, в® eax=0 ®§­ з Ґв ®иЁЎЄг - (®вбгвбвўЁҐ Ethernet-Є авл),   ­Ґ­г«Ґў®Ґ §­ зҐ­ЁҐ - гбЇҐе -‡ ¬Ґз ­Ёп: - * ‘«®ў® Є®­дЁЈга жЁЁ ¬®¦­® Їа®зЁв вм Ї®¤дг­ЄжЁҐ© 0. - * џ¤а® ­Ґ ЁбЇ®«м§гҐв ᮮ⢥вбвўгойго ЇҐаҐ¬Ґ­­го. - –Ґ­­®бвм нв®© ЇҐаҐ¬Ґ­­®©, Ї®¤дг­ЄжЁЁ 0 Ё з бвЁ Ї®¤дг­ЄжЁЁ 2, - гбв ­ ў«Ёў о饩 нвг ЇҐаҐ¬Ґ­­го, ЇаҐ¤бв ў«пҐвбп ᮬ­ЁвҐ«м­®©. - -====================================================================== -====== ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 3 - гбв ­®ўЁвм «®Є «м­л© IP- ¤аҐб. ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = IP- ¤аҐб (4 Ў ©в ) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ⥪гй п ॠ«Ё§ жЁп ў®§ўа й Ґв eax=3, ­® нв® ¬®¦Ґв Ўлвм Ё§¬Ґ­Ґ­® - ў Ўг¤гйЁе ўҐабЁпе -‡ ¬Ґз ­Ёп: - * ‹®Є «м­л© IP- ¤аҐб ¬®¦­® Ї®«гзЁвм Ї®¤дг­ЄжЁҐ© 1. - -====================================================================== -= ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 6 - ¤®Ў ўЁвм ¤ ­­лҐ ў б⥪ ўе®¤­®© ®зҐаҐ¤Ё. = -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * edx = а §¬Ґа ¤ ­­ле - * esi = гЄ § вҐ«м ­  ¤ ­­лҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ®иЁЎЄ  - * eax = 0 - гбЇҐи­® -‡ ¬Ґз ­Ёп: - * ќв  дг­ЄжЁп ЇаҐ¤­ §­ зҐ­  в®«мЄ® ¤«п ¬Ґ¤«Ґ­­ле бҐвҐўле ¤а ©ўҐа®ў - (PPP, SLIP). - * ђ §¬Ґа ¤ ­­ле ­Ґ ¤®«¦Ґ­ ЇаҐў®б室Ёвм 1500 Ў ©в, - е®вп Їа®ўҐа®Є Є®а४⭮бвЁ ­Ґ ¤Ґ« Ґвбп. - -====================================================================== -====================== ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 8 ====================== -============= Џа®зЁв вм ¤ ­­лҐ Ё§ бҐвҐў®© ®зҐаҐ¤Ё ўлў®¤ . ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * esi = гЄ § вҐ«м ­  ЎгдҐа а §¬Ґа®¬ 1500 Ў ©в -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = зЁб«® Їа®зЁв ­­ле Ў ©в (ў ⥪г饩 ॠ«Ё§ жЁЁ - «ЁЎ® 0 = ­Ґв ¤ ­­ле, «ЁЎ® 1500) - * ¤ ­­лҐ бЄ®ЇЁа®ў ­л ў ЎгдҐа -‡ ¬Ґз ­Ёп: - * ќв  дг­ЄжЁп ЇаҐ¤­ §­ зҐ­  в®«мЄ® ¤«п ¬Ґ¤«Ґ­­ле бҐвҐўле ¤а ©ўҐа®ў - (PPP, SLIP). - -====================================================================== -=========== ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 9 - Ї®«гзЁвм gateway IP. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 9 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = gateway IP (4 Ў ©в ) - -====================================================================== -========= ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 10 - Ї®«гзЁвм ¬ бЄг Ї®¤бҐвЁ. ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 10 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ¬ бЄ  Ї®¤бҐвЁ - -====================================================================== -========= ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 11 - гбв ­®ўЁвм gateway IP. ========= -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 11 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = gateway IP (4 Ў ©в ) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ⥪гй п ॠ«Ё§ жЁп ў®§ўа й Ґв eax=11, ­® нв® ¬®¦Ґв Ўлвм Ё§¬Ґ­Ґ­® - ў Ўг¤гйЁе ॠ«Ё§ жЁпе - -====================================================================== -======== ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 12 - гбв ­®ўЁвм ¬ бЄг Ї®¤бҐвЁ. ======= -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 12 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ¬ бЄ  Ї®¤бҐвЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ⥪гй п ॠ«Ё§ жЁп ў®§ўа й Ґв eax=12, ­® нв® ¬®¦Ґв Ўлвм Ё§¬Ґ­Ґ­® - ў Ўг¤гйЁе ўҐабЁпе - -====================================================================== -============ ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 13 - Ї®«гзЁвм DNS IP. ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = DNS IP (4 Ў ©в ) - -====================================================================== -=========== ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 14 - гбв ­®ўЁвм DNS IP. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 14 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = DNS IP (4 Ў ©в ) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ⥪гй п ॠ«Ё§ жЁп ў®§ўа й Ґв eax=14, ­® нв® ¬®¦Ґв Ўлвм Ё§¬Ґ­Ґ­® - ў б«Ґ¤гойЁе ўҐабЁпе - -====================================================================== -====== ”г­ЄжЁп 52, Ї®¤дг­ЄжЁп 15 - Ї®«гзЁвм «®Є «м­л© MAC- ¤аҐб. ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 52 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 15 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = 0 - зЁв вм ЇҐаўлҐ 4 Ў ©в , - ecx = 4 - зЁв вм Ї®б«Ґ¤­ЁҐ 2 Ў ©в  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ¤«п ecx=0: eax = ЇҐаўлҐ 4 Ў ©в  MAC- ¤аҐб  - * ¤«п ecx=4: ax = Ї®б«Ґ¤­ЁҐ 2 Ў ©в  MAC- ¤аҐб , - бв аи п Ї®«®ўЁ­  eax а §аги Ґвбп - * ¤«п ¤агЈЁе ecx: eax = -1 Є Є ЇаЁ§­ Є ®иЁЎЄЁ - -====================================================================== -============ ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 0 - ®вЄалвм UDP-б®ЄҐв. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = «®Є «м­л© Ї®ав (гзЁвлў Ґвбп в®«мЄ® ¬« ¤иҐҐ б«®ў®) - * edx = г¤ «с­­л© Ї®ав (гзЁвлў Ґвбп в®«мЄ® ¬« ¤иҐҐ б«®ў®) - * esi = г¤ «с­­л© IP -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 = 0xFFFFFFFF - ®иЁЎЄ ; ebx а §аги Ґвбп - * eax = ен­¤« б®ЄҐв  (­ҐЄ®в®а®Ґ зЁб«®, ®¤­®§­ з­® Ё¤Ґ­вЁдЁжЁаго饥 - б®ЄҐв Ё Ё¬Ґо饥 б¬лб« в®«мЄ® ¤«п бЁб⥬л) - гбЇҐи­®; - ebx а §аги Ґвбп - -====================================================================== -============ ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 1 - § Єалвм UDP-б®ЄҐв. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ­ҐўҐа­л© ен­¤« - * eax = 0 - гбЇҐи­® - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * ’ҐЄгй п ॠ«Ё§ жЁп ­Ґ § Єалў Ґв  ўв®¬ вЁзҐбЄЁ ўбҐ б®ЄҐвл Ї®в®Є  - ЇаЁ ҐЈ® § ўҐа襭ЁЁ. ‚ з бв­®бвЁ, ­Ґ б«Ґ¤гҐв ЇаЁЎЁў вм Ї®в®Є - б Єг祩 ®вЄалвле б®ЄҐв®ў - Ўг¤Ґв гвҐзЄ  аҐбгаб®ў. - -====================================================================== -============== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 2 - ®Їа®б б®ЄҐв . ============== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = зЁб«® Ї®«г祭­ле Ў ©в, 0 ¤«п ­ҐўҐа­®Ј® ен­¤«  - * ebx а §аги Ґвбп - -====================================================================== -======== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 3 - Їа®зЁв вм Ў ©в Ё§ б®ЄҐв . ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё ­Ґв ЇаЁ­пвле ¤ ­­ле Ё«Ё гЄ § ­ ­ҐўҐа­л© ен­¤«: - eax=0, bl=0, Їа®зЁҐ Ў ©вл ebx а §аги овбп - * Ґб«Ё Ўл«Ё ЇаЁ­пвлҐ ¤ ­­лҐ: eax=зЁб«® ®бв ўиЁебп Ў ©в - (ў®§¬®¦­®, 0), bl=Їа®зЁв ­­л© Ў ©в, Їа®зЁҐ Ў ©вл ebx а §аги овбп - -====================================================================== -========== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 4 - § ЇЁб вм ў UDP-б®ЄҐв. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  - * edx = зЁб«® Ў ©в ¤«п § ЇЁбЁ - * esi = гЄ § вҐ«м ­  ¤ ­­лҐ ¤«п § ЇЁбЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0xffffffff - ®иЁЎЄ  (­ҐўҐа­л© ен­¤« Ё«Ё ­Ґ¤®бв в®з­® Ї ¬пвЁ) - * eax = 0 - гбЇҐи­® - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * —Ёб«® Ў ©в ¤«п § ЇЁбЁ ­Ґ ¬®¦Ґв ЇаҐўли вм 1500-28, е®вп - ᮮ⢥вбвўго饩 Їа®ўҐаЄЁ ­Ґ ¤Ґ« Ґвбп. - -====================================================================== -============ ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 5 - ®вЄалвм TCP-б®ЄҐв. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = «®Є «м­л© Ї®ав (гзЁвлў Ґвбп в®«мЄ® ¬« ¤иҐҐ б«®ў®) - * edx = г¤ «с­­л© Ї®ав (гзЁвлў Ґвбп в®«мЄ® ¬« ¤иҐҐ б«®ў®) - * esi = г¤ «с­­л© IP - * edi = ०Ё¬ ®вЄалвЁп: SOCKET_PASSIVE=0 Ё«Ё SOCKET_ACTIVE=1 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 = 0xFFFFFFFF - ®иЁЎЄ ; ebx а §аги Ґвбп - * eax = ен­¤« б®ЄҐв  (­ҐЄ®в®а®Ґ зЁб«®, ®¤­®§­ з­® Ё¤Ґ­вЁдЁжЁаго饥 - б®ЄҐв Ё Ё¬Ґо饥 б¬лб« в®«мЄ® ¤«п бЁб⥬л) - гбЇҐи­®; - ebx а §аги Ґвбп - -====================================================================== -====== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 6 - Ї®«гзЁвм б®бв®п­ЁҐ TCP-б®ЄҐв . ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 ¤«п ­ҐўҐа­®Ј® б®ЄҐв  Ё«Ё бв вгб: ®¤­® Ё§ - * TCB_LISTEN = 1 - * TCB_SYN_SENT = 2 - * TCB_SYN_RECEIVED = 3 - * TCB_ESTABLISHED = 4 - * TCB_FIN_WAIT_1 = 5 - * TCB_FIN_WAIT_2 = 6 - * TCB_CLOSE_WAIT = 7 - * TCB_CLOSING = 8 - * TCB_LAST_ASK = 9 - * TCB_TIME_WAIT = 10 - * TCB_CLOSED = 11 - * ebx а §аги Ґвбп - -====================================================================== -========== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 7 - § ЇЁб вм ў TCP-б®ЄҐв. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 7 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  - * edx = зЁб«® Ў ©в ¤«п § ЇЁбЁ - * esi = гЄ § вҐ«м ­  ¤ ­­лҐ ¤«п § ЇЁбЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0xffffffff - ®иЁЎЄ  (­ҐўҐа­л© ен­¤« Ё«Ё ­Ґ¤®бв в®з­® Ї ¬пвЁ) - * eax = 0 - гбЇҐи­® - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * —Ёб«® Ў ©в ¤«п § ЇЁбЁ ­Ґ ¬®¦Ґв ЇаҐўли вм 1500-40, - е®вп ᮮ⢥вбвўго饩 Їа®ўҐаЄЁ ­Ґ ¤Ґ« Ґвбп. - -====================================================================== -============ ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 8 - § Єалвм TCP-б®ЄҐв. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ®иЁЎЄ  (­ҐўҐа­л© ен­¤« Ё«Ё - ­Ґ¤®бв в®з­® Ї ¬пвЁ ¤«п Ї ЄҐв  § ЄалвЁп б®ЄҐв ) - * eax = 0 - гбЇҐи­® - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * ’ҐЄгй п ॠ«Ё§ жЁп ­Ґ § Єалў Ґв  ўв®¬ вЁзҐбЄЁ ўбҐ б®ЄҐвл Ї®в®Є  - ЇаЁ ҐЈ® § ўҐа襭ЁЁ. ‚ з бв­®бвЁ, ­Ґ б«Ґ¤гҐв ЇаЁЎЁў вм Ї®в®Є - б Єг祩 ®вЄалвле б®ЄҐв®ў - Ўг¤Ґв гвҐзЄ  аҐбгаб®ў. - -====================================================================== -== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 9 - Їа®ўҐаЁвм, бў®Ў®¤Ґ­ «Ё «®Є «м­л© Ї®ав. = -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 9 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ­®¬Ґа «®Є «м­®Ј® Ї®ав  (ЁбЇ®«м§говбп в®«мЄ® ¬« ¤иЁҐ 16 ЎЁв) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - Ї®ав ЁбЇ®«м§гҐвбп - * eax = 1 - Ї®ав бў®Ў®¤Ґ­ - * ebx а §аги Ґвбп - -====================================================================== -==== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 10 - Ї®«гзЁвм бв вгб Є ЎҐ«п Ethernet. ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 10 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * al = -1 - ¤а ©ўҐа бҐвҐў®© Є авл ­Ґ § Ја㦥­ Ё«Ё - ­Ґ Ї®¤¤Ґа¦Ёў Ґв нвг дг­ЄжЁо - * al = 0 - Є ЎҐ«м ­Ґ Ї®¤Є«озс­ - * al = 1 - Є ЎҐ«м Ї®¤Є«озс­ - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * ’ҐЄгй п ॠ«Ё§ жЁп п¤а  Ї®¤¤Ґа¦Ёў Ґв нвг дг­ЄжЁо - в®«мЄ® ¤«п бҐвҐўле Є ав RTL8139. - -====================================================================== -==== ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 11 - Їа®зЁв вм ¤ ­­лҐ бҐвҐў®Ј® б⥪ . ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 11 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ен­¤« б®ЄҐв  - * edx = гЄ § вҐ«м ­  ЎгдҐа - * esi = зЁб«® Ў ©в ¤«п з⥭Ёп; - * esi = 0 - зЁв вм ўбҐ ¤ ­­лҐ (¬ ЄбЁ¬г¬ 4096 Ў ©в) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = зЁб«® Їа®зЁв ­­ле Ў ©в (0 ЇаЁ ­ҐўҐа­®¬ ен­¤«Ґ) - * ebx а §аги Ґвбп - -====================================================================== - ”г­ЄжЁп 53, Ї®¤дг­ЄжЁп 255 - ®в« ¤®з­ п Ё­д®а¬ жЁп бҐвҐў®Ј® ¤а ©ўҐа . -====================================================================== -Џ а ¬Ґвал: - * eax = 53 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 255 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = вЁЇ § Їа иЁў Ґ¬®© Ё­д®а¬ жЁЁ (ᬮваЁ ­Ё¦Ґ) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = § Їа®иҐ­­ п Ё­д®а¬ жЁп - * ebx а §аги Ґвбп -‚®§¬®¦­лҐ §­ зҐ­Ёп ecx: - * 100: ¤«Ё­  ®зҐаҐ¤Ё 0 (empty queue) - * 101: ¤«Ё­  ®зҐаҐ¤Ё 1 (ip-out queue) - * 102: ¤«Ё­  ®зҐаҐ¤Ё 2 (ip-in queue) - * 103: ¤«Ё­  ®зҐаҐ¤Ё 3 (net1out queue) - * 200: зЁб«® н«Ґ¬Ґ­в®ў ў в Ў«ЁжҐ ARP - * 201: а §¬Ґа в Ў«Ёжл ARP (ў н«Ґ¬Ґ­в е) (20 ў ⥪г饩 ўҐабЁЁ) - * 202: Їа®зЁв вм н«Ґ¬Ґ­в edx в Ў«Ёжл ARP ў® ўаҐ¬Ґ­­л© ЎгдҐа, ®вЄг¤  - ЎҐагв Ё­д®а¬ жЁо 5 Ї®б«Ґ¤гойЁе вЁЇ®ў; - ў н⮬ б«гз Ґ eax ­Ґ®ЇаҐ¤Ґ«с­ - * 203: IP- ¤аҐб, § Ї®¬­Ґ­­л© вЁЇ®¬ 202 - * 204: бв а襥 dword MAC- ¤аҐб , § Ї®¬­Ґ­­®Ј® вЁЇ®¬ 202 - * 205: ¬« ¤иҐҐ word MAC- ¤аҐб , § Ї®¬­Ґ­­®Ј® вЁЇ®¬ 202 - * 206: б«®ў® бв вгб , § Ї®¬­Ґ­­®Ґ вЁЇ®¬ 202 - * 207: б«®ў® ttl, § Ї®¬­Ґ­­®Ґ вЁЇ®¬ 202 - * 2: ®ЎйҐҐ зЁб«® Ї®«г祭­ле IP-Ї ЄҐв®ў - * 3: ®ЎйҐҐ зЁб«® ЇҐаҐ¤ ­­ле IP-Ї ЄҐв®ў - * 4: ®ЎйҐҐ зЁб«® б¤ ¬Ї«Ґ­­ле Ї®«г祭­ле Ї ЄҐв®ў - * 5: ®ЎйҐҐ зЁб«® Ї®«г祭­ле ARP-Ї ЄҐв®ў - * 6: бв вгб ¤а ©ўҐа  Ї ЄҐв®ў, 0=­Ґ ЄвЁўҐ­, - ­Ґ­г«Ґў®Ґ §­ зҐ­ЁҐ= ЄвЁўҐ­ - -====================================================================== -====================== ”г­ЄжЁп 55, Ї®¤дг­ЄжЁп 55 ===================== -========== Ќ з вм Їа®ЁЈалў вм ¤ ­­лҐ ­  ўбв஥­­®¬ бЇЁЄҐаҐ. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 55 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 55 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * esi = гЄ § вҐ«м ­  ¤ ­­лҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 55 - ®иЁЎЄ  (бЇЁЄҐа ®вЄ«озс­ Ё«Ё § ­пв) -„ ­­лҐ - нв® ¬ ббЁў н«Ґ¬Ґ­в®ў ЇҐаҐ¬Ґ­­®© ¤«Ё­л. -”®а¬ в Є ¦¤®Ј® н«Ґ¬Ґ­в  ®ЇаҐ¤Ґ«пҐвбп ЇҐаўл¬ Ў ©в®¬: - * 0 = Є®­Ґж ¤ ­­ле - * 1..0x80 = § ¤ св ¤«ЁвҐ«м­®бвм §ўгз ­Ёп ў б®вле ¤®«пе ᥪ㭤л - ­®вл, ®ЇаҐ¤Ґ«пҐ¬®© ­ҐЇ®б।б⢥­­л¬ §­ зҐ­ЁҐ¬ з бв®вл - * б«Ґ¤го饥 б«®ў® (2 Ў ©в ) ᮤҐа¦Ёв ¤Ґ«ЁвҐ«м з бв®вл; - з бв®в  ®ЇаҐ¤Ґ«пҐвбп Є Є 1193180/divider - * 0x81 = invalid - * 0x82..0xFF = ­®в , ®ЇаҐ¤Ґ«пҐ¬ п ®Єв ў®© Ё ­®¬Ґа®¬: - * ¤«ЁвҐ«м­®бвм ў б®вле ¤®«пе ᥪ㭤л = (ЇҐаўл© Ў ©в)-0x81 - * ЇаЁбгвбвўгҐв Ґйс ®¤Ё­ Ў ©в; - * (ўв®а®© Ў ©в)=0xFF - Ї г§  - * Ё­ зҐ ®­ Ё¬ҐҐв ўЁ¤ a*0x10+b, Ј¤Ґ b=­®¬Ґа ­®вл ў ®Єв ўҐ ®в 1 - ¤® 12, a=­®¬Ґа ®Єв ўл (бзЁв п б 0) -‡ ¬Ґз ­Ёп: - * ЏЁй ­ЁҐ бЇЁЄҐа®¬ ¬®¦Ґв Ўлвм § ЇаҐйҐ­®/а §аҐиҐ­® Ї®¤дг­ЄжЁҐ© 8 - дг­ЄжЁЁ 18. - * ”г­ЄжЁп ў®§ўа й Ґв гЇа ў«Ґ­ЁҐ, б®®ЎйЁў Єг¤  б«Ґ¤гҐв Ё­д®а¬ жЁо - ® § Їа®бҐ. ‘ ¬® Їа®ЁЈалў ­ЁҐ Ё¤св ­Ґ§ ўЁбЁ¬® ®в Їа®Ја ¬¬л. - * „ ­­лҐ ¤®«¦­л б®еа ­пвмбп ў Ї ¬пвЁ Ї® Єа ©­Ґ© ¬ҐаҐ - ¤® Є®­ж  Їа®ЁЈалў ­Ёп. - -====================================================================== -======================= ”г­ЄжЁп 57 - PCI BIOS. ======================= -====================================================================== -Џ а ¬Ґвал: - * eax = 57 - ­®¬Ґа дг­ЄжЁЁ - * ebp ᮮ⢥вбвўгҐв ॣЁбваг al ў бЇҐжЁдЁЄ жЁЁ PCI BIOS - * ®бв «м­лҐ ॣЁбвал - Ї® бЇҐжЁдЁЄ жЁЁ PCI BIOS -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * CF ­Ґ ®ЇаҐ¤Ґ«с­ - * ®бв «м­лҐ ॣЁбвал - Ї® бЇҐжЁдЁЄ жЁЁ PCI BIOS -‡ ¬Ґз ­Ёп: - * Њ­®ЈЁе १г«мв в®ў нв®© дг­ЄжЁЁ ¬®¦­® в Є¦Ґ ¤®ЎЁвмбп ўл§®ў®¬ - ᮮ⢥вбвўгойЁе Ї®¤дг­ЄжЁ© дг­ЄжЁЁ 62. - * ”г­ЄжЁп ўл§лў Ґв а биЁаҐ­ЁҐ PCI32 BIOS, ¤®Єг¬Ґ­вЁа®ў ­­®Ґ, - ­ ЇаЁ¬Ґа, ў http://alpha1.dyns.net/files/PCI/bios21.pdf. - * …б«Ё BIOS ­Ґ Ї®¤¤Ґа¦Ёў Ґв нв® а биЁаҐ­ЁҐ, Ї®ўҐ¤Ґ­ЁҐ дг­ЄжЁЁ - н¬г«ЁагҐвбп (зҐаҐ§  ­ «®ЈЁ Ї®¤дг­ЄжЁ© дг­ЄжЁЁ 62 ०Ё¬  п¤а ). - -====================================================================== -============== ”г­ЄжЁп 58 - а Ў®в  б д ©«®ў®© бЁб⥬®©. ============== -====================================================================== -Џ а ¬Ґвал: - * eax = 58 - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®; Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ў § ўЁбЁ¬®бвЁ ®в Ї®¤дг­ЄжЁЁ ¬®¦Ґв ў®§ўа й вмбп §­ зҐ­ЁҐ Ё - ў ¤агЈЁе ॣЁбва е -ЋЎйЁ© д®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: ­®¬Ґа Ў«®Є  - * +8: dword: а §¬Ґа - * +12 = +0xC: dword: гЄ § вҐ«м ­  ¤ ­­лҐ - * +16 = +0x10: dword: гЄ § вҐ«м ­  Ї ¬пвм ¤«п а Ў®вл бЁб⥬л - (4096 Ў ©в) - * +20 = +0x14: n db: ASCIIZ-бва®Є  б Ё¬Ґ­Ґ¬ д ©«  -“в®з­Ґ­Ёп - ў ¤®Єг¬Ґ­в жЁЁ ­  ᮮ⢥вбвўгойго Ї®¤дг­ЄжЁо. -€¬п д ©«  ­Ґзгўб⢨⥫쭮 Є ॣЁбваг « вЁ­бЄЁе ЎгЄў, -агббЄЁҐ ЎгЄўл ¤®«¦­л Ўлвм § Ј« ў­л¬Ё. -”®а¬ в Ё¬Ґ­Ё д ©« : -/base/number/dir1/dir2/.../dirn/file, -Ј¤Ґ /base/number Ё¤Ґ­вЁдЁжЁагҐв гбва®©бвў®, ­  Є®в®а®¬ ЁйҐвбп д ©«: -®¤­® Ё§ - * /RD/1 = /RAMDISK/1 ¤«п ¤®бвгЇ  Є а ¬¤ЁбЄг - * /FD/1 = /FLOPPYDISK/1 ¤«п ¤®бвгЇ  Є ЇҐаў®¬г д«®ЇЇЁ-¤ЁбЄ®ў®¤г, - /FD/2 = /FLOPPYDISK/2 ¤«п ўв®а®Ј® д«®ЇЇЁ-¤ЁбЄ®ў®¤  - * /HD/x = /HARDDISK/x - гбв аҐўиЁ© ў аЁ ­в ¤®бвгЇ  Є ¦сбвЄ®¬г ¤ЁбЄг - (ў н⮬ б«гз Ґ Ў §  ®ЇаҐ¤Ґ«пҐвбп Ї®¤дг­ЄжЁҐ© 7 дг­ЄжЁЁ 21), - x - ­®¬Ґа а §¤Ґ«  (бзЁв п б 1) - * /HD0/x, /HD1/x, /HD2/x, /HD3/x ¤«п ¤®бвгЇ  ᮮ⢥вб⢥­­® - Є гбва®©бвў ¬ IDE0 (Primary Master), IDE1 (Primary Slave), - IDE2 (Secondary Master), IDE3 (Secondary Slave); - x - ­®¬Ґа а §¤Ґ«  ­  ўлЎа ­­®¬ ўЁ­зҐбвҐаҐ, Ё§¬Ґ­пҐвбп ®в 1 ¤® 255 - (­  Є ¦¤®¬ Ё§ ўЁ­зҐбвҐа®ў ­г¬Ґа жЁп ­ зЁ­ Ґвбп б 1) -‡ ¬Ґз ­Ёп: - * ‚ ЇҐаўле ¤ўге б«гз пе ¤®ЇгбЄ Ґвбп ЁбЇ®«м§®ў ­ЁҐ FIRST ў¬Ґбв® 1, - SECOND ў¬Ґбв® 2, ­® ЁбЇ®«м§®ў вм нвг ў®§¬®¦­®бвм - ­Ґ ४®¬Ґ­¤гҐвбп ¤«п 㤮Ўбвў  ЇҐаҐе®¤  ­  Ўг¤гйЁҐ а биЁаҐ­Ёп. - * Ќ Є« ¤лў Ґвбп ®Ја ­ЁзҐ­ЁҐ n<=39. - * €¬Ґ­  Ї Ї®Є Ё д ©«  dir1,...,dirn,file ¤®«¦­л Ўлвм ў д®а¬ вҐ 8.3: - Ё¬п ­Ґ Ў®«ҐҐ 8 бЁ¬ў®«®ў, в®зЄ , а биЁаҐ­ЁҐ ­Ґ Ў®«ҐҐ 3 бЁ¬ў®«®ў. - •ў®бв®ўлҐ Їа®ЎҐ«л ЁЈ­®аЁаговбп. „агЈЁе Їа®ЎҐ«®ў Ўлвм ­Ґ ¤®«¦­®. - …б«Ё Ё¬п § ­Ё¬ Ґв а®ў­® 8 бЁ¬ў®«®ў, в®зЄг ¬®¦­® ®ЇгбвЁвм - (е®вп Ї®«м§®ў вмбп нвЁ¬ ­Ґ ४®¬Ґ­¤гҐвбп ¤«п 㤮Ўбвў  ЇҐаҐе®¤  - ­  Ўг¤гйЁҐ а биЁаҐ­Ёп). - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґв Ї Ї®Є ­  а ¬¤ЁбЄҐ. -ЏаЁ¬Ґал: - * '/RAMDISK/FIRST/KERNEL.ASM',0 - '/rd/1/kernel.asm',0 - * '/HD0/1/kernel.asm',0 - * '/hd0/1/menuet/pics/tanzania.bmp',0 -„®бвгЇ­лҐ Ї®¤дг­ЄжЁЁ: - * Ї®¤дг­ЄжЁп 0 - з⥭ЁҐ д ©« /Ї ЇЄЁ - * Ї®¤дг­ЄжЁп 8 - LBA-з⥭ЁҐ б гбва®©бвў  - * Ї®¤дг­ЄжЁп 15 - Ї®«г祭ЁҐ Ё­д®а¬ жЁЁ ® д ©«®ў®© бЁб⥬Ґ - -====================================================================== -========== ”г­ЄжЁп 58, Ї®¤дг­ЄжЁп 0 - Їа®зЁв вм д ©«/Ї ЇЄг. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 58 - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 0 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: ­®¬Ґа Ў«®Є  ¤«п з⥭Ёп (бзЁв п б 0) - * +8: dword: зЁб«® Ў«®Є®ў ¤«п з⥭Ёп - * +12 = +0xC: dword: гЄ § вҐ«м ­  ЎгдҐа, Єг¤  Ўг¤гв § ЇЁб ­л ¤ ­­лҐ - * +16 = +0x10: dword: гЄ § вҐ«м ­  ЎгдҐа ¤«п а Ў®вл бЁб⥬л - (4096 Ў ©в) - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx = а §¬Ґа д ©«  (ў Ў ©в е) Ё«Ё - -1=0xffffffff, Ґб«Ё д ©« ­Ґ ­ ©¤Ґ­ -‡ ¬Ґз ­Ёп: - * ђ §¬Ґа Ў«®Є  - 512 Ў ©в. - * ќв  дг­ЄжЁп гбв аҐ« , ¤«п з⥭Ёп д ©«®ў ЁбЇ®«м§г©вҐ Ї®¤дг­ЄжЁо 0 - дг­ЄжЁЁ 70, ¤«п з⥭Ёп Ї Ї®Є - Ї®¤дг­ЄжЁо 1 дг­ЄжЁЁ 70. - * ”г­ЄжЁп Ї®§ў®«пҐв зЁв вм ᮤҐа¦Ё¬®Ґ Ї ЇЄЁ. €§ д ©«®ўле бЁб⥬ - Ї®¤¤Ґа¦Ёў Ґвбп в®«мЄ® FAT. ”®а¬ в FAT-Ї ЇЄЁ ®ЇЁб ­ ў «оЎ®© - ¤®Єг¬Ґ­в жЁЁ Ї® FAT. - * ђ §¬Ґа Ї ЇЄЁ ®ЇаҐ¤Ґ«пҐвбп Ї® а §¬Ґаг 楯®зЄЁ Є« бвҐа®ў ў FAT. - * …б«Ё д ©« Є®­зЁ«бп а ­миҐ, 祬 Ўл« Їа®зЁв ­ Ї®б«Ґ¤­Ё© § Їа®иҐ­­л© - Ў«®Є, в® дг­ЄжЁп Їа®зЁв Ґв, бЄ®«мЄ® ᬮ¦Ґв, Ї®б«Ґ 祣® ўҐа­св - eax=6 (EOF). - * ”г­ЄжЁп Ї®§ў®«пҐв зЁв вм Є®а­ҐўлҐ Ї ЇЄЁ /rd/1,/fd/x,/hd[n]/x, ­® - ў ЇҐаўле ¤ўге б«гз пе ⥪гй п ॠ«Ё§ жЁп ­Ґ б«Ґ¤гҐв - гбв ­®ў«Ґ­­л¬ Їа ўЁ« ¬: - ¤«п /rd/1: - * Ґб«Ё гЄ § ­® 0 Ў«®Є®ў ¤«п з⥭Ёп, бзЁв Ґвбп, - зв® § Їа иЁў Ґвбп 1; - * Ґб«Ё § Їа иЁў Ґвбп Ў®«миҐ 14 Ў«®Є®ў Ё«Ё ­ з «м­л© Ў«®Є - ­Ґ ¬Ґ­миҐ 14-Ј®, в® ў®§ўа й Ґвбп eax=5 (not found) Ё ebx=-1; - * а §¬Ґа Є®а­Ґў®Ј® Є в «®Ј  а ¬¤ЁбЄ  = 14 Ў«®Є®ў, - 0x1C00=7168 Ў ©в; ­® ў®§ўа й Ґвбп ebx=0 - (§  ЁбЄ«о祭ЁҐ¬ б«гз п ЇаҐ¤л¤г饣® Їг­Єв ); - * Є Є ­Ё бва ­­®, ¬®¦­® Їа®зЁв вм 14-© Ў«®Є (в ¬, ў®®ЎйҐ Ј®ў®ап, - ¬гб®а - ­ Ї®¬Ё­ о, бзсв ўҐ¤свбп б 0); - * Ґб«Ё Ўл« § Їа®иҐ­ е®вп Ўл ®¤Ё­ Ў«®Є б ­®¬Ґа®¬, ­Ґ ¬Ґ­миЁ¬ 14, - в® ў®§ўа й Ґвбп eax=6(EOF); Ё­ зҐ eax=0. - „«п /fd/x: - * Ґб«Ё ­ з «м­л© Ў«®Є ­Ґ ¬Ґ­миҐ 14-Ј®, в® ў®§ўа й Ґвбп - eax=5 (not found) Ё ebx=0; - * Єбв вЁ Ј®ў®ап, д®а¬ в FAT12 ¤®ЇгбЄ Ґв ¤ЁбЄҐвл б а §¬Ґа®¬ - Є®а­Ґў®Ј® Є в «®Ј  ¬Ґ­миҐ Ё«Ё Ў®«миҐ 14 Ў«®Є®ў; - * Їа®ўҐаЄЁ ¤«Ё­л ­Ґ ¤Ґ« Ґвбп; - * Ґб«Ё г¤ «®бм Їа®зЁв вм ¤ ­­лҐ б ¤ЁбЄҐвл, ў®§ўа й Ґвбп - eax=0,ebx=0; ў Їа®вЁў­®¬ б«гз Ґ eax=10 (access denied), ebx=-1. - * ”г­ЄжЁп ®Ўа Ў влў Ґв з⥭ЁҐ бЇҐжЁ «м­ле Ї Ї®Є /,/rd,/fd,/hd[n]; - ­® १г«мв в ­Ґ ᮮ⢥вбвўгҐв ®¦Ё¤ Ґ¬®¬г - (Ї® а Ў®вҐ б ®Ўлз­л¬Ё д ©« ¬Ё/Ї ЇЄ ¬Ё), ­Ґ б«Ґ¤гҐв гбв ­®ў«Ґ­­л¬ - Їа ўЁ« ¬, ¬®¦Ґв Ё§¬Ґ­Ёвмбп ў б«Ґ¤гойЁе ўҐабЁпе п¤а  Ё Ї®в®¬г - ­Ґ ®ЇЁблў Ґвбп. „«п Ї®«г祭Ёп Ё­д®а¬ жЁЁ ®Ў ®Ў®а㤮ў ­ЁЁ - ЁбЇ®«м§г©вҐ Ї®¤дг­ЄжЁо 11 дг­ЄжЁЁ 18 Ё«Ё - зЁв ©вҐ ᮮ⢥вбвўгойЁҐ Ї ЇЄЁ Ї®¤дг­ЄжЁҐ© 1 дг­ЄжЁЁ 70. - -====================================================================== -========= ”г­ЄжЁп 58, Ї®¤дг­ЄжЁп 8 - LBA-з⥭ЁҐ б гбва®©бвў . ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 58 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 8 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: ­®¬Ґа Ў«®Є  ¤«п з⥭Ёп (бзЁв п б 0) - * +8: dword: ЁЈ­®аЁагҐвбп (гбв ­ ў«Ёў ©вҐ ў 1) - * +12 = +0xC: dword: гЄ § вҐ«м ­  ЎгдҐа, Єг¤  Ўг¤гв § ЇЁб ­л ¤ ­­лҐ - (512 Ў ©в) - * +16 = +0x10: dword: гЄ § вҐ«м ­  ЎгдҐа ¤«п а Ў®вл бЁб⥬л - (4096 Ў ©в) - * +20 = +0x14: ASCIIZ-Ё¬п гбва®©бвў : ­Ґзгўб⢨⥫쭮 Є ॣЁбваг, - ®¤­® Ё§ /rd/1 = /RamDisk/1, /hd/n = /HardDisk/n, - 1<=n<=4 - ­®¬Ґа гбва®©бвў : 1=IDE0, ..., 4=IDE3. - ‚¬Ґбв® жЁда ¤®ЇгбЄ Ґвбп, е®вп Ё ­Ґ ४®¬Ґ­¤гҐвбп ¤«п 㤮Ўбвў  - ЇҐаҐе®¤  ­  Ўг¤гйЁҐ а биЁаҐ­Ёп, - ЁбЇ®«м§®ў ­ЁҐ 'first','second','third','fourth'. -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё гЄ § ­® Ё¬п гбва®©бвў  /hd/xxx, Ј¤Ґ xxx ­Ґ ­ е®¤Ёвбп - ў бЇЁбЄҐ ўлиҐ: - * eax = ebx = 1 - * Ґб«Ё гЄ § ­® ­ҐЇа ўЁ«м­®Ґ Ё¬п гбва®©бвў  - (§  ЁбЄ«о祭ЁҐ¬ ЇаҐ¤л¤г饣® б«гз п): - * eax = 5 - * ebx ­Ґ ¬Ґ­пҐвбп - * Ґб«Ё LBA-¤®бвгЇ § ЇаҐйс­ Ї®¤дг­ЄжЁҐ© 11 дг­ЄжЁЁ 21: - * eax = 2 - * ebx а §аги Ґвбп - * ¤«п а ¬¤ЁбЄ : Ї®ЇлвЄ  з⥭Ёп Ў«®Є  §  ЇаҐ¤Ґ« ¬Ё а ¬¤ЁбЄ  - (18*2*80 Ў«®Є®ў) ЇаЁў®¤Ёв Є - * eax = 3 - * ebx = 0 - * ЇаЁ гбЇҐи­®¬ з⥭ЁЁ: - * eax = ebx = 0 -‡ ¬Ґз ­Ёп: - * ђ §¬Ґа Ў«®Є  - 512 Ў ©в; зЁв Ґвбп ®¤Ё­ Ў«®Є. - * ЌҐ б«Ґ¤гҐв Ї®« Ј вмбп ­  ў®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ, - ®­® ¬®¦Ґв Ё§¬Ґ­Ёвмбп ў б«Ґ¤гойЁе ўҐабЁпе. - * ’ॡгҐвбп, зв®Ўл Ўл« а §аҐис­ LBA-¤®бвгЇ Є гбва®©бвў ¬ - Ї®¤дг­ЄжЁҐ© 11 дг­ЄжЁЁ 21. “§­ вм нв® ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁҐ© 11 дг­ЄжЁЁ 26. - * LBA-з⥭ЁҐ ¤ЁбЄҐвл ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп. - * ”г­ЄжЁп бзЁвлў Ґв ¤ ­­лҐ дЁ§ЁзҐбЄ®Ј® ¦сбвЄ®Ј® ¤ЁбЄ ; - Ґб«Ё Ї® Є ЄЁ¬-в® ЇаЁзЁ­ ¬ ­г¦­л ¤ ­­лҐ Є®­ЄаҐв­®Ј® а §¤Ґ« , - ЇаЁ¤свбп ®ЇаҐ¤Ґ«пвм ­ з «м­л© ᥪв®а нв®Ј® а §¤Ґ«  - («ЁЎ® ­ Їап¬го зҐаҐ§ MBR, «ЁЎ® Ё§ а биЁаҐ­­®© бвагЄвгал, - ў®§ўа й Ґ¬®© в®© ¦Ґ Ї®¤дг­ЄжЁҐ© 11 дг­ЄжЁЁ 18). - * ”г­ЄжЁп ­Ґ Їа®ўҐапҐв Є®¤ ®иЁЎЄЁ ¦сбвЄ®Ј® ¤ЁбЄ , в Є зв® § Їа®б - ­ҐбгйҐбвўго饣® ᥪв®а  ўбс а ў­® зв®-в® Їа®зЁв Ґв - (ўҐа®пв­ҐҐ ўбҐЈ®, ­г«Ё, ­® нв® ®ЇаҐ¤Ґ«пҐвбп гбва®©бвў®¬) Ё - нв® Ўг¤Ґв бзЁв вмбп гᯥ宬 (eax=0). - -====================================================================== -= ”г­ЄжЁп 58, Ї®¤дг­ЄжЁп 15 - Ї®«гзЁвм Ё­д®а¬ жЁо ® д ©«®ў®© бЁб⥬Ґ. -====================================================================== -Џ а ¬Ґвал: - * eax = 58 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 15 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: ЁЈ­®аЁагҐвбп - * +8: dword: ЁЈ­®аЁагҐвбп - * +12 = +0xC: dword: ЁЈ­®аЁагҐвбп - * +16 = +0x10: dword: ЁЈ­®аЁагҐвбп - * +20 = +0x14: (Їа®ўҐапҐвбп в®«мЄ® ўв®а®© бЁ¬ў®«, ба §г Ї®б«Ґ б«ни ) - /rd=/RAMDISK Ё«Ё /hd=/HARDDISK -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * Ґб«Ё ўв®а®© бЁ¬ў®« ­Ґ ЇаЁ­ ¤«Ґ¦Ёв ¬­®¦Ґбвўг {'r','R','h','H'}: - * eax = 3 - * ebx = ecx = dword [fileinfo] = 0 - * ¤«п а ¬¤ЁбЄ : - * eax = 0 (гбЇҐе) - * ebx = ®ЎйҐҐ зЁб«® Є« бвҐа®ў = 2847 - * ecx = зЁб«® бў®Ў®¤­ле Є« бвҐа®ў - * dword [fileinfo] = а §¬Ґа Є« бвҐа  = 512 - * ¤«п ¦сбвЄ®Ј® ¤ЁбЄ : Ў §  Ё а §¤Ґ« ®ЇаҐ¤Ґ«повбп Ї®¤дг­ЄжЁп¬Ё 7 Ё 8 - дг­ЄжЁЁ 21: - * eax = 0 (гбЇҐе) - * ebx = ®ЎйҐҐ зЁб«® Є« бвҐа®ў - * ecx = зЁб«® бў®Ў®¤­ле Є« бвҐа®ў - * dword [fileinfo] = а §¬Ґа Є« бвҐа  (ў Ў ©в е) -‡ ¬Ґз ­Ёп: - * ЌҐ г¤Ёў«п©вҐбм бва ­­®¬г а бЇ®«®¦Ґ­Ёо 4-Ј® ў®§ўа й Ґ¬®Ј® - Ї а ¬Ґва  - Є®Ј¤  ЇЁб «бп нв®в Є®¤, ЇаЁ бЁб⥬­ле ўл§®ў е - ЇаЁ«®¦Ґ­Ёо ў®§ўа й «Ёбм в®«мЄ® ॣЁбвал eax,ebx,ecx (Ё§ - pushad-бвагЄвгал, ЇҐаҐ¤ о饩бп Є Є  аЈг¬Ґ­в бЁб⥬­®© дг­ЄжЁЁ). - ’ҐЇҐам нв® ЁбЇа ў«Ґ­®, в Є зв®, ў®§¬®¦­®, Ё¬ҐҐв б¬лб« ў®§ўа й вм - а §¬Ґа Є« бвҐа  ў edx, Ї®Є  нвг дг­ЄжЁо ­Ґ ­ з «Ё ЁбЇ®«м§®ў вм. - * ‚®®ЎйҐ-в® Ґйс бгйҐбвўгҐв Ї®¤дг­ЄжЁп 11 дг­ЄжЁЁ 18, ў®§ўа й ой п - Ё­д®а¬ жЁо ® д ©«®ў®© бЁб⥬Ґ. Џ® а биЁаҐ­­®© в Ў«ЁжҐ ¤ЁбЄ®ў®© - Ї®¤бЁбвҐ¬л ¬®¦­® ®ЇаҐ¤Ґ«Ёвм а §¬Ґа Є« бвҐа  (в ¬ ®­ еа ­Ёвбп - ў ᥪв®а е) Ё ®ЎйҐҐ зЁб«® Є« бвҐа®ў ¤«п ¦сбвЄЁе ¤ЁбЄ®ў. - -====================================================================== -=========== ”г­ЄжЁп 60 - Inter Process Communication (IPC). ========== -====================================================================== -IPC ЇаЁ¬Ґ­пҐвбп ¤«п Ї®бл«®Є б®®ЎйҐ­Ё© ®в ®¤­®Ј® Їа®жҐбб /Ї®в®Є  -¤агЈ®¬г. ЏаЁ н⮬ б«Ґ¤гҐв ЇаҐ¤ў аЁвҐ«м­® ¤®Ј®ў®аЁвмбп ® ⮬, Є Є -Ё­вҐаЇаҐвЁа®ў вм Є®­ЄаҐв­®Ґ б®®ЎйҐ­ЁҐ. - --------- Џ®¤дг­ЄжЁп 1 - гбв ­®ўЁвм ®Ў« бвм ¤«п Ї®«г祭Ёп IPC --------- -‚л§лў Ґвбп Їа®жҐбᮬ-ЇаЁс¬­ЁЄ®¬. -Џ а ¬Ґвал: - * eax = 60 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ЎгдҐа - * edx = а §¬Ґа ЎгдҐа  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ўбҐЈ¤  гбЇҐи­® -”®а¬ в IPC-ЎгдҐа : - * +0: dword: Ґб«Ё §¤Ґбм ­Ґ 0, в® ЎгдҐа бзЁв Ґвбп § Ў«®ЄЁа®ў ­­л¬; - Ў«®ЄЁаг©вҐ/а §Ў«®ЄЁаг©вҐ ЎгдҐа, Є®Ј¤  ўл б ­Ё¬  ЄвЁў­® а Ў®в ҐвҐ - Ё ў ¬ ­ ¤®, зв®Ўл Ё§ў­Ґ ­Ґ Ё§¬Ґ­п«Ёбм ¤ ­­лҐ ЎгдҐа  - (­Ґ Ї®бвгЇ «Ё ­®ўлҐ б®®ЎйҐ­Ёп) - * +4: dword: § ­пв® ¬Ґбв  ў ЎгдҐаҐ (ў Ў ©в е) - * +8: ЇҐаў®Ґ б®®ЎйҐ­ЁҐ - * +8+n: ўв®а®Ґ б®®ЎйҐ­ЁҐ - * ... -”®а¬ в б®®ЎйҐ­Ёп: - * +0: dword: PID Їа®жҐбб /Ї®в®Є , Ї®б« ўиҐЈ® б®®ЎйҐ­ЁҐ - * +4: dword: ¤«Ё­  б®®ЎйҐ­Ёп (­Ґ бзЁв п нв®в § Ј®«®ў®Є) - * +8: n*byte: ¤ ­­лҐ б®®ЎйҐ­Ёп - ---------------- Џ®¤дг­ЄжЁп 2 - Ї®б« вм б®®ЎйҐ­ЁҐ IPC. ---------------- -‚л§лў Ґвбп Їа®жҐбᮬ-Ё­ЁжЁ в®а®¬. -Џ а ¬Ґвал: - * eax = 60 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = PID ЇаЁс¬­ЁЄ  - * edx = гЄ § вҐ«м ­  ¤ ­­лҐ б®®ЎйҐ­Ёп - * esi = ¤«Ё­  б®®ЎйҐ­Ёп (ў Ў ©в е) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ЇаЁс¬­ЁЄ ­Ґ ®ЇаҐ¤Ґ«Ё« ЎгдҐа ¤«п IPC-б®®ЎйҐ­Ё© - (¬®¦Ґв Ўлвм, Ґйс ­Ґ гбЇҐ«,   ¬®¦Ґв Ўлвм, нв® ­Ґ в®в Ї®в®Є, - Є®в®ал© ­г¦Ґ­) - * eax = 2 - ЇаЁс¬­ЁЄ § Ў«®ЄЁа®ў « IPC-ЎгдҐа; - Ї®Їа®Ўг©вҐ ­Ґ¬­®Ј® Ї®¤®¦¤ вм - * eax = 3 - ЇҐаҐЇ®«­Ґ­ЁҐ IPC-ЎгдҐа  ЇаЁс¬­ЁЄ  - * eax = 4 - Їа®жҐбб /Ї®в®Є  б в ЄЁ¬ PID ­Ґ бгйҐбвўгҐв -‡ ¬Ґз ­Ёп: - * ‘Ёб⥬  ба §г Ї®б«Ґ § ЇЁбЁ IPC-б®®ЎйҐ­Ёп ў ЎгдҐа Ї®бл« Ґв - Ї®в®Єг-ЇаЁс¬­ЁЄг б®ЎлвЁҐ б Є®¤®¬ 7 (б¬. Є®¤л б®ЎлвЁ©). - -====================================================================== -=== ”г­ЄжЁп 61 - Ї®«гзЁвм Ї а ¬Ґвал ¤«п ЇаאַЈ® ¤®бвгЇ  Є Ја дЁЄҐ. === -====================================================================== -Џа®Ја ¬¬Ґ ¤®бвгЇ­л ¤ ­­лҐ Ја дЁзҐбЄ®Ј® нЄа ­  (®Ў« бвм Ї ¬пвЁ, Є®в®а п -б®Ўб⢥­­® Ё ®в®Ўа ¦ Ґв ᮤҐа¦Ё¬®Ґ нЄа ­ ) ­ Їап¬го ЎҐ§ ўл§®ў®ў -бЁб⥬­ле дг­ЄжЁ© зҐаҐ§ ᥫҐЄв®а gs: - mov eax, [gs:0] -Ї®¬ҐбвЁв ў eax ЇҐаўл© dword ЎгдҐа , ᮤҐа¦ йЁ© Ё­д®а¬ жЁо ® 梥⥠-«Ґў®© ўҐае­Ґ© в®зЄЁ (Ё, ў®§¬®¦­®, жўҐв  ­ҐбЄ®«мЄЁе б«Ґ¤гойЁе). - mov [gs:0], eax -ЇаЁ а Ў®вҐ ў ०Ё¬ е VESA c LFB -гбв ­®ўЁв 梥⠫Ґў®© ўҐае­Ґ© в®зЄЁ -(Ё ў®§¬®¦­®, жўҐв  ­ҐбЄ®«мЄЁе б«Ґ¤гойЁе). -„«п Ё­вҐаЇаҐв жЁЁ ¤ ­­ле Ја дЁзҐбЄ®Ј® нЄа ­  вॡгҐвбп §­ ­ЁҐ -­ҐЄ®в®але Ї а ¬Ґва®ў, Є®в®алҐ ў®§ўа й овбп нв®© дг­ЄжЁҐ©. -‡ ¬Ґз ­Ёп: - * Џ а ¬Ґвал Ја дЁЄЁ ®зҐ­м ।Є® ¬Ґ­повбп ЇаЁ а Ў®вҐ бЁб⥬л, -   Ё¬Ґ­­®, в®«мЄ® ў б«гз пе, Є®Ј¤  Ї®«м§®ў вҐ«м а Ў®в Ґв - б Їа®Ја ¬¬®© VRR. - * ЏаЁ Ё§¬Ґ­Ґ­ЁЁ ўЁ¤Ґ®аҐ¦Ё¬  бЁб⥬  ЇҐаҐаЁб®ўлў Ґв ўбҐ ®Є­  - (б®ЎлвЁҐ б Є®¤®¬ 1) Ё ЇҐаҐаЁб®ўлў Ґв д®­ (б®ЎлвЁҐ 5). - ќвЁ ¦Ґ б®ЎлвЁп Їа®Ёб室пв Ё ў ¤агЈЁе б«гз пе, - Є®в®алҐ ўбваҐз овбп §­ зЁвҐ«м­® з йҐ, 祬 Ё§¬Ґ­Ґ­ЁҐ ўЁ¤Ґ®аҐ¦Ё¬ . - * ЏаЁ а Ў®вҐ ў ўЁ¤Ґ®аҐ¦Ё¬ е б LFB ᥫҐЄв®а gs гЄ §лў Ґв ­  - б®Ўб⢥­­® LFB, в Є зв® з⥭ЁҐ/§ ЇЁбм Ї® gs ЇаЁў®¤пв - ­ҐЇ®б।б⢥­­® Є Ё§¬Ґ­Ґ­Ёо ᮤҐа¦Ё¬®Ј® нЄа ­ . ЏаЁ а Ў®вҐ ў - ўЁ¤Ґ®аҐ¦Ё¬ е ЎҐ§ LFB gs гЄ §лў Ґв ­  ­ҐЄ®в®аго ®Ў« бвм ¤ ­­ле - п¤а , ЇаЁзс¬ ўбҐ дг­ЄжЁЁ ўлў®¤  ­  нЄа ­ ¤®Ўа®б®ўҐбв­® ўлЇ®«­пов - ¤ў®©­го а Ў®вг Ї® § ЇЁбЁ ­ҐЇ®б।б⢥­­® ­  нЄа ­ Ё Ї® § ЇЁбЁ - ў нв®в ЎгдҐа. ‚ १г«мв вҐ ЇаЁ з⥭ЁЁ ᮤҐа¦Ё¬®Ј® нв®Ј® ЎгдҐа  - १г«мв вл ᮮ⢥вбвўгов ᮤҐа¦Ё¬®¬г нЄа ­  - (б, ў®®ЎйҐ Ј®ў®ап, Ў®«миЁ¬ жўҐв®ўл¬ а §аҐиҐ­ЁҐ¬), -   § ЇЁбм ЁЈ­®аЁагҐвбп. - €бЄ«о祭ЁҐ¬ пў«пҐвбп ०Ё¬ 320*200, ¤«п Є®в®а®Ј® ў Ј« ў­®¬ жЁЄ«Ґ - бЁб⥬­®Ј® Ї®в®Є  ўлЇ®«­пҐвбп ®Ў­®ў«Ґ­ЁҐ нЄа ­  ў ᮮ⢥вбвўЁЁ - б ¤ўЁ¦Ґ­Ёп¬Ё Єгаб®а  ¬лиЁ. - -------------------------- ђ §аҐиҐ­ЁҐ нЄа ­  -------------------------- -Џ а ¬Ґвал: - * eax = 61 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = [а §аҐиҐ­ЁҐ Ї® ®бЁ x]*65536 + [а §аҐиҐ­ЁҐ Ї® ®бЁ y] -‡ ¬Ґз ­Ёп: - * Њ®¦­® ЁбЇ®«м§®ў вм дг­ЄжЁо 14 б гзс⮬ в®Ј®, зв® ®­  ў®§ўа й Ґв - а §¬Ґал ­  1 ¬Ґ­миҐ. ќв® Ї®«­®бвмо нЄўЁў «Ґ­в­л© бЇ®б®Ў. - ------------------------- —Ёб«® ЎЁв ­  ЇЁЄбҐ«м ------------------------ -Џ а ¬Ґвал: - * eax = 61 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = зЁб«® ЎЁв ­  ЇЁЄбҐ«м (24 Ё«Ё 32) - ------------------------- —Ёб«® Ў ©в ­  бва®Єг ------------------------ -Џ а ¬Ґвал: - * eax = 61 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = зЁб«® Ў ©в, Є®в®а®Ґ § ­Ё¬ Ґв ®¤­  бва®Є  а §ўсавЄЁ - (Ј®аЁ§®­в «м­ п «Ё­Ёп ­  нЄа ­Ґ) - -====================================================================== -===== ”г­ЄжЁп 62, Ї®¤дг­ЄжЁп 0 - Ї®«гзЁвм ўҐабЁо PCI-Ё­вҐа䥩б . ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 62 - ­®¬Ґа дг­ЄжЁЁ - * bl = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ¤®бвгЇ Є PCI § ЇаҐйс­; Ё­ зҐ - * ah.al = ўҐабЁп PCI-Ё­вҐадҐ©б  (ah=ўҐабЁп, al=Ї®¤ўҐабЁп) - * бв а襥 б«®ў® eax ®Ў­г«Ґ­® -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм а §аҐис­ ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є PCI - ¤«п ЇаЁ«®¦Ґ­Ё© Ї®¤дг­ЄжЁҐ© 12 дг­ЄжЁЁ 21. - * …б«Ё PCI BIOS ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп, в® §­ зҐ­ЁҐ ax ­Ґ®ЇаҐ¤Ґ«Ґ­®. - -====================================================================== -==== ”г­ЄжЁп 62, Ї®¤дг­ЄжЁп 1 - Ї®«гзЁвм ­®¬Ґа Ї®б«Ґ¤­Ґ© PCI-иЁ­л. === -====================================================================== -Џ а ¬Ґвал: - * eax = 62 - ­®¬Ґа дг­ЄжЁЁ - * bl = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ¤®бвгЇ Є PCI § ЇаҐйс­; Ё­ зҐ - * al = ­®¬Ґа Ї®б«Ґ¤­Ґ© PCI-иЁ­л; ®бв ўиЁҐбп Ў ©вл eax а §аги овбп -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм а §аҐис­ ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є PCI - ¤«п ЇаЁ«®¦Ґ­Ё© Ї®¤дг­ЄжЁҐ© 12 дг­ЄжЁЁ 21. - * …б«Ё PCI BIOS ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп, в® §­ зҐ­ЁҐ al ­Ґ®ЇаҐ¤Ґ«Ґ­®. - -====================================================================== -====================== ”г­ЄжЁп 62, Ї®¤дг­ЄжЁп 2 ====================== -== Џ®«гзЁвм ¬Ґе ­Ё§¬ ®Ўа йҐ­Ёп Є Є®­дЁЈга жЁ®­­®¬г Їа®бва ­бвўг PCI. = -====================================================================== -Џ а ¬Ґвал: - * eax = 62 - ­®¬Ґа дг­ЄжЁЁ - * bl = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ¤®бвгЇ Є PCI § ЇаҐйс­; Ё­ зҐ - * al = ¬Ґе ­Ё§¬ (1 Ё«Ё 2); Їа®зЁҐ Ў ©вл eax а §аги овбп -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм а §аҐис­ ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є PCI - ¤«п ЇаЁ«®¦Ґ­Ё© Ї®¤дг­ЄжЁҐ© 12 дг­ЄжЁЁ 21. - * ЊҐе ­Ё§¬ ®Ўа йҐ­Ёп ўлЎЁа Ґвбп ў ᮮ⢥вбвўЁЁ - б е а ЄвҐаЁбвЁЄ ¬Ё ®Ў®а㤮ў ­Ёп. - * Џ®¤дг­ЄжЁЁ з⥭Ёп Ё § ЇЁбЁ  ўв®¬ вЁзҐбЄЁ а Ў®в ов - б ўлЎа ­­л¬ ¬Ґе ­Ё§¬®¬. - -====================================================================== -======== ”г­ЄжЁп 62, Ї®¤дг­ЄжЁЁ 4,5,6 - Їа®зЁв вм PCI-ॣЁбва. ======= -====================================================================== -Џ а ¬Ґвал: - * eax = 62 - ­®¬Ґа дг­ЄжЁЁ - * bl = 4 - зЁв вм Ў ©в - * bl = 5 - зЁв вм б«®ў® - * bl = 6 - зЁв вм ¤ў®©­®Ґ б«®ў® - * bh = ­®¬Ґа PCI-иЁ­л - * ch = dddddfff, Ј¤Ґ ddddd = ­®¬Ґа гбва®©бвў  ­  иЁ­Ґ, - fff = ­®¬Ґа дг­ЄжЁЁ гбва®©бвў  - * cl = ­®¬Ґа ॣЁбва  (¤®«¦Ґ­ Ўлвм зсв­л¬ ¤«п bl=5, - ¤Ґ«Ёвмбп ­  4 ¤«п bl=6) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ®иЁЎЄ  (§ ЇаҐйс­ ¤®бвгЇ Є PCI Ё«Ё - ­ҐЇ®¤¤Ґа¦Ёў Ґ¬лҐ Ї а ¬Ґвал); Ё­ зҐ - * al/ax/eax (ў § ўЁбЁ¬®бвЁ ®в § Їа®иҐ­­®Ј® а §¬Ґа ) ᮤҐа¦Ёв ¤ ­­лҐ; - ®бв ўи пбп з бвм ॣЁбва  eax а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм а §аҐис­ ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є PCI - ¤«п ЇаЁ«®¦Ґ­Ё© Ї®¤дг­ЄжЁҐ© 12 дг­ЄжЁЁ 21. - * ЊҐе ­Ё§¬ ¤®бвгЇ  2 Ї®¤¤Ґа¦Ёў Ґв в®«мЄ® 16 гбва®©бвў ­  иЁ­Ґ Ё - ЁЈ­®аЁагҐв ­®¬Ґа дг­ЄжЁЁ. Џ®«гзЁвм ¬Ґе ­Ё§¬ ¤®бвгЇ  ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 2. - * ЌҐЄ®в®алҐ аҐЈЁбвал бв ­¤ ав­л Ё бгйҐбвўгов ¤«п ўбҐе гбва®©бвў, - ­ҐЄ®в®алҐ ®ЇаҐ¤Ґ«повбп Є®­ЄаҐв­л¬ гбва®©бвў®¬. ‘ЇЁб®Є ЇҐаўле - ўе®¤Ёв, ­ ЇаЁ¬Ґа, ў Ё§ўҐбв­л© Interrupt List by Ralf Brown - (http://www.pobox.com/~ralf/files.html, - ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/); - бЇЁб®Є ўв®але ¤®«¦Ґ­ Ўлвм гЄ § ­ ў ¤®Єг¬Ґ­в жЁЁ Ї® гбва®©бвўг. - -====================================================================== -======= ”г­ЄжЁп 62, Ї®¤дг­ЄжЁЁ 8,9,10 - § ЇЁб вм ў PCI-ॣЁбва. ====== -====================================================================== -Џ а ¬Ґвал: - * eax = 62 - ­®¬Ґа дг­ЄжЁЁ - * bl = 8 - ЇЁб вм Ў ©в - * bl = 9 - ЇЁб вм б«®ў® - * bl = 10 - ЇЁб вм ¤ў®©­®Ґ б«®ў® - * bh = ­®¬Ґа PCI-иЁ­л - * ch = dddddfff, Ј¤Ґ ddddd = ­®¬Ґа гбва®©бвў  ­  иЁ­Ґ, - fff = ­®¬Ґа дг­ЄжЁЁ гбва®©бвў  - * cl = ­®¬Ґа ॣЁбва  (¤®«¦Ґ­ Ўлвм зсв­л¬ ¤«п bl=9, - ¤Ґ«Ёвмбп ­  4 ¤«п bl=10) - * dl/dx/edx (ў § ўЁбЁ¬®бвЁ ®в § Їа®иҐ­­®Ј® а §¬Ґа ) ᮤҐа¦Ёв - ¤ ­­лҐ ¤«п § ЇЁбЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 - ®иЁЎЄ  (§ ЇаҐйс­ ¤®бвгЇ Є PCI Ё«Ё - ­ҐЇ®¤¤Ґа¦Ёў Ґ¬лҐ Ї а ¬Ґвал) - * eax = 0 - гбЇҐи­® -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм а §аҐис­ ­Ё§Є®га®ў­Ґўл© ¤®бвгЇ Є PCI - ¤«п ЇаЁ«®¦Ґ­Ё© Ї®¤дг­ЄжЁҐ© 12 дг­ЄжЁЁ 21. - * ЊҐе ­Ё§¬ ¤®бвгЇ  2 Ї®¤¤Ґа¦Ёў Ґв в®«мЄ® 16 гбва®©бвў ­  иЁ­Ґ Ё - ЁЈ­®аЁагҐв ­®¬Ґа дг­ЄжЁЁ. Џ®«гзЁвм ¬Ґе ­Ё§¬ ¤®бвгЇ  ¬®¦­® ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 2. - * ЌҐЄ®в®алҐ аҐЈЁбвал бв ­¤ ав­л Ё бгйҐбвўгов ¤«п ўбҐе гбва®©бвў, - ­ҐЄ®в®алҐ ®ЇаҐ¤Ґ«повбп Є®­ЄаҐв­л¬ гбва®©бвў®¬. ‘ЇЁб®Є ЇҐаўле - ўе®¤Ёв, ­ ЇаЁ¬Ґа, ў Ё§ўҐбв­л© Interrupt List by Ralf Brown; - бЇЁб®Є ўв®але ¤®«¦Ґ­ Ўлвм гЄ § ­ ў ¤®Єг¬Ґ­в жЁЁ Ї® гбва®©бвўг. - -====================================================================== -================ ”г­ЄжЁп 63 - а Ў®в  б ¤®бЄ®© ®в« ¤ЄЁ. =============== -====================================================================== -„®бЄ  ®в« ¤ЄЁ ЇаҐ¤бв ў«пҐв б®Ў®© бЁб⥬­л© ЎгдҐа (­  4096 Ў ©в), -ў Є®в®ал© «оЎ п Їа®Ја ¬¬  ¬®¦Ґв § ЇЁб вм (ў®®ЎйҐ Ј®ў®ап, Їа®Ё§ў®«м­лҐ) -¤ ­­лҐ Ё Ё§ Є®в®а®Ј® ¤агЈ п Їа®Ја ¬¬  ¬®¦Ґв нвЁ ¤ ­­лҐ Їа®зЁв вм. -…бвм б®Ј« иҐ­ЁҐ, ў ᮮ⢥вбвўЁЁ б Є®в®ал¬ § ЇЁблў Ґ¬лҐ ¤ ­­лҐ - -⥪бв®ўлҐ бва®ЄЁ, Ё­вҐаЇаҐвЁагҐ¬лҐ Є Є ®в« ¤®з­лҐ б®®ЎйҐ­Ёп ® 室Ґ -ўлЇ®«­Ґ­Ёп Їа®Ја ¬¬л. џ¤а® ў ®ЇаҐ¤Ґ«с­­ле бЁвг жЁпе в Є¦Ґ § ЇЁблў Ґв -­  ¤®бЄг ®в« ¤ЄЁ ᢥ¤Ґ­Ёп ® ўлЇ®«­Ґ­ЁЁ ­ҐЄ®в®але дг­ЄжЁ©; -Ї® б®Ј« иҐ­Ёо б®®ЎйҐ­Ёп п¤а  ­ зЁ­ овбп б ЇаҐдЁЄб  "K : ". -„«п Їа®б¬®ва  ¤®бЄЁ ®в« ¤ЄЁ ᮧ¤ ­® ЇаЁ«®¦Ґ­ЁҐ board, -Є®в®а®Ґ бзЁвлў Ґв ¤ ­­лҐ Ё§ ЎгдҐа  Ё ®в®Ўа ¦ Ґв Ёе ў бў®с¬ ®Є­Ґ. board -Ї®­Ё¬ Ґв Ї®б«Ґ¤®ў вҐ«м­®бвм Є®¤®ў 13,10 Є Є ЇҐаҐе®¤ ­  ­®ўго бва®Єг. -‘Ё¬ў®« б ­г«Ґўл¬ Є®¤®¬ ў Є®­жҐ бва®ЄЁ ­Ґ ®Ўп§ вҐ«Ґ­, ­® Ё ­Ґ ¬Ґи Ґв. -‚ бўп§Ё б Ї®пў«Ґ­ЁҐ¬ ®в« ¤зЁЄ  業­®бвм ¤®бЄЁ ®в« ¤ЄЁ ­ҐбЄ®«мЄ® -б­Ё§Ё« бм, Ї®бЄ®«мЄг ®в« ¤зЁЄ Ї®§ў®«пҐв Ї®«­®бвмо Є®­ва®«Ёа®ў вм 室 -ўлЇ®«­Ґ­Ёп Їа®Ја ¬¬л, ЇаЁзс¬ ¤«п нв®Ј® ­Ґ вॡгҐвбп ­ЁЄ ЄЁе гбЁ«Ё© -б® бв®а®­л б ¬®© Їа®Ја ¬¬л. ’Ґ¬ ­Ґ ¬Ґ­ҐҐ ў® ¬­®ЈЁе б«гз пе -¤®бЄ  ®в« ¤ЄЁ Їа®¤®«¦ Ґв ®бв ў вмбп Ї®«Ґ§­®©. - ----------------------------- ‡ ЇЁбм Ў ©в  ---------------------------- -Џ а ¬Ґвал: - * eax = 63 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * cl = Ў ©в ¤ ­­ле -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Ѓ ©в § ЇЁблў Ґвбп ў ЎгдҐа. „«Ё­  ЎгдҐа  - 512 Ў ©в. - ЏаЁ ЇҐаҐЇ®«­Ґ­ЁЁ ЎгдҐа  ўбҐ Ї®«г祭­лҐ ¤ ­­лҐ вҐаповбп - Ё § Ї®«­Ґ­ЁҐ ­ зЁ­ Ґвбп б­®ў  б ­г«п. - * „«п ўлў®¤  ­  ¤®бЄг ®в« ¤ЄЁ Ў®«ҐҐ б«®¦­ле ®ЎкҐЄв®ў (бва®Є, зЁбҐ«) - ¤®бв в®з­® нв®© дг­ЄжЁЁ, ўл§лў Ґ¬®© ў жЁЄ«Ґ. Њ®¦­® ­Ґ ЇЁб вм - ўагз­го ᮮ⢥вбвўгойЁ© Є®¤,   ў®бЇ®«м§®ў вмбп д ©«®¬ debug.inc, - ўе®¤пйЁ¬ ў ¤ЁбваЁЎгвЁў. - ----------------------------- —⥭ЁҐ Ў ©в  ---------------------------- -‡ ЎЁа Ґв Ў ©в Ё§ ЎгдҐа . -Џ а ¬Ґвал: - * eax = 63 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ebx = 0 - ЎгдҐа Їгбв - * eax = Ў ©в, ebx = 1 - Ў ©в гбЇҐи­® Їа®зЁв ­ - -====================================================================== -========== ”г­ЄжЁп 64 - ЇҐаҐа бЇаҐ¤Ґ«Ёвм Ї ¬пвм ЇаЁ«®¦Ґ­Ёп. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 64 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - Ґ¤Ё­б⢥­­ п Ї®¤дг­ЄжЁп - * ecx = ­®ўл© а §¬Ґа Ї ¬пвЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ­Ґ¤®бв в®з­® Ї ¬пвЁ -‡ ¬Ґз ­Ёп: - * …бвм ¤агЈ®© бЇ®б®Ў ўл¤Ґ«Ґ­Ёп/®бў®Ў®¦¤Ґ­Ёп ¤Ё­ ¬ЁзҐбЄ®© Ї ¬пвЁ - - Ї®¤дг­ЄжЁЁ 11, 12, 13 дг­ЄжЁЁ 68. - * ”г­ЄжЁп ­Ґ ¬®¦Ґв ЁбЇ®«м§®ў вмбп б®ў¬Ґбв­® б 68.11, 68.12, 68.13. - ‚맮ў дг­ЄжЁЁ Ўг¤Ґв ЁЈ­®аЁа®ў вмбп, Ґб«Ё ЇаЁ«®¦Ґ­ЁҐ ᮧ¤ бв - «®Є «м­го Єгз㠢맮ў®¬ 68.11. - -====================================================================== -========= ”г­ЄжЁп 65 - ўлўҐбвЁ Ё§®Ўа ¦Ґ­ЁҐ б Ї «Ёва®© ў ®Є­®. ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 65 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё§®Ўа ¦Ґ­ЁҐ - * ecx = [а §¬Ґа Ї® ®бЁ x]*65536 + [а §¬Ґа Ї® ®бЁ y] - * edx = [Є®®а¤Ё­ в  Ї® ®бЁ x]*65536 + [Є®®а¤Ё­ в  Ї® ®бЁ y] - * esi = зЁб«® ЎЁв ­  ЇЁЄбҐ«м, ¤®«¦­® Ўлвм 1,2,4,8,15,16,24 Ё«Ё 32 - * edi = гЄ § вҐ«м ­  Ї «Ёваг (2 ў б⥯Ґ­Ё esi 梥⮢ 0x00RRGGBB); - ЁЈ­®аЁагҐвбп ЇаЁ esi > 8 - * ebp = ᬥ饭ЁҐ ¤ ­­ле Є ¦¤®© б«Ґ¤го饩 бва®ЄЁ Ё§®Ўа ¦Ґ­Ёп - ®в­®бЁвҐ«м­® ЇаҐ¤л¤г饩 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Љ®®а¤Ё­ вл Ё§®Ўа ¦Ґ­Ёп - нв® Є®®а¤Ё­ вл ўҐае­ҐЈ® «Ґў®Ј® гЈ«  - Ё§®Ўа ¦Ґ­Ёп ®в­®бЁвҐ«м­® ®Є­ . - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 1 ЎЁв®¬ ­  ЇЁЄбҐ«м: Є ¦¤л© Ў ©в Ё§®Ўа ¦Ґ­Ёп, - §  ЁбЄ«о祭ЁҐ¬, Ўлвм ¬®¦Ґв, Ї®б«Ґ¤­Ёе Ў ©в®ў бва®Є, ᮤҐа¦Ёв - Ё­д®а¬ жЁо ® 梥⥠8 ЇЁЄбҐ«Ґ©, бв аиЁ© ЎЁв ᮮ⢥вбвўгҐв ЇҐаў®¬г - ЇЁЄбҐ«о. - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 2 ЎЁв ¬Ё ­  ЇЁЄбҐ«м: Є ¦¤л© Ў ©в Ё§®Ўа ¦Ґ­Ёп, - §  ЁбЄ«о祭ЁҐ¬, Ўлвм ¬®¦Ґв, Ї®б«Ґ¤­Ёе Ў ©в®ў бва®Є, ᮤҐа¦Ёв - Ё­д®а¬ жЁо ® 梥⥠4 ЇЁЄбҐ«Ґ©, бв аиЁҐ ¤ў  ЎЁв  ᮮ⢥вбвўгов - ЇҐаў®¬г ЇЁЄбҐ«о. - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 4 ЎЁв ¬Ё ­  ЇЁЄбҐ«м: Є ¦¤л© Ў ©в Ё§®Ўа ¦Ґ­Ёп, - §  ЁбЄ«о祭ЁҐ¬ Ї®б«Ґ¤­Ёе Ў ©в®ў бва®Є (Ґб«Ё иЁаЁ­  Ё§®Ўа ¦Ґ­Ёп - ­Ґзсв­ ), ᮤҐа¦Ёв Ё­д®а¬ жЁо ® 梥⥠2 ЇЁЄбҐ«Ґ©, бв аи п вҐва ¤  - ᮮ⢥вбвўгҐв ЇҐаў®¬г ЇЁЄбҐ«о. - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 8 ЎЁв ¬Ё ­  ЇЁЄбҐ«м: Є ¦¤л© Ў ©в Ё§®Ўа ¦Ґ­Ёп - а бб¬ ваЁў Ґвбп Є Є Ё­¤ҐЄб ў Ї «ЁваҐ. - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 15 ЎЁв ¬Ё ­  ЇЁЄбҐ«м: 梥⠪ ¦¤®Ј® ЇЁЄбҐ«п - Є®¤ЁагҐвбп Є Є (ў ЎЁв®ў®¬ ЇаҐ¤бв ў«Ґ­ЁЁ) 0RRRRRGGGGGBBBBB - - Ї® 5 ЇЁЄбҐ«Ґ© ­  Є ¦¤л© 梥в. - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 16 ЎЁв ¬Ё ­  ЇЁЄбҐ«м: 梥⠪ ¦¤®Ј® ЇЁЄбҐ«п - Є®¤ЁагҐвбп Є Є RRRRRGGGGGGBBBBB (б奬  5+6+5). - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 24 ЎЁв ¬Ё ­  ЇЁЄбҐ«м: 梥⠪ ¦¤®Ј® ЇЁЄбҐ«п - Є®¤ЁагҐвбп ваҐ¬п Ў ©в ¬Ё - Ї®б«Ґ¤®ў вҐ«м­® бЁ­пп, §Ґ«с­ п, Єа б­ п - б®бв ў«пойЁҐ 梥в . - * ”®а¬ в Ё§®Ўа ¦Ґ­Ёп б 32 ЎЁв ¬Ё ­  ЇЁЄбҐ«м:  ­ «®ЈЁз­® 24, в®«мЄ® - Ґбвм Ґйс ЁЈ­®аЁагҐ¬л© зҐвўсавл© Ў ©в. - * ‚맮ў дг­ЄжЁЁ 7 нЄўЁў «Ґ­вҐ­ ўл§®ўг нв®© дг­ЄжЁЁ б Ї а ¬Ґва ¬Ё - esi=24, ebp=0. - -====================================================================== -================= ”г­ЄжЁп 66 - а Ў®в  б Є« ўЁ вга®©. ================= -====================================================================== -ђҐ¦Ё¬ ўў®¤  ў«ЁпҐв ­  १г«мв вл з⥭Ёп Є« ўЁи дг­ЄжЁҐ© 2. -ЏаЁ § Јаг§ЄҐ Їа®Ја ¬¬л ¤«п ­Ґс гбв ­ ў«Ёў Ґвбп ASCII-०Ё¬ ўў®¤ . - --------- Џ®¤дг­ЄжЁп 1 - гбв ­®ўЁвм ०Ё¬ ўў®¤  б Є« ўЁ вгал. --------- -Џ а ¬Ґвал: - * eax = 66 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ०Ё¬: - * 0 = ®Ўлз­л© (ASCII-бЁ¬ў®«л) - * 1 = бЄ ­Є®¤л -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - ---------- Џ®¤дг­ЄжЁп 2 - Ї®«гзЁвм ०Ё¬ ўў®¤  б Є« ўЁ вгал. ---------- -Џ а ¬Ґвал: - * eax = 66 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ⥪гйЁ© ०Ё¬ - -------- Џ®¤дг­ЄжЁп 3 - Ї®«гзЁвм б®бв®п­ЁҐ гЇа ў«пойЁе Є« ўЁи. -------- -Џ а ¬Ґвал: - * eax = 66 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ЎЁв®ў п ¬ бЄ : - * ЎЁв 0 (¬ бЄ  1): «Ґўл© Shift ­ ¦ в - * ЎЁв 1 (¬ бЄ  2): Їа ўл© Shift ­ ¦ в - * ЎЁв 2 (¬ бЄ  4): «Ґўл© Ctrl ­ ¦ в - * ЎЁв 3 (¬ бЄ  8): Їа ўл© Ctrl ­ ¦ в - * ЎЁв 4 (¬ бЄ  0x10): «Ґўл© Alt ­ ¦ в - * ЎЁв 5 (¬ бЄ  0x20): Їа ўл© Alt ­ ¦ в - * ЎЁв 6 (¬ бЄ  0x40): CapsLock ўЄ«озс­ - * ЎЁв 7 (¬ бЄ  0x80): NumLock ўЄ«озс­ - * ЎЁв 8 (¬ бЄ  0x100): ScrollLock ўЄ«озс­ - * Їа®зЁҐ ЎЁвл бЎа®иҐ­л - ------ Џ®¤дг­ЄжЁп 4 - гбв ­®ўЁвм ®ЎйҐбЁб⥬­го "Ј®апзго Є« ўЁиг". ----- -Ћ ­ ¦ вЁЁ "Ј®ап祩 Є« ўЁиЁ" Ё§ўҐй овбп в®«мЄ® ЇаЁ«®¦Ґ­Ёп, -гбв ­®ўЁўиЁҐ Ґс;  ЄвЁў­®Ґ ЇаЁ«®¦Ґ­ЁҐ (Є Є®в®а®¬г Ї®бвгЇ Ґв -ўҐбм ­®а¬ «м­л© ўў®¤) в ЄЁе Є« ўЁи ­Ґ Ї®«гз Ґв. -€§ўҐйҐ­ЁҐ § Є«оз Ґвбп ў Ї®бл«ЄҐ б®ЎлвЁп б Є®¤®¬ 2. -Џа®зЁв вм "Ј®апзго Є« ўЁиг" ¬®¦­® в Є ¦Ґ, Є Є Ё ®Ўлз­го, - -дг­ЄжЁҐ© 2. -Џ а ¬Ґвал: - * eax = 66 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * cl § ¤ св бЄ ­Є®¤ Є« ўЁиЁ; - ЁбЇ®«м§г©вҐ cl=0 ¤«п § ¤ ­Ёп Є®¬ЎЁ­ жЁ© вЁЇ  Ctrl+Shift - * edx = 0xXYZ § ¤ св ў®§¬®¦­лҐ б®бв®п­Ёп гЇа ў«пойЁе Є« ўЁи: - * Z (¬« ¤иЁҐ 4 ЎЁв ) § ¤ св б®бв®п­ЁҐ Є« ўЁи LShift Ё RShift: - * 0 = ­Ё ®¤­  Ё§ Є« ўЁи ­Ґ ¤®«¦­  Ўлвм ­ ¦ в ; - * 1 = а®ў­® ®¤­  Ё§ Є« ўЁи ¤®«¦­  Ўлвм ­ ¦ в ; - * 2 = ®ЎҐ Є« ўЁиЁ ¤®«¦­л Ўлвм ­ ¦ вл; - * 3 = ¤®«¦­  Ўлвм ­ ¦ в  LShift, ­® ­Ґ RShift; - * 4 = ¤®«¦­  Ўлвм ­ ¦ в  RShift, ­® ­Ґ LShift - * Y -  ­ «®ЈЁз­® ¤«п LCtrl Ё RCtrl; - * X -  ­ «®ЈЁз­® ¤«п LAlt Ё RAlt -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax=0 - гбЇҐи­® - * eax=1 - б«ЁиЄ®¬ ¬­®Ј® "Ј®апзЁе Є« ўЁи" (¤®ЇгбЄ Ґвбп ¬ ЄбЁ¬г¬ 256) -‡ ¬Ґз ­Ёп: - * ѓ®апз п Є« ўЁи  ¬®¦Ґв ба Ў влў вм «ЁЎ® ЇаЁ ­ ¦ вЁЁ, - «ЁЎ® ЇаЁ ®вЇгбЄ ­ЁЁ. ‘Є ­Є®¤ ®вЇгбЄ ­Ёп Є« ўЁиЁ ­  128 Ў®«миҐ, - 祬 бЄ ­Є®¤ ­ ¦ вЁп (в.Ґ. гбв ­®ў«Ґ­ бв аиЁ© ЎЁв). - * ЌҐбЄ®«мЄ® ЇаЁ«®¦Ґ­Ё© ¬®Јгв гбв ­®ўЁвм ®¤­г Ё вг ¦Ґ Є®¬ЎЁ­ жЁо; - ® ­ ¦ вЁЁ в Є®© Є®¬ЎЁ­ жЁЁ Ўг¤гв Ё§ўҐй вмбп ўбҐ в ЄЁҐ ЇаЁ«®¦Ґ­Ёп. - ------- Џ®¤дг­ЄжЁп 5 - г¤ «Ёвм гбв ­®ў«Ґ­­го "Ј®апзго Є« ўЁиг". ------- -Џ а ¬Ґвал: - * eax = 66 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * cl = бЄ ­Є®¤ Є« ўЁиЁ Ё edx = 0xXYZ в ЄЁҐ ¦Ґ, Є Є Ё ў Ї®¤дг­ЄжЁЁ 4 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ­Ґв в Є®© Ј®ап祩 Є« ўЁиЁ -‡ ¬Ґз ­Ёп: - * ЏаЁ § ўҐа襭ЁЁ Їа®жҐбб /Ї®в®Є  г¤ «повбп ўбҐ гбв ­®ў«Ґ­­лҐ Ё¬ - Ј®апзЁҐ Є« ўЁиЁ. - * ‚맮ў дг­ЄжЁЁ ­Ґ ў«ЁпҐв ­  ¤агЈЁҐ ЇаЁ«®¦Ґ­Ёп. - …б«Ё ¤агЈ®Ґ ЇаЁ«®¦Ґ­ЁҐ ®ЇаҐ¤Ґ«Ё«® нвг ¦Ґ Є®¬ЎЁ­ жЁо, - ®­® Ї®-ЇаҐ¦­Ґ¬г Ўг¤Ґв Ї®«гз вм 㢥¤®¬«Ґ­Ёп. - -====================================================================== -============ ”г­ЄжЁп 67 - Ё§¬Ґ­Ёвм Ї®«®¦Ґ­ЁҐ/а §¬Ґал ®Є­ . =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 67 - ­®¬Ґа дг­ЄжЁЁ - * ebx = ­®ў п x-Є®®а¤Ё­ в  ®Є­  - * ecx = ­®ў п y-Є®®а¤Ё­ в  ®Є­  - * edx = ­®ўл© x-а §¬Ґа ®Є­  - * esi = ­®ўл© y-а §¬Ґа ®Є­  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ‡­ зҐ­ЁҐ -1 ¤«п Ї а ¬Ґва  ®§­ з Ґв "­Ґ Ё§¬Ґ­пвм"; ­ ЇаЁ¬Ґа, ¤«п - ЇҐаҐ¬ҐйҐ­Ёп ®Є­  ЎҐ§ Ё§¬Ґ­Ґ­Ёп а §¬Ґа®ў ¬®¦­® гЄ § вм edx=esi=-1. - * ЏаҐ¤ў аЁвҐ«м­® ®Є­® ¤®«¦­® Ўлвм ®ЇаҐ¤Ґ«Ґ­® дг­ЄжЁҐ© 0. - Ћ­  ¦Ґ § ¤ св ­ з «м­лҐ Є®®а¤Ё­ вл Ё а §¬Ґал ®Є­ . - * ђ §¬Ґал ®Є­  Ї®­Ё¬ овбп ў б¬лб«Ґ дг­ЄжЁЁ 0, в.Ґ. - ­  ®¤Ё­ ЇЁЄбҐ«м ¬Ґ­миҐ, 祬 ॠ«м­лҐ а §¬Ґал. - * ‚맮ў дг­ЄжЁЁ ¤«п ¬ ЄбЁ¬Ё§Ёа®ў ­­ле ®Є®­ Їа®бв® ЁЈ­®аЁагҐвбп. - * „«п ®Є®­ ᮮ⢥вбвўгойЁе бвЁ«Ґ© Ї®«®¦Ґ­ЁҐ Ё/Ё«Ё а §¬Ґал ¬®Јгв Ўлвм - Ё§¬Ґ­Ґ­л Ї®«м§®ў вҐ«Ґ¬; ⥪гйЁҐ Ї®«®¦Ґ­ЁҐ Ё а §¬Ґал ¬®Јгв Ўлвм - Ї®«гзҐ­л ўл§®ў®¬ дг­ЄжЁЁ 9. - * ”г­ЄжЁп Ї®бл« Ґв ®Є­г б®ЎлвЁҐ ЇҐаҐаЁб®ўЄЁ (б Є®¤®¬ 1). - -====================================================================== -=== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 0 - Ї®«гзЁвм бзсвзЁЄ ЇҐаҐЄ«о祭Ё© § ¤ з. == -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = зЁб«® ЇҐаҐЄ«о祭Ё© § ¤ з б ¬®¬Ґ­в  § Јаг§ЄЁ бЁб⥬л - (Ї® ¬®¤г«о 2^32) - -====================================================================== -====================== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 1 ====================== -============ ЏҐаҐЄ«озЁвмбп ­  б«Ґ¤гойЁ© Ї®в®Є ўлЇ®«­Ґ­Ёп. ============ -====================================================================== -”г­ЄжЁп § ўҐаи Ґв ⥪гйЁ© Єў ­в ўаҐ¬Ґ­Ё, ўл¤Ґ«Ґ­­л© Ї®в®Єг, -Ё ЇҐаҐЄ«оз Ґвбп ­  б«Ґ¤гойЁ©. -(Љ Є®© Ї®в®Є Є Є®Ј® Їа®жҐбб  Ўг¤Ґв б«Ґ¤гойЁ¬, ЇаҐ¤бЄ § вм ­Ґ«м§п). -Џ®§¤­ҐҐ, Є®Ј¤  ¤® ⥪г饣® Ї®в®Є  ¤®©¤св ®зҐаҐ¤м, -ўлЇ®«­Ґ­ЁҐ ў®§®Ў­®ўЁвбп. -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -====================================================================== -=============== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 2 - Єни + rdpmc. ============== -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = вॡ㥬®Ґ ¤Ґ©бвўЁҐ: - * ecx = 0 - а §аҐиЁвм ўлЇ®«­Ґ­ЁҐ Ё­бвагЄжЁЁ rdpmc - (ReaD Performance-Monitoring Counters) - * ecx = 1 - г§­ вм, ўЄ«озс­/ўлЄ«о祭 Єни - * ecx = 2 - ўЄ«озЁвм Єни - * ecx = 3 - ўлЄ«озЁвм Єни -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ¤«п ecx=0: - * eax = §­ зҐ­ЁҐ cr4 - * ¤«п ecx=1: - * eax = (cr0 and 0x60000000): - * eax = 0 - Єни ўЄ«озс­ - * eax <> 0 - Єни ўлЄ«о祭 - * ¤«п ecx=2 Ё ecx=3: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп - -====================================================================== -========== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 3 - Їа®зЁв вм MSR-ॣЁбва. ========= -====================================================================== -MSR = Model Specific Register; Ї®«­л© бЇЁб®Є MSR-ॣЁбва®ў Їа®жҐбб®а  -ᮤҐа¦Ёвбп ў ¤®Єг¬Ґ­в жЁЁ Ї® Їа®жҐбб®аг (­ ЇаЁ¬Ґа, IA-32 Intel -Architecture Software Developer's Manual, Volume 3, Appendix B); -Є ¦¤®Ґ ᥬҐ©бвў® Їа®жҐбб®а®ў Ё¬ҐҐв бў®с Ї®¤¬­®¦Ґбвў® MSR-ॣЁбва®ў. -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx ЁЈ­®аЁагҐвбп - * edx =  ¤аҐб MSR -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ebx:eax = бв аиЁ©:¬« ¤иЁ© dword १г«мв в  -‡ ¬Ґз ­Ёп: - * “Є § ­ЁҐ ў ecx ­ҐбгйҐбвўго饣® Ё«Ё ­ҐаҐ «Ё§®ў ­­®Ј® ¤«п ¤ ­­®Ј® - Їа®жҐбб®а  MSR Ї®ў«Ґзсв ЁбЄ«о祭ЁҐ ў п¤аҐ, Є®в®а®Ґ ЇаЁЎмсв Ї®в®Є. - * ЏаҐ¤ў аЁвҐ«м­® б«Ґ¤гҐв ®ЇаҐ¤Ґ«Ёвм, Ї®¤¤Ґа¦Ёў овбп «Ё MSR ў 楫®¬, - Є®¬ ­¤®© cpuid. €­ зҐ ў®§­ЁЄ­Ґв 㦥 ¤агЈ®Ґ ЁбЄ«о祭ЁҐ ў п¤аҐ, - Є®в®а®Ґ ўбс а ў­® ЇаЁЎмсв Ї®в®Є. - -====================================================================== -========= ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 4 - § ЇЁб вм ў MSR-ॣЁбва. ========= -====================================================================== -MSR = Model Specific Register; Ї®«­л© бЇЁб®Є MSR-ॣЁбва®ў Їа®жҐбб®а  -ᮤҐа¦Ёвбп ў ¤®Єг¬Ґ­в жЁЁ Ї® Їа®жҐбб®аг (­ ЇаЁ¬Ґа, IA-32 Intel -Architecture Software Developer's Manual, Volume 3, Appendix B); -Є ¦¤®Ґ ᥬҐ©бвў® Їа®жҐбб®а®ў Ё¬ҐҐв бў®с Ї®¤¬­®¦Ґбвў® MSR-ॣЁбва®ў. -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx ЁЈ­®аЁагҐвбп - * edx =  ¤аҐб MSR - * esi:edi = бв аиЁ©:¬« ¤иЁ© dword -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * “Є § ­ЁҐ ў ecx ­ҐбгйҐбвўго饣® Ё«Ё ­ҐаҐ «Ё§®ў ­­®Ј® ¤«п ¤ ­­®Ј® - Їа®жҐбб®а  MSR Ї®ў«Ґзсв ЁбЄ«о祭ЁҐ ў п¤аҐ, Є®в®а®Ґ ЇаЁЎмсв Ї®в®Є. - * ЏаҐ¤ў аЁвҐ«м­® б«Ґ¤гҐв ®ЇаҐ¤Ґ«Ёвм, Ї®¤¤Ґа¦Ёў овбп «Ё MSR ў 楫®¬, - Є®¬ ­¤®© cpuid. €­ зҐ ў®§­ЁЄ­Ґв 㦥 ¤агЈ®Ґ ЁбЄ«о祭ЁҐ ў п¤аҐ, - Є®в®а®Ґ ўбс а ў­® ЇаЁЎмсв Ї®в®Є. - -====================================================================== -===== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 11 - Ё­ЁжЁ «Ё§Ёа®ў вм Єгзг Їа®жҐбб . ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 11 - ­®¬Ґа Ї®¤дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ­ҐгбЇҐе - * Ё­ зҐ а §¬Ґа ᮧ¤ ­­®© ЄгзЁ -‡ ¬Ґз ­Ёп: - * ‚맮ў дг­ЄжЁЁ Ё­ЁжЁ «Ё§ЁагҐв Єгзг, Ё§ Є®в®а®© ўЇ®б«Ґ¤бвўЁЁ ¬®¦­® - ўл¤Ґ«пвм Ё ®бў®Ў®¦¤ вм Ў«®ЄЁ Ї ¬пвЁ Ї®¤дг­ЄжЁп¬Ё 12 Ё 13. - ђ §¬Ґа ЄгзЁ а ўҐ­ а §¬Ґа㠢ᥩ бў®Ў®¤­®© Ї ¬пвЁ ЇаЁ«®¦Ґ­Ёп. - * ЏаЁ Ї®ўв®а­®¬ ўл§®ўҐ дг­ЄжЁЁ ⥬ ¦Ґ Їа®жҐбᮬ дг­ЄжЁп ўҐа­св - а §¬Ґа бгйҐбвўго饩 ЄгзЁ. - * Џ®б«Ґ ᮧ¤ ­Ёп ЄгзЁ ўл§®ўл дг­ЄжЁЁ 64 ЁЈ­®аЁаговбп. - -====================================================================== -========== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 12 - ўл¤Ґ«Ёвм Ў«®Є Ї ¬пвЁ. ========= -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 12 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ваҐЎгҐ¬л© а §¬Ґа ў Ў ©в е -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = гЄ § вҐ«м ­  ўл¤Ґ«Ґ­­л© Ў«®Є -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® б«Ґ¤гҐв Ё­ЁжЁ «Ё§Ёа®ў вм Єгзг Їа®жҐбб  ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 11. - * ”г­ЄжЁп ўл¤Ґ«пҐв 楫®Ґ зЁб«® бва ­Ёж (4 ЉЎ) в Є, зв® д ЄвЁзҐбЄЁ© - а §¬Ґа ўл¤Ґ«Ґ­­®Ј® Ў«®Є  Ў®«миҐ Ё«Ё а ўҐ­ § Їа®иҐ­­®¬г. - -====================================================================== -========= ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 13 - ®бў®Ў®¤Ёвм Ў«®Є Ї ¬пвЁ. ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 13 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  Ў«®Є Ї ¬пвЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 1 - гбЇҐи­® - * eax = 0 - ­Ґг¤ з  -‡ ¬Ґз ­Ёп: - * Ѓ«®Є Ї ¬пвЁ ¤®«¦Ґ­ Ўлвм а ­ҐҐ ўл¤Ґ«Ґ­ Ї®¤дг­ЄжЁҐ© 12 - Ё«Ё Ї®¤дг­ЄжЁҐ© 20. - -====================================================================== -===== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 14 - ®¦Ё¤ вм Ё§ўҐйҐ­Ёп ®в ¤а ©ўҐа . ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 14 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ЎгдҐа ¤«п Ё­д®а¬ жЁЁ (8 Ў ©в) -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * ЎгдҐа, ­  Є®в®ал© гЄ §лў Ґв ecx, ᮤҐа¦Ёв б«Ґ¤гойго Ё­д®а¬ жЁо: - * +0: dword: Є®­бв ­в  EV_INTR = 1 - * +4: dword: ¤ ­­лҐ ¤а ©ўҐа  -‡ ¬Ґз ­Ёп: - * ’ҐЄгй п ॠ«Ё§ жЁп ў® ўаҐ¬п ®¦Ё¤ ­Ёп вॡгҐв ¤®ў®«м­® "вп¦с«ле" - ®ЇҐа жЁ© ЇҐаҐЄ«о祭Ёп Є®­вҐЄбв . - -====================================================================== -== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 15 - гбв ­®ўЁвм ®Ўа Ў®взЁЄ ЁбЄ«о祭Ё© FPU. = -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 15 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx =  ¤аҐб ­®ў®Ј® ®Ўа Ў®взЁЄ  ЁбЄ«о祭Ё© -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax =  ¤аҐб бв а®Ј® ®Ўа Ў®взЁЄ  ЁбЄ«о祭Ё© - (0, Ґб«Ё ®­ ­Ґ Ўл« гбв ­®ў«Ґ­) - -====================================================================== -=========== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 16 - § Јаг§Ёвм ¤а ©ўҐа. =========== -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 16 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ ¤а ©ўҐа  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ­Ґг¤ з  - * Ё­ зҐ eax = ен­¤« ¤а ©ўҐа  -‡ ¬Ґз ­Ёп: - * …б«Ё ¤а ©ўҐа Ґйс ­Ґ § Ја㦥­, ®­ § Јаг¦ Ґвбп; - Ґб«Ё ¤а ©ўҐа 㦥 § Ја㦥­, ­ЁзҐЈ® ­Ґ ¬Ґ­пҐвбп. - * €¬п ¤а ©ўҐа  згўб⢨⥫쭮 Є ॣЁбваг бЁ¬ў®«®ў. - Њ ЄбЁ¬ «м­ п ¤«Ё­  Ё¬Ґ­Ё - 16 бЁ¬ў®«®ў, ўЄ«оз п § ўҐаи ойЁ© - ­г«Ґў®© бЁ¬ў®«, ®бв «м­лҐ бЁ¬ў®«л ЁЈ­®аЁаговбп. - * „а ©ўҐа б Ё¬Ґ­Ґ¬ ABC § Јаг¦ Ґвбп Ё§ д ©«  /rd/1/drivers/ABC.obj. - -====================================================================== -========== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 17 - гЇа ў«Ґ­ЁҐ ¤а ©ўҐа®¬. ========= -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 17 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  гЇа ў«пойго бвагЄвгаг: - * +0: dword: ен­¤« ¤а ©ўҐа  - * +4: dword: Є®¤ дг­ЄжЁЁ ¤а ©ўҐа  - * +8: dword: гЄ § вҐ«м ­  ўе®¤­лҐ ¤ ­­лҐ - * +12 = +0xC: dword: а §¬Ґа ўе®¤­ле ¤ ­­ле - * +16 = +0x10: dword: гЄ § вҐ«м ­  ўл室­лҐ ¤ ­­лҐ - * +20 = +0x14: dword: а §¬Ґа ўл室­ле ¤ ­­ле -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = ®ЇаҐ¤Ґ«пҐвбп ¤а ©ўҐа®¬ -‡ ¬Ґз ­Ёп: - * Љ®¤л дг­ЄжЁ© Ё бвагЄвга  ўе®¤­ле/ўл室­ле ¤ ­­ле - ®ЇаҐ¤Ґ«повбп ¤а ©ўҐа®¬. - * ЏаҐ¤ў аЁвҐ«м­® ¤®«¦Ґ­ Ўлвм Ї®«г祭 ен­¤« ¤а ©ўҐа  Ї®¤дг­ЄжЁҐ© 16. - -====================================================================== -== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 18 - гбв ­®ўЁвм ®Ўа Ў®взЁЄ ЁбЄ«о祭Ё© SSE. = -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 18 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx =  ¤аҐб ­®ў®Ј® ®Ўа Ў®взЁЄ  ЁбЄ«о祭Ё© -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax =  ¤аҐб бв а®Ј® ®Ўа Ў®взЁЄ  ЁбЄ«о祭Ё© - (0, Ґб«Ё ®­ ­Ґ Ўл« гбв ­®ў«Ґ­) - -====================================================================== -============= ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 19 - § Јаг§Ёвм DLL. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 19 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ї®«­л¬ Їгвс¬ Є DLL -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - ­Ґг¤ з  - * Ё­ зҐ eax = гЄ § вҐ«м ­  в Ў«Ёжг нЄбЇ®ав  DLL -‡ ¬Ґз ­Ёп: - * ’ Ў«Ёж  нЄбЇ®ав  ЇаҐ¤бв ў«пҐв б®Ў®© ¬ ббЁў бвагЄвга Ї® 2 dword' , - § Є ­зЁў ойЁ©бп ­г«с¬. ЏҐаўл© dword ў бвагЄвгॠпҐвбп - гЄ § вҐ«Ґ¬ ­  Ё¬п дг­ЄжЁЁ, ўв®а®© ᮤҐа¦Ёв  ¤аҐб дг­ЄжЁЁ. - -====================================================================== -====== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 20 - ЇҐаҐа бЇаҐ¤Ґ«Ёвм Ў«®Є Ї ¬пвЁ. ===== -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 20 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = ­®ўл© а §¬Ґа ў Ў ©в е - * edx = гЄ § вҐ«м ­  㦥 ўл¤Ґ«Ґ­­л© Ў«®Є Ї ¬пвЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = гЄ § вҐ«м ­  ЇҐаҐа бЇаҐ¤Ґ«с­­л© Ў«®Є, 0 ЇаЁ ®иЁЎЄҐ -‡ ¬Ґз ­Ёп: - * ЏаҐ¤ў аЁвҐ«м­® б«Ґ¤гҐв Ё­ЁжЁ «Ё§Ёа®ў вм Єгзг Їа®жҐбб  ўл§®ў®¬ - Ї®¤дг­ЄжЁЁ 11. - * ”г­ЄжЁп ўл¤Ґ«пҐв 楫®Ґ зЁб«® бва ­Ёж (4 ЉЎ) в Є, зв® д ЄвЁзҐбЄЁ© - а §¬Ґа ўл¤Ґ«Ґ­­®Ј® Ў«®Є  Ў®«миҐ Ё«Ё а ўҐ­ § Їа®иҐ­­®¬г. - * …б«Ё edx=0, в® ўл§®ў дг­ЄжЁЁ нЄўЁў «Ґ­вҐ­ ўл¤Ґ«Ґ­Ёо Ї ¬пвЁ - Ї®¤дг­ЄжЁҐ© 12. ‚ Їа®вЁў­®¬ б«гз Ґ Ў«®Є Ї ¬пвЁ Ї®  ¤аҐбг edx - ¤®«¦Ґ­ Ўлвм а ­ҐҐ ўл¤Ґ«Ґ­ Ї®¤дг­ЄжЁҐ© 12 Ё«Ё - ®ЇЁблў Ґ¬®© Ї®¤дг­ЄжЁҐ©. - * …б«Ё ecx=0, в® дг­ЄжЁп ®бў®Ў®¦¤ Ґв Ў«®Є Ї ¬пвЁ Ї®  ¤аҐбг edx Ё - ў®§ўа й Ґв 0. - * ‘®¤Ґа¦Ё¬®Ґ Ї ¬пвЁ ўЇ«®вм ¤® ­ Ё¬Ґ­м襣® Ё§ бв а®Ј® Ё ­®ў®Ј® - а §¬Ґа®ў б®еа ­пҐвбп. - -====================================================================== -=== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 22 - ®вЄалвм Ё¬Ґ­®ў ­­го ®Ў« бвм Ї ¬пвЁ. == -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 22 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¬п ®Ў« бвЁ. Њ ЄбЁ¬г¬ 31 бЁ¬ў®«, ўЄ«оз п § ўҐаи ойЁ© ­®«м - * edx = а §¬Ґа ®Ў« бвЁ ў Ў ©в е ¤«п SHM_CREATE Ё SHM_OPEN_ALWAYS - * esi = д« ЈЁ ®вЄалвЁп Ё ¤®бвгЇ : - * SHM_OPEN = 0x00 - ®вЄалвм бгйҐбвўгойго ®Ў« бвм Ї ¬пвЁ. - …б«Ё ®Ў« бвм б в ЄЁ¬ Ё¬Ґ­Ґ¬ ­Ґ бгйҐбвўгҐв, - дг­ЄжЁп ўҐа­св Є®¤ ®иЁЎЄЁ 5. - * SHM_OPEN_ALWAYS = 0x04 - ®вЄалвм бгйҐбвўгойго Ё«Ё ᮧ¤ вм ­®ўго - ®Ў« бвм Ї ¬пвЁ. - * SHM_CREATE = 0x08 - ᮧ¤ вм ­®ўго ®Ў« бвм Ї ¬пвЁ. - …б«Ё ®Ў« бвм б в ЄЁ¬ Ё¬Ґ­Ґ¬ 㦥 бгйҐбвўгҐв, - дг­ЄжЁп ўҐа­св Є®¤ ®иЁЎЄЁ 10. - * SHM_READ = 0x00 - ¤®бвгЇ в®«мЄ® ­  з⥭ЁҐ - * SHM_WRITE = 0x01 - ¤®бвгЇ ­  з⥭ЁҐ Ё § ЇЁбм -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = гЄ § вҐ«м ­  ®Ў« бвм Ї ¬пвЁ, 0 ЇаЁ ®иЁЎЄҐ - * ЇаЁ ᮧ¤ ­ЁЁ ­®ў®© ®Ў« бвЁ (SHM_CREATE Ё«Ё SHM_OPEN_ALWAYS): - edx = 0 - гбЇҐе, Ё­ зҐ - Є®¤ ®иЁЎЄЁ - * ЇаЁ ®вЄалвЁЁ бгйҐбвўго饩 ®Ў« бвЁ (SHM_OPEN Ё«Ё SHM_OPEN_ALWAYS): - edx = Є®¤ ®иЁЎЄЁ (ЇаЁ eax=0) Ё«Ё а §¬Ґа ®Ў« бвЁ ў Ў ©в е -Љ®¤л ®иЁЎ®Є: - * E_NOTFOUND = 5 - * E_ACCESS = 10 - * E_NOMEM = 30 - * E_PARAM = 33 -‡ ¬Ґз ­Ёп: - * …б«Ё ᮧ¤ свбп ­®ў п ®Ў« бвм, в® д« ЈЁ ¤®бвгЇ  гбв ­ ў«Ёў ов - ¬ ЄбЁ¬ «м­лҐ Їа ў  ¤®бвгЇ  ¤«п ®бв «м­ле Їа®жҐбб®ў. Џ®ЇлвЄ  - ®вЄалвЁп ¤агЈЁ¬ Ї®в®Є®¬ б ­Ґа §аҐис­­л¬Ё Їа ў ¬Ё Їа®ў «Ёвбп - б Є®¤®¬ ®иЁЎЄЁ E_ACCESS. - * Џа®жҐбб, ᮧ¤ ўиЁ© ®Ў« бвм, ўбҐЈ¤  Ё¬ҐҐв ¤®бвгЇ ­  § ЇЁбм. - -====================================================================== -=== ”г­ЄжЁп 68, Ї®¤дг­ЄжЁп 23 - § Єалвм Ё¬Ґ­®ў ­­го ®Ў« бвм Ї ¬пвЁ. == -====================================================================== -Џ а ¬Ґвал: - * eax = 68 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 23 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¬п ®Ў« бвЁ. Њ ЄбЁ¬г¬ 31 бЁ¬ў®«, ўЄ«оз п § ўҐаи ойЁ© ­®«м -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * ЋЎ« бвм Ї ¬пвЁ дЁ§ЁзҐбЄЁ ®бў®Ў®¦¤ Ґвбп (б § Ўлў ­ЁҐ¬ ўбҐе ¤ ­­ле - Ё ўлбў®Ў®¦¤Ґ­ЁҐ¬ дЁ§ЁзҐбЄ®© Ї ¬пвЁ), Є®Ј¤  Ґс § Єа®ов - ўбҐ ®вЄалўиЁҐ Ї®в®ЄЁ. - * ЏаЁ § ўҐа襭ЁЁ Ї®в®Є  ®бў®Ў®¦¤ овбп ўбҐ ®вЄалвлҐ Ё¬ - ®Ў« бвЁ Ї ¬пвЁ. - -====================================================================== -======================== ”г­ЄжЁп 69 - ®в« ¤Є . ======================= -====================================================================== -Џа®жҐбб ¬®¦Ґв § Јаг§Ёвм ¤агЈ®© Їа®жҐбб Є Є ®в« ¦Ёў Ґ¬л© гбв ­®ўЄ®© -ᮮ⢥вбвўго饣® ЎЁв  ЇаЁ ўл§®ўҐ Ї®¤дг­ЄжЁЁ 7 дг­ЄжЁЁ 70. -“ Їа®жҐбб  ¬®¦Ґв Ўлвм в®«мЄ® ®¤Ё­ ®в« ¤зЁЄ; ®¤Ё­ Їа®жҐбб ¬®¦Ґв -®в« ¦Ёў вм ­ҐбЄ®«мЄ® а §­ле. ‘Ёб⥬  㢥¤®¬«пҐв ®в« ¤зЁЄ ® б®ЎлвЁпе, -Їа®Ёб室пйЁе б ®в« ¦Ёў Ґ¬л¬ Їа®жҐбᮬ. ‘®®ЎйҐ­Ёп § ЇЁблў овбп ў ЎгдҐа, -®ЇаҐ¤Ґ«с­­л© Ї®¤дг­ЄжЁҐ© 0. -”®а¬ в б®®ЎйҐ­Ёп: - * +0: dword: Є®¤ б®®ЎйҐ­Ёп - * +4: dword: PID ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб  - * +8: ¬®Јгв ЇаЁбгвбвў®ў вм ¤®Ї®«­ЁвҐ«м­лҐ ¤ ­­лҐ, - ®ЇаҐ¤Ґ«пҐ¬лҐ Є®¤®¬ б®®ЎйҐ­Ёп -Љ®¤л б®®ЎйҐ­Ё©: - * 1 = ЁбЄ«о祭ЁҐ - * ¤®Ї®«­ЁвҐ«м­® ЇҐаҐ¤ свбп dword-­®¬Ґа ЁбЄ«о祭Ёп - * Їа®жҐбб ЇаЁ®бв ­®ў«Ґ­ - * 2 = Їа®жҐбб § ўҐаиЁ«бп - * ЇаЁе®¤Ёв ЇаЁ «оЎ®¬ § ўҐа襭ЁЁ: Є Є зҐаҐ§ бЁб⥬­го дг­ЄжЁо -1, - в Є Ё ЇаЁ "гЎЁ©б⢥" «оЎл¬ ¤агЈЁ¬ Їа®жҐбᮬ - (ў ⮬ зЁб«Ґ б ¬Ё¬ ®в« ¤зЁЄ®¬) - * 3 = ®в« ¤®з­®Ґ ЁбЄ«о祭ЁҐ int 1 = #DB - * ¤®Ї®«­ЁвҐ«м­® ЇҐаҐ¤ свбп dword-®Ўа § ॣЁбва  DR6: - * ЎЁвл 0-3: ўлЇ®«­Ґ­® гб«®ўЁҐ ᮮ⢥вбвўго饩 в®зЄЁ ®бв ­®ў  - (гбв ­®ў«Ґ­­®© Ї®¤дг­ЄжЁҐ© 9) - * ЎЁв 14: ЁбЄ«о祭ЁҐ Їа®Ё§®и«® Ё§-§  ०Ё¬  - Ї®и Ј®ў®© ва ббЁа®ўЄЁ (гбв ­®ў«Ґ­ д« Ј TF) - * Їа®жҐбб ЇаЁ®бв ­®ў«Ґ­ -ЏаЁ § ўҐа襭ЁЁ ®в« ¤зЁЄ  ЇаЁЎЁў овбп ўбҐ ®в« ¦Ёў Ґ¬лҐ Їа®жҐббл. -…б«Ё ®в« ¤зЁЄ нв®Ј® ­Ґ е®зҐв, ®­ ¤®«¦Ґ­ ЇаҐ¤ў аЁвҐ«м­® ®вЄ«озЁвмбп -Ї®¤дг­ЄжЁҐ© 3. - -‚ᥠЇ®¤дг­ЄжЁЁ ЇаЁ¬Ґ­Ё¬л в®«мЄ® Є Їа®жҐбб ¬/Ї®в®Є ¬, § Їг饭­л¬ -Ё§ ⥪г饣® дг­ЄжЁҐ© 70 б гбв ­®ў«Ґ­­л¬ д« Ј®¬ ®в« ¤ЄЁ. -Ћв« ¤Є  ¬­®Ј®Ї®в®з­ле Їа®Ја ¬¬ Ї®Є  ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп. -Џ®«­л© бЇЁб®Є Ї®¤дг­ЄжЁ©: - * Ї®¤дг­ЄжЁп 0 - ®ЇаҐ¤Ґ«Ёвм ®Ў« бвм ¤ ­­ле ¤«п ®в« ¤®з­ле б®®ЎйҐ­Ё© - * Ї®¤дг­ЄжЁп 1 - Ї®«гзЁвм б®бв®п­ЁҐ ॣЁбва®ў ®в« ¦Ёў Ґ¬®Ј® Ї®в®Є  - * Ї®¤дг­ЄжЁп 2 - гбв ­®ўЁвм б®бв®п­ЁҐ ॣЁбва®ў ®в« ¦Ёў Ґ¬®Ј® Ї®в®Є  - * Ї®¤дг­ЄжЁп 3 - ®вЄ«озЁвмбп ®в ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб  - * Ї®¤дг­ЄжЁп 4 - ЇаЁ®бв ­®ўЁвм ®в« ¦Ёў Ґ¬л© Ї®в®Є - * Ї®¤дг­ЄжЁп 5 - ў®§®Ў­®ўЁвм ўлЇ®«­Ґ­ЁҐ ®в« ¦Ёў Ґ¬®Ј® Ї®в®Є  - * Ї®¤дг­ЄжЁп 6 - Їа®зЁв вм Ё§ Ї ¬пвЁ ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб  - * Ї®¤дг­ЄжЁп 7 - § ЇЁб вм ў Ї ¬пвм ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб  - * Ї®¤дг­ЄжЁп 8 - § ўҐаиЁвм ®в« ¦Ёў Ґ¬л© Ї®в®Є - * Ї®¤дг­ЄжЁп 9 - гбв ­®ўЁвм/б­пвм  ЇЇ а в­го в®зЄг ®бв ­®ў  - -====================================================================== -====================== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 0 ====================== -========= ЋЇаҐ¤Ґ«Ёвм ®Ў« бвм ¤ ­­ле ¤«п ®в« ¤®з­ле б®®ЎйҐ­Ё©. ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 0 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = гЄ § вҐ«м -”®а¬ в ®Ў« бвЁ ¤ ­­ле: - * +0: dword: N = а §¬Ґа ЎгдҐа  (­Ґ бзЁв п нв®Ј® § Ј®«®ўЄ ) - * +4: dword: § ­пв® ў ЎгдҐаҐ - * +8: N*byte: ЎгдҐа -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * …б«Ё Ї®«Ґ а §¬Ґа  ®ваЁж вҐ«м­®, ЎгдҐа бзЁв Ґвбп § Ў«®ЄЁа®ў ­­л¬ - Ё ЇаЁ Ї®бвгЇ«Ґ­ЁЁ ­®ў®Ј® б®®ЎйҐ­Ёп бЁб⥬  Ўг¤Ґв ¦¤ вм. - „«п бЁ­еа®­Ё§ жЁЁ ®Ўа ¬«п©вҐ ўбо а Ў®вг б ЎгдҐа®¬ ®ЇҐа жЁп¬Ё - Ў«®ЄЁа®ўЄЁ/а §Ў«®ЄЁа®ўЄЁ - neg [bufsize] - * „ ­­лҐ ў ЎгдҐаҐ ва Євговбп Є Є ¬ ббЁў н«Ґ¬Ґ­в®ў ЇҐаҐ¬Ґ­­®© ¤«Ё­л - - б®®ЎйҐ­Ё©. ”®а¬ в б®®ЎйҐ­Ёп гЄ § ­ ў ®ЎйҐ¬ ®ЇЁб ­ЁЁ. - -====================================================================== -====================== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 1 ====================== -========= Џ®«гзЁвм б®бв®п­ЁҐ ॣЁбва®ў ®в« ¦Ёў Ґ¬®Ј® Ї®в®Є . ========= -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а Ї®в®Є  - * edx = ¤«Ё­  бвагЄвгал Є®­вҐЄбв , ¤®«¦­® Ўлвм 0x28=40 Ў ©в - * esi = гЄ § вҐ«м ­  бвагЄвгаг Є®­вҐЄбв  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -”®а¬ в бвагЄвгал Є®­вҐЄбв : (FPU Ї®Є  ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп) - * +0: dword: eip - * +4: dword: eflags - * +8: dword: eax - * +12 = +0xC: dword: ecx - * +16 = +0x10: dword: edx - * +20 = +0x14: dword: ebx - * +24 = +0x18: dword: esp - * +28 = +0x1C: dword: ebp - * +32 = +0x20: dword: esi - * +36 = +0x24: dword: edi -‡ ¬Ґз ­Ёп: - * …б«Ё Ї®в®Є ўлЇ®«­пҐв Є®¤ 0-Є®«мж , ў®§ўа й Ґвбп - б®бв®п­ЁҐ ॣЁбва®ў 3-Є®«мж . - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - -====================================================================== -====================== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 2 ====================== -======== “бв ­®ўЁвм б®бв®п­ЁҐ ॣЁбва®ў ®в« ¦Ёў Ґ¬®Ј® Ї®в®Є . ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 2 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а Ї®в®Є  - * edx = ¤«Ё­  бвагЄвгал Є®­вҐЄбв , ¤®«¦­® Ўлвм 0x28=40 Ў ©в - * esi = гЄ § вҐ«м ­  бвагЄвгаг Є®­вҐЄбв  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -”®а¬ в бвагЄвгал Є®­вҐЄбв  гЄ § ­ ў ®ЇЁб ­ЁЁ Ї®¤дг­ЄжЁЁ 1. -‡ ¬Ґз ­Ёп: - * …б«Ё Ї®в®Є ўлЇ®«­пҐв Є®¤ 0-Є®«мж , гбв ­ ў«Ёў Ґвбп - б®бв®п­ЁҐ ॣЁбва®ў 3-Є®«мж . - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - -====================================================================== -== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 3 - ®вЄ«озЁвмбп ®в ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб . = -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 3 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * …б«Ё Їа®жҐбб Ўл« ЇаЁ®бв ­®ў«Ґ­, ®­ ў®§®Ў­®ў«пҐв ўлЇ®«­Ґ­ЁҐ. - -====================================================================== -==== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 4 - ЇаЁ®бв ­®ўЁвм ®в« ¦Ёў Ґ¬л© Ї®в®Є. ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа Їа®жҐбб  - * ebx = 4 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - -====================================================================== -====================== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 5 ====================== -============ ‚®§®Ў­®ўЁвм ўлЇ®«­Ґ­ЁҐ ®в« ¦Ёў Ґ¬®Ј® Ї®в®Є . ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 5 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - -====================================================================== -====================== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 6 ====================== -============= Џа®зЁв вм Ё§ Ї ¬пвЁ ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб . ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 6 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а - * edx = бЄ®«мЄ® Ў ©в зЁв вм - * esi =  ¤аҐб Ї ¬пвЁ ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб  - * edi = гЄ § вҐ«м ­  ЎгдҐа ¤«п ¤ ­­ле -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 ЇаЁ ®иЁЎЄҐ (­ҐўҐа­л© PID Ё«Ё ЎгдҐа) - * Ё­ зҐ eax = зЁб«® Їа®зЁв ­­ле Ў ©в (ў®§¬®¦­®, 0, - Ґб«Ё ў esi б«ЁиЄ®¬ Ў®«м讥 §­ зҐ­ЁҐ) -‡ ¬Ґз ­Ёп: - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - -====================================================================== - ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 7 - § ЇЁб вм ў Ї ¬пвм ®в« ¦Ёў Ґ¬®Ј® Їа®жҐбб . -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 7 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а - * edx = бЄ®«мЄ® Ў ©в ЇЁб вм - * esi =  ¤аҐб Ї ¬пвЁ ў ®в« ¦Ёў Ґ¬®¬ Їа®жҐбᥠ- * edi = гЄ § вҐ«м ­  ¤ ­­лҐ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = -1 ЇаЁ ®иЁЎЄҐ (­ҐўҐа­л© PID Ё«Ё ЎгдҐа) - * Ё­ зҐ eax = зЁб«® § ЇЁб ­­ле Ў ©в (ў®§¬®¦­®, 0, - Ґб«Ё ў esi б«ЁиЄ®¬ Ў®«м讥 §­ зҐ­ЁҐ) -‡ ¬Ґз ­Ёп: - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - -====================================================================== -====== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 8 - § ўҐаиЁвм ®в« ¦Ёў Ґ¬л© Ї®в®Є. ====== -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 8 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - * ”г­ЄжЁп  ­ «®ЈЁз­  Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 18 б ¤ўг¬п ®в«ЁзЁп¬Ё: - вॡгҐвбп ўлЇ®«­Ґ­ЁҐ ЇҐаў®Ј® § ¬Ґз ­Ёп Ё ЇаЁ­Ё¬ Ґвбп PID, -   ­Ґ ­®¬Ґа б«®в . - -====================================================================== -====================== ”г­ЄжЁп 69, Ї®¤дг­ЄжЁп 9 ====================== -============= “бв ­®ўЁвм/б­пвм  ЇЇ а в­го в®зЄг ®бв ­®ў . ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 69 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 9 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Ё¤Ґ­вЁдЁЄ в®а Ї®в®Є  - * dl = Ё­¤ҐЄб в®зЄЁ ®бв ­®ў , ®в 0 ¤® 3 ўЄ«озЁвҐ«м­® - * dh = д« ЈЁ: - * Ґб«Ё бв аиЁ© ЎЁв бЎа®иҐ­ - гбв ­®ўЁвм в®зЄг ®бв ­®ў : - * ЎЁвл 0-1 - гб«®ўЁҐ: - * 00 = в®зЄ  ®бв ­®ў  ­  ўлЇ®«­Ґ­ЁҐ - * 01 = в®зЄ  ®бв ­®ў  ­  § ЇЁбм - * 11 = в®зЄ  ®бв ­®ў  ­  з⥭ЁҐ/§ ЇЁбм - * ЎЁвл 2-3 - ¤«Ё­ ; ¤«п в®зҐЄ ®бв ­®ў  ­  ЁбЇ®«­Ґ­ЁҐ ¤®«¦­® Ўлвм - 00, ў Їа®вЁў­®¬ б«гз Ґ ®¤­® Ё§ - * 00 = Ў ©в - * 01 = б«®ў® - * 11 = ¤ў®©­®Ґ б«®ў® - * esi =  ¤аҐб в®зЄЁ ®бв ­®ў ; ¤®«¦Ґ­ Ўлвм ўла®ў­Ґ­ - ᮮ⢥вб⢥­­® ¤«Ё­Ґ (в.Ґ. ¤®«¦Ґ­ Ўлвм зсв­л¬ ¤«п - в®зҐЄ ®бв ­®ў  ­  б«®ў®, Єа вҐ­ 4 ¤«п ¤ў®©­®Ј® б«®ў ) - * Ґб«Ё бв аиЁ© ЎЁв гбв ­®ў«Ґ­ - бЎа®бЁвм в®зЄг ®бв ­®ў  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ®иЁЎЄ  ў® ўе®¤­ле ¤ ­­ле - * eax = 2 - (§ аҐ§ҐаўЁа®ў ­®, ­ЁЄ®Ј¤  ­Ґ ў®§ўа й Ґвбп - ў ⥪г饩 ॠ«Ё§ жЁЁ) б нвЁ¬ Ё­¤ҐЄб®¬ 㦥 гбв ­®ў«Ґ­  - Ј«®Ў «м­ п в®зЄ  ®бв ­®ў  -‡ ¬Ґз ­Ёп: - * Џа®жҐбб ¤®«¦Ґ­ Ўлвм § Ја㦥­ ¤«п ®в« ¤ЄЁ (Є Є гЄ § ­® ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ). - * ЂЇЇ а в­лҐ в®зЄЁ ®бв ­®ў  ॠ«Ё§говбп зҐаҐ§ DRx-ॣЁбвал - Їа®жҐбб®а , ®вбо¤  ўбҐ ®Ја ­ЁзҐ­Ёп. - * ”г­ЄжЁп ¬®¦Ґв ЇҐаҐгбв ­®ўЁвм а ­ҐҐ гбв ­®ў«Ґ­­го Ґ© ¦Ґ - в®зЄг ®бв ­®ў  (­ЁЄ Є ­Ґ б®®Ўй п ®Ў н⮬). - ‚Ґ¤ЁвҐ бЇЁб®Є гбв ­®ў«Ґ­­ле в®зҐЄ ®бв ­®ў  ў ®в« ¤зЁЄҐ. - * ‘а Ў влў ­ЁҐ в®зЄЁ ®бв ­®ў  § Є«оз Ґвбп ў ЈҐ­ҐаЁа®ў ­ЁЁ - ®в« ¤®з­®Ј® ЁбЄ«о祭Ёп #DB, ® Є®в®а®¬ бЁб⥬  б®®Ўй Ґв ®в« ¤зЁЄг. - * ’®зЄ  ®бв ­®ў  ­  § ЇЁбм Ё з⥭ЁҐ/§ ЇЁбм ба Ў влў Ґв Ї®б«Ґ - ўлЇ®«­Ґ­Ёп ўл§ў ўиҐ© Ґс Ё­бвагЄжЁЁ. - -====================================================================== -= ”г­ЄжЁп 70 - а Ў®в  б д ©«®ў®© бЁб⥬®© б Ї®¤¤Ґа¦Є®© ¤«Ё­­ле Ё¬с­. = -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®; Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ў § ўЁбЁ¬®бвЁ ®в Ї®¤дг­ЄжЁЁ ¬®¦Ґв ў®§ўа й вмбп §­ зҐ­ЁҐ Ё - ў ¤агЈЁе ॣЁбва е -ЋЎйЁ© д®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: ᬥ饭ЁҐ ў д ©«Ґ - * +8: dword: бв аиЁ© dword ᬥ饭Ёп (¤®«¦Ґ­ Ўлвм 0) Ё«Ё Ї®«Ґ д« Ј®ў - * +12 = +0xC: dword: а §¬Ґа - * +16 = +0x10: dword: гЄ § вҐ«м ­  ¤ ­­лҐ - * +20 = +0x14: n db: ASCIIZ-бва®Є  б Ё¬Ґ­Ґ¬ д ©«  - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -“в®з­Ґ­Ёп - ў ¤®Єг¬Ґ­в жЁЁ ­  ᮮ⢥вбвўгойго Ї®¤дг­ЄжЁо. -€¬п д ©«  ­Ґзгўб⢨⥫쭮 Є ॣЁбваг ЎгЄў. ђгббЄЁҐ ЎгЄўл ¤®«¦­л Ўлвм -§ ЇЁб ­л ў Є®¤Ёа®ўЄҐ cp866 (DOS). -”®а¬ в Ё¬Ґ­Ё д ©« : -/base/number/dir1/dir2/.../dirn/file, -Ј¤Ґ /base/number Ё¤Ґ­вЁдЁжЁагҐв гбва®©бвў®, ­  Є®в®а®¬ ЁйҐвбп д ©«: -®¤­® Ё§ - * /RD/1 = /RAMDISK/1 ¤«п ¤®бвгЇ  Є а ¬¤ЁбЄг - * /FD/1 = /FLOPPYDISK/1 ¤«п ¤®бвгЇ  Є ЇҐаў®¬г д«®ЇЇЁ-¤ЁбЄ®ў®¤г, - /FD/2 = /FLOPPYDISK/2 ¤«п ўв®а®Ј® д«®ЇЇЁ-¤ЁбЄ®ў®¤  - * /HD0/x, /HD1/x, /HD2/x, /HD3/x ¤«п ¤®бвгЇ  ᮮ⢥вб⢥­­® - Є ¦сбвЄЁ¬ ¤ЁбЄ ¬ ­  IDE0 (Primary Master), IDE1 (Primary Slave), - IDE2 (Secondary Master), IDE3 (Secondary Slave); - x - ­®¬Ґа а §¤Ґ«  ­  ўлЎа ­­®¬ ўЁ­зҐбвҐаҐ, Ё§¬Ґ­пҐвбп ®в 1 ¤® 255 - (­  Є ¦¤®¬ Ё§ ўЁ­зҐбвҐа®ў ­г¬Ґа жЁп ­ зЁ­ Ґвбп б 1) - * /CD0/1, /CD1/1, /CD2/1, /CD3/1 ¤«п ¤®бвгЇ  ᮮ⢥вб⢥­­® - Є CD ­  IDE0 (Primary Master), IDE1 (Primary Slave), - IDE2 (Secondary Master), IDE3 (Secondary Slave) - * /SYS - ®ЇаҐ¤Ґ«пҐв бЁб⥬­го Ї ЇЄг; ЇаЁ ®Ўлз­®© § Јаг§ЄҐ бЁб⥬л - б ¤ЁбЄҐвл нЄўЁў «Ґ­в­® /RD/1 -ЏаЁ¬Ґал: - * '/rd/1/kernel.asm',0 - * '/HD0/1/kernel.asm',0 - * '/hd0/2/menuet/pics/tanzania.bmp',0 - * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 - * '/sys/MySuperApp.ini',0 -„®бвгЇ­лҐ Ї®¤дг­ЄжЁЁ: - * Ї®¤дг­ЄжЁп 0 - з⥭ЁҐ д ©«  - * Ї®¤дг­ЄжЁп 1 - з⥭ЁҐ Ї ЇЄЁ - * Ї®¤дг­ЄжЁп 2 - ᮧ¤ ­ЁҐ/ЇҐаҐ§ ЇЁбм д ©«  - * Ї®¤дг­ЄжЁп 3 - § ЇЁбм ў бгйҐбвўгойЁ© д ©« - * Ї®¤дг­ЄжЁп 4 - гбв ­®ўЄ  а §¬Ґа  д ©«  - * Ї®¤дг­ЄжЁп 5 - Ї®«г祭ЁҐ  ваЁЎгв®ў д ©« /Ї ЇЄЁ - * Ї®¤дг­ЄжЁп 6 - гбв ­®ўЄ   ваЁЎгв®ў д ©« /Ї ЇЄЁ - * Ї®¤дг­ЄжЁп 7 - § ЇгбЄ Їа®Ја ¬¬л - * Ї®¤дг­ЄжЁп 8 - г¤ «Ґ­ЁҐ д ©« /Ї ЇЄЁ - * Ї®¤дг­ЄжЁп 9 - ᮧ¤ ­ЁҐ Ї ЇЄЁ -„«п CD-ЇаЁў®¤®ў ў бўп§Ё б  ЇЇ а в­л¬Ё ®Ја ­ЁзҐ­Ёп¬Ё ¤®бвгЇ­л -в®«мЄ® Ї®¤дг­ЄжЁЁ 0,1,5 Ё 7, ўл§®ў ¤агЈЁе Ї®¤дг­ЄжЁ© § ўҐаиЁвбп -®иЁЎЄ®© б Є®¤®¬ 2. -ЏаЁ ЇҐаў®¬ ®Ўа йҐ­ЁЁ Ї®¤дг­ЄжЁ© 0,1,5,7 Є гбва®©бвў ¬ ATAPI -(CD Ё DVD) Їа®Ё§ў®¤Ёвбп Ў«®ЄЁа®ўЄ  агз­®Ј® гЇа ў«Ґ­Ёп ¬Ґе ­Ё§¬®¬ -«®вЄ . ќв® бўп§ ­® б ЄниЁа®ў ­ЁҐ¬ ¤ ­­ле, Ї®«г祭­ле ®в ЇаЁў®¤ . -ђ §Ў«®ЄЁа®ўЄ  ®бгйҐбвў«пҐвбп ЇаЁ ®Ўа йҐ­ЁЁ Ї®¤дг­ЄжЁЁ 4 дг­ЄжЁЁ 24 -Є ᮮ⢥вбвўго饬г гбва®©бвўг. - -====================================================================== -= ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 0 - з⥭ЁҐ д ©«  б Ї®¤¤Ґа¦Є®© ¤«Ё­­ле Ё¬с­. = -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 0 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: Ї®§ЁжЁп ў д ©«Ґ (ў Ў ©в е) - * +8: dword: 0 (§ аҐ§ҐаўЁа®ў ­® Ї®¤ бв аиЁ© dword Ї®§ЁжЁЁ) - * +12 = +0xC: dword: бЄ®«мЄ® Ў ©в зЁв вм - * +16 = +0x10: dword: гЄ § вҐ«м ­  ЎгдҐа, Єг¤  Ўг¤гв § ЇЁб ­л ¤ ­­лҐ - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx = зЁб«® Їа®зЁв ­­ле Ў ©в Ё«Ё - -1=0xffffffff, Ґб«Ё д ©« ­Ґ ­ ©¤Ґ­ -‡ ¬Ґз ­Ёп: - * …б«Ё д ©« Є®­зЁ«бп а ­миҐ, 祬 Ўл« Їа®зЁв ­ Ї®б«Ґ¤­Ё© § Їа®иҐ­­л© - Ў«®Є, в® дг­ЄжЁп Їа®зЁв Ґв, бЄ®«мЄ® ᬮ¦Ґв, Ї®б«Ґ 祣® ўҐа­св - eax=6 (EOF). - * ”г­ЄжЁп ­Ґ Ї®§ў®«пҐв зЁв вм Ї ЇЄЁ - (ўҐа­свбп eax=10, access denied). - -====================================================================== -= ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 1 - з⥭ЁҐ Ї ЇЄЁ б Ї®¤¤Ґа¦Є®© ¤«Ё­­ле Ё¬с­. = -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 1 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: Ё­¤ҐЄб ­ з «м­®Ј® Ў«®Є  (бзЁв п б 0) - * +8: dword: Ї®«Ґ д« Ј®ў: - * ЎЁв 0 (¬ бЄ  1): ў Є Є®¬ д®а¬ вҐ ў®§ўа й вм Ё¬Ґ­ , - 0=ANSI, 1=UNICODE - * Їа®зЁҐ ЎЁвл § аҐ§ҐаўЁа®ў ­л Ё ¤®«¦­л Ўлвм гбв ­®ў«Ґ­л ў 0 - ¤«п Ўг¤г饩 б®ў¬ҐбвЁ¬®бвЁ - * +12 = +0xC: dword: бЄ®«мЄ® Ў«®Є®ў зЁв вм - * +16 = +0x10: dword: гЄ § вҐ«м ­  ЎгдҐа, Єг¤  Ўг¤гв § ЇЁб ­л - ¤ ­­лҐ, а §¬Ґа ЎгдҐа  ¤®«¦Ґ­ Ўлвм ­Ґ ¬Ґ­миҐ 32 + [+12]*560 Ў ©в - * +20 = +0x14: ASCIIZ-Ё¬п Ї ЇЄЁ, Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx = зЁб«® д ©«®ў, Ё­д®а¬ жЁп ® Є®в®але Ўл«  § ЇЁб ­  ў ЎгдҐа, - Ё«Ё -1=0xffffffff, Ґб«Ё Ї ЇЄ  ­Ґ ­ ©¤Ґ­  -‘вагЄвга  ЎгдҐа : - * +0: 32*byte: § Ј®«®ў®Є - * +32 = +0x20: n1*byte: Ў«®Є б Ё­д®а¬ жЁҐ© ® д ©«Ґ 1 - * +32+n1: n2*byte: Ў«®Є б Ё­д®а¬ жЁҐ© ® д ©«Ґ 2 - * ... -‘вагЄвга  § Ј®«®ўЄ : - * +0: dword: ўҐабЁп бвагЄвгал (⥪гй п ўҐабЁп = 1) - * +4: dword: Є®«ЁзҐбвў® а §¬Ґйс­­ле Ў«®Є®ў; ­Ґ Ў®«миҐ, 祬 § Їа®иҐ­® - ў Ї®«Ґ +12 Ё­д®а¬ жЁ®­­®© бвагЄвгал; ¬®¦Ґв Ўлвм ¬Ґ­миҐ, - Ґб«Ё ў Ї ЇЄҐ Є®­зЁ«Ёбм д ©«л (в® ¦Ґ б ¬®Ґ, зв® Ё ў ebx) - * +8: dword: ®ЎйҐҐ зЁб«® д ©«®ў ў Ї ЇЄҐ - * +12 = +0xC: 20*byte: § аҐ§ҐаўЁа®ў ­® (­г«Ё) -‘вагЄвга  Ў«®Є  ¤ ­­ле ўе®¤  Є в «®Ј  (Ѓ„‚Љ): - * +0: dword:  ваЁЎгвл д ©« : - * ЎЁв 0 (¬ бЄ  1): д ©« в®«мЄ® ¤«п з⥭Ёп - * ЎЁв 1 (¬ бЄ  2): д ©« пў«пҐвбп бЄалвл¬ - * ЎЁв 2 (¬ бЄ  4): д ©« пў«пҐвбп бЁб⥬­л¬ - * ЎЁв 3 (¬ бЄ  8): нв® ­Ґ д ©«,   ¬ҐвЄ  ⮬  - (­  § ¤ ­­®¬ а §¤Ґ«Ґ ўбваҐз Ґвбп ­Ґ Ў®«ҐҐ ®¤­®Ј® а §  Ё - в®«мЄ® ў Є®а­Ґў®© Ї ЇЄҐ) - * ЎЁв 4 (¬ бЄ  0x10): нв® Ї ЇЄ  - * ЎЁв 5 (¬ бЄ  0x20): д ©« ­Ґ  аеЁўЁа®ў «бп - ¬­®ЈЁҐ Їа®Ја ¬¬л -  аеЁў жЁЁ Ё¬Ґов ®ЇжЁо, Ї® Є®в®а®©  аеЁўЁаговбп в®«мЄ® д ©«л - б гбв ­®ў«Ґ­­л¬ нвЁ¬ ЎЁв®¬, Ї®б«Ґ 祣® нв®в ЎЁв бЎа блў Ґвбп - - нв® ¬®¦Ґв Ўлвм Ї®«Ґ§­® ¤«п  ўв®¬ вЁзҐбЄ®Ј® ᮧ¤ ­Ёп - backup- аеЁў®ў, ЁЎ® ЇаЁ § ЇЁбЁ ЎЁв ®Ўлз­® гбв ­ ў«Ёў Ґвбп - (­Ґ ў Kolibri, Їа ў¤ ) - * +4: byte: вЁЇ ¤ ­­ле Ё¬Ґ­Ё: - (б®ўЇ ¤ Ґв б ЎЁв®¬ 0 д« Ј®ў Ё­д®а¬ жЁ®­­®© бвагЄвгал) - * 0 = ASCII = 1-Ў ©в­®Ґ ЇаҐ¤бв ў«Ґ­ЁҐ Є ¦¤®Ј® бЁ¬ў®«  - * 1 = UNICODE = 2-Ў ©в­®Ґ ЇаҐ¤бв ў«Ґ­ЁҐ Є ¦¤®Ј® бЁ¬ў®«  - * +5: 3*byte: § аҐ§ҐаўЁа®ў ­® (­г«Ё) - * +8: 4*byte: ўаҐ¬п ᮧ¤ ­Ёп д ©«  - * +12 = +0xC: 4*byte: ¤ в  ᮧ¤ ­Ёп д ©«  - * +16 = +0x10: 4*byte: ўаҐ¬п Ї®б«Ґ¤­ҐЈ® ¤®бвгЇ  (з⥭ЁҐ Ё«Ё § ЇЁбм) - * +20 = +0x14: 4*byte: ¤ в  Ї®б«Ґ¤­ҐЈ® ¤®бвгЇ  - * +24 = +0x18: 4*byte: ўаҐ¬п Ї®б«Ґ¤­Ґ© ¬®¤ЁдЁЄ жЁЁ - * +28 = +0x1C: 4*byte: ¤ в  Ї®б«Ґ¤­Ґ© ¬®¤ЁдЁЄ жЁЁ - * +32 = +0x20: qword: а §¬Ґа д ©«  ў Ў ©в е (¤® 16777216 ’Ў) - * +40 = +0x28: Ё¬п - * ¤«п д®а¬ в  ASCII: ¬ ЄбЁ¬ «м­ п ¤«Ё­  Ё¬Ґ­Ё 263 бЁ¬ў®«  - (263 Ў ©в ), Ў ©в Ї®б«Ґ Ё¬Ґ­Ё Ё¬ҐҐв §­ зҐ­ЁҐ 0 - * ¤«п д®а¬ в  UNICODE: ¬ ЄбЁ¬ «м­ п ¤«Ё­  Ё¬Ґ­Ё 259 бЁ¬ў®«®ў - (518 Ў ©в), ¤ў  Ў ©в  Ї®б«Ґ Ё¬Ґ­Ё Ё¬Ґов §­ зҐ­ЁҐ 0 -”®а¬ в ўаҐ¬Ґ­Ё: - * +0: byte: ᥪ㭤л - * +1: byte: ¬Ё­гвл - * +2: byte: з бл - * +3: byte: § аҐ§ҐаўЁа®ў ­® (0) - * ­ ЇаЁ¬Ґа, 23.59.59 § ЇЁблў Ґвбп Є Є (ў hex) 3B 3B 17 00 -”®а¬ в ¤ вл: - * +0: byte: ¤Ґ­м - * +1: byte: ¬Ґбпж - * +2: word: Ј®¤ - * ­ ЇаЁ¬Ґа, 25.11.1979 § ЇЁблў Ґвбп Є Є (ў hex) 19 0B BB 07 -‡ ¬Ґз ­Ёп: - * …б«Ё ў Ѓ„‚Љ ЇаЁбгвбвўгҐв Ё¬п ў ASCII, в® ¤«Ё­  Ѓ„‚Љ б®бв ў«пҐв - 304 Ў ©в , Ґб«Ё ў UNICODE - 560 Ў ©в. ‡­ зҐ­ЁҐ ¤«Ё­л ўла ў­Ґ­® - ­  楫®Ґ Єа в­®Ґ 16 Ў ©в - (¤«п г᪮७Ёп ®Ўа Ў®вЄЁ ў Єни-Ї ¬пвЁ CPU). - * ЏҐаўл© бЁ¬ў®« Ї®б«Ґ Ё¬Ґ­Ё ­г«Ґў®© (ASCIIZ-бва®Є ). „ «м­Ґ©иЁҐ - ¤ ­­лҐ ᮤҐа¦ в ¬гб®а. - * …б«Ё д ©«л ў Ї ЇЄҐ Є®­зЁ«Ёбм а ­миҐ, 祬 Ўл«® Їа®зЁв ­® - § Їа®иҐ­­®Ґ Є®«ЁзҐбвў®, в® дг­ЄжЁп Їа®зЁв Ґв, бЄ®«мЄ® ᬮ¦Ґв, - Ї®б«Ґ 祣® ўҐа­св eax=6 (EOF). - * ‹оЎ п Ї ЇЄ  ­  ¤ЁбЄҐ, Єа®¬Ґ Є®а­Ґў®©, ᮤҐа¦Ёв ¤ў  бЇҐжЁ «м­ле - ўе®¤  "." Ё "..", Ё¤Ґ­вЁдЁжЁагойЁе ᮮ⢥вб⢥­­® б ¬г Ї ЇЄг Ё - தЁвҐ«мбЄго Ї ЇЄг. - * ”г­ЄжЁп Ї®§ў®«пҐв в Є¦Ґ зЁв вм ўЁавг «м­лҐ Ї ЇЄЁ "/", "/rd", - "/fd", "/hd[n]", ЇаЁ н⮬  ваЁЎгвл Ї®¤Ї Ї®Є Ї®« Ј овбп а ў­л¬Ё - 0x10,   ўаҐ¬Ґ­  Ё ¤ вл ®Ў­г«Ґ­л. Ђ«мвҐа­ вЁў­л© бЇ®б®Ў Ї®«г祭Ёп - Ё­д®а¬ жЁЁ ®Ў ®Ў®а㤮ў ­ЁЁ - Ї®¤дг­ЄжЁп 11 дг­ЄжЁЁ 18. - -====================================================================== -====================== ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 2 ====================== -======== ‘®§¤ ­ЁҐ/ЇҐаҐ§ ЇЁбм д ©«  б Ї®¤¤Ґа¦Є®© ¤«Ё­­ле Ё¬с­. ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 2 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +8: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +12 = +0xC: dword: бЄ®«мЄ® Ў ©в ЇЁб вм - * +16 = +0x10: dword: гЄ § вҐ«м ­  ¤ ­­лҐ - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx = зЁб«® § ЇЁб ­­ле Ў ©в (ў®§¬®¦­®, 0) -‡ ¬Ґз ­Ёп: - * …б«Ё д ©« б в ЄЁ¬ Ё¬Ґ­Ґ¬ ­Ґ бгйҐбвў®ў «, ®­ ᮧ¤ свбп; Ґб«Ё - бгйҐбвў®ў «, в® ЇҐаҐ§ ЇЁблў Ґвбп. - * …б«Ё бў®Ў®¤­®Ј® ¬Ґбв  ­  ¤ЁбЄҐ ­Ґ¤®бв в®з­®, в® дг­ЄжЁп § ЇЁиҐв, - бЄ®«мЄ® ᬮ¦Ґв, Ї®б«Ґ 祣® ўҐа­св Є®¤ ®иЁЎЄЁ 8. - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп ¤«п CD (ўҐа­свбп Є®¤ ®иЁЎЄЁ 2). - -====================================================================== -====================== ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 3 ====================== -======== ‡ ЇЁбм ў бгйҐбвўгойЁ© д ©« б Ї®¤¤Ґа¦Є®© ¤«Ё­­ле Ё¬с­. ======= -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 3 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: Ї®§ЁжЁп ў д ©«Ґ (ў Ў ©в е) - * +8: dword: бв аиЁ© dword Ї®§ЁжЁЁ (¤®«¦Ґ­ Ўлвм 0 ¤«п FAT) - * +12 = +0xC: dword: бЄ®«мЄ® Ў ©в ЇЁб вм - * +16 = +0x10: dword: гЄ § вҐ«м ­  ¤ ­­лҐ - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx = зЁб«® § ЇЁб ­­ле Ў ©в (ў®§¬®¦­®, 0) -‡ ¬Ґз ­Ёп: - * ” ©« ¤®«¦Ґ­ 㦥 бгйҐбвў®ў вм, Ё­ зҐ ўҐа­свбп eax=5. - * …¤Ё­б⢥­­л¬ १г«мв в®¬ § ЇЁбЁ 0 Ў ©в пў«пҐвбп гбв ­®ўЄ  ў -  ваЁЎгв е д ©«  ¤ вл/ўаҐ¬Ґ­Ё ¬®¤ЁдЁЄ жЁЁ Ё ¤®бвгЇ  ў ⥪гйго. - * …б«Ё ­ з «м­ п Ё/Ё«Ё Є®­Ґз­ п Ї®§ЁжЁп ўл室Ёв §  ЇаҐ¤Ґ«л д ©«  - (§  ЁбЄ«о祭ЁҐ¬ ЇаҐ¤л¤г饣® б«гз п), д ©« а биЁапҐвбп ¤® - ­Ґ®Ўе®¤Ё¬®Ј® а §¬Ґа  ­г«Ґўл¬Ё бЁ¬ў®« ¬Ё. - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп ¤«п CD (ўҐа­свбп Є®¤ ®иЁЎЄЁ 2). - -====================================================================== -========= ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 4 - гбв ­®ўЄ  а §¬Ґа  д ©« . ======== -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 4 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: ¬« ¤иЁ© dword ­®ў®Ј® а §¬Ґа  д ©«  - * +8: dword: бв аиЁ© dword ­®ў®Ј® а §¬Ґа  д ©«  - (¤®«¦Ґ­ Ўлвм 0 ¤«п FAT) - * +12 = +0xC: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +16 = +0x10: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * …б«Ё ­®ўл© а §¬Ґа д ©«  ¬Ґ­миҐ бв а®Ј®, д ©« гᥪ Ґвбп. …б«Ё - ­®ўл© а §¬Ґа Ў®«миҐ бв а®Ј®, д ©« а биЁапҐвбп ­г«Ґўл¬Ё бЁ¬ў®« ¬Ё. - …б«Ё ­®ўл© а §¬Ґа а ўҐ­ бв а®¬г, Ґ¤Ё­б⢥­­л¬ १г«мв в®¬ ўл§®ў  - пў«пҐвбп гбв ­®ўЄ  ¤ вл/ўаҐ¬Ґ­Ё ¬®¤ЁдЁЄ жЁЁ Ё ¤®бвгЇ  ў ⥪гйЁҐ. - * …б«Ё бў®Ў®¤­®Ј® ¬Ґбв  ­  ¤ЁбЄҐ ­Ґ¤®бв в®з­® ¤«п а биЁаҐ­Ёп д ©« , - в® дг­ЄжЁп а биЁаЁв ­ бЄ®«мЄ® ў®§¬®¦­®, Ї®б«Ґ 祣® ўҐа­св - Є®¤ ®иЁЎЄЁ 8. - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп ¤«п CD (ўҐа­свбп Є®¤ ®иЁЎЄЁ 2). - -====================================================================== -=== ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 5 - Ї®«г祭ЁҐ Ё­д®а¬ жЁЁ ® д ©«Ґ/Ї ЇЄҐ. === -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 5 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +8: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +12 = +0xC: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +16 = +0x10: dword: гЄ § вҐ«м ­  ЎгдҐа, Єг¤  Ўг¤гв § ЇЁб ­л ¤ ­­лҐ - (40 Ў ©в) - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx а §аги Ґвбп -€­д®а¬ жЁп ® д ©«Ґ ў®§ўа й Ґвбп ў д®а¬ вҐ Ѓ„‚Љ -(Ў«®Є  ¤ ­­ле ўе®¤  Є в «®Ј ), гЄ § ­­®¬ ў ®ЇЁб ­ЁЁ -Ї®¤дг­ЄжЁЁ 1, ­® ЎҐ§ Ё¬Ґ­Ё д ©«  -(в® Ґбвм ЇҐаўлҐ 40 = 0x28 Ў ©в). -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґв ўЁавг «м­лҐ Ї ЇЄЁ вЁЇ  /, /rd Ё - Є®а­ҐўлҐ Ї ЇЄЁ вЁЇ  /rd/1. - -====================================================================== -===== ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 6 - гбв ­®ўЄ   ваЁЎгв®ў д ©« /Ї ЇЄЁ. ==== -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 6 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +8: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +12 = +0xC: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +16 = +0x10: dword: гЄ § вҐ«м ­  ЎгдҐа б  ваЁЎгв ¬Ё (32 Ў ©в ) - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx а §аги Ґвбп -ЂваЁЎгвл д ©«  - ЇҐаўлҐ 32 Ў ©в  ў Ѓ„‚Љ (Ў«®ЄҐ ¤ ­­ле ўе®¤  Є в «®Ј ), -д®а¬ в Є®в®а®Ј® гЄ § ­ ў ®ЇЁб ­ЁЁ Ї®¤дг­ЄжЁЁ 1 -(в® Ґбвм ЎҐ§ Ё¬Ґ­Ё Ё а §¬Ґа  д ©« ). ЂваЁЎгв д ©«/Ї ЇЄ /¬ҐвЄ  ⮬  -(ЎЁвл 3,4 ў dword'Ґ +0) ­Ґ ¬Ґ­пҐвбп. -Ѓ ©в +4 (д®а¬ в Ё¬Ґ­Ё) ЁЈ­®аЁагҐвбп. -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґв ўЁавг «м­лҐ Ї ЇЄЁ вЁЇ  /, /rd Ё - Є®а­ҐўлҐ Ї ЇЄЁ вЁЇ  /rd/1. - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп ¤«п CD (ўҐа­свбп Є®¤ ®иЁЎЄЁ 2). - -====================================================================== -============ ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 7 - § ЇгбЄ Їа®Ја ¬¬л. ============ -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 7 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: Ї®«Ґ д« Ј®ў: - * ЎЁв 0: § ЇгбвЁвм Їа®жҐбб Є Є ®в« ¦Ёў Ґ¬л© - * ®бв «м­лҐ ЎЁвл § аҐ§ҐаўЁа®ў ­л Ё ¤®«¦­л Ўлвм гбв ­®ў«Ґ­л ў 0 - * +8: dword: 0 Ё«Ё гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ї а ¬Ґва ¬Ё - * +12 = +0xC: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +16 = +0x10: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax > 0 - Їа®Ја ¬¬  § Ја㦥­ , eax ᮤҐа¦Ёв PID - * eax < 0 - Їа®Ё§®и«  ®иЁЎЄ , -eax ᮤҐа¦Ёв - Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * Љ®¬ ­¤­ п бва®Є  ¤®«¦­  § Є ­зЁў вмбп бЁ¬ў®«®¬ б Є®¤®¬ 0 - (ASCIIZ-бва®Є ); гзЁвлў овбп «ЁЎ® ўбҐ бЁ¬ў®«л ¤® § ўҐаи о饣® ­г«п - ўЄ«озЁвҐ«м­®, «ЁЎ® ЇҐаўлҐ 256 бЁ¬ў®«®ў, ў § ўЁбЁ¬®бвЁ ®в в®Ј®, - зв® ¬Ґ­миҐ. - * …б«Ё Їа®жҐбб § ЇгбЄ Ґвбп Є Є ®в« ¦Ёў Ґ¬л©, ®­ ᮧ¤ свбп - ў § ¬®а®¦Ґ­­®¬ б®бв®п­ЁЁ; ¤«п § ЇгбЄ  ЁбЇ®«м§г©вҐ - Ї®¤дг­ЄжЁо 5 дг­ЄжЁЁ 69. - -====================================================================== -========== ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 8 - г¤ «Ґ­ЁҐ д ©« /Ї ЇЄЁ. ========== -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 8 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +8: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +12 = +0xC: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +16 = +0x10: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +20 = +0x14: ASCIIZ-Ё¬п д ©« , Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ д ©«  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп ¤«п CD (ўҐа­свбп Є®¤ ®иЁЎЄЁ 2). - * Њ®¦­® г¤ «пвм в®«мЄ® ЇгбвлҐ Ї ЇЄЁ (Ї®ЇлвЄ  г¤ «Ґ­Ёп ­ҐЇгбв®© Ї ЇЄЁ - ЇаЁўҐ¤св Є ®иЁЎЄҐ б Є®¤®¬ 10, "¤®бвгЇ § ЇаҐйс­"). - -====================================================================== -============= ”г­ЄжЁп 70, Ї®¤дг­ЄжЁп 9 - ᮧ¤ ­ЁҐ Ї ЇЄЁ. ============= -====================================================================== -Џ а ¬Ґвал: - * eax = 70 - ­®¬Ґа дг­ЄжЁЁ - * ebx = гЄ § вҐ«м ­  Ё­д®а¬ жЁ®­­го бвагЄвгаг -”®а¬ в Ё­д®а¬ жЁ®­­®© бвагЄвгал: - * +0: dword: 9 = ­®¬Ґа Ї®¤дг­ЄжЁЁ - * +4: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +8: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +12 = +0xC: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +16 = +0x10: dword: 0 (§ аҐ§ҐаўЁа®ў ­®) - * +20 = +0x14: ASCIIZ-Ё¬п Ї ЇЄЁ, Їа ўЁ«  д®а¬Ёа®ў ­Ёп Ё¬с­ гЄ § ­л ў - ®ЎйҐ¬ ®ЇЁб ­ЁЁ - Ё«Ё - * +20 = +0x14: db 0 - * +21 = +0x15: dd гЄ § вҐ«м ­  ASCIIZ-бва®Єг б Ё¬Ґ­Ґ¬ Ї ЇЄЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­®, Ё­ зҐ Є®¤ ®иЁЎЄЁ д ©«®ў®© бЁб⥬л - * ebx а §аги Ґвбп -‡ ¬Ґз ­Ёп: - * ”г­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп ¤«п CD (ўҐа­свбп Є®¤ ®иЁЎЄЁ 2). - * ђ®¤ЁвҐ«мбЄ п Ї ЇЄ  ¤®«¦­  㦥 бгйҐбвў®ў вм. - * …б«Ё Ї ЇЄ  㦥 бгйҐбвўгҐв, дг­ЄжЁп § ўҐаиЁвбп гбЇҐи­® (eax=0). - -====================================================================== -=== ”г­ЄжЁп 71, Ї®¤дг­ЄжЁп 1 - гбв ­®ўЁвм § Ј®«®ў®Є ®Є­  Їа®Ја ¬¬л. == -====================================================================== -Џ а ¬Ґвал: - * eax = 71 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx =  ¤аҐб бва®ЄЁ § Ј®«®ўЄ  -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв §­ зҐ­Ёп -‡ ¬Ґз ­Ёп: - * ‘ва®Є  § Ј®«®ўЄ  ¤®«¦­  Ўлвм ў д®а¬ вҐ ASCIIZ. ‚ § Ј®«®ўЄҐ - ®в®Ўа ¦ Ґвбп ­Ґ Ў®«ҐҐ 255 бЁ¬ў®«®ў ­Ґ§ ўЁбЁ¬® ®в Ї®«­®© ¤«Ё­л - бва®ЄЁ. - * —в®Ўл гЎа вм § Ј®«®ў®Є, ЇҐаҐ¤ ©вҐ NULL ў ecx. - -====================================================================== -================ ”г­ЄжЁп 72 - Ї®б« вм б®®ЎйҐ­ЁҐ ®Є­г. ================ -====================================================================== - ---- Џ®¤дг­ЄжЁп 1 - Ї®б« вм б®®ЎйҐ­ЁҐ б Ї а ¬Ґв஬  ЄвЁў­®¬г ®Є­г. ---- -Џ а ¬Ґвал: - * eax = 72 - ­®¬Ґа дг­ЄжЁЁ - * ebx = 1 - ­®¬Ґа Ї®¤дг­ЄжЁЁ - * ecx = Є®¤ б®ЎлвЁп: 2 Ё«Ё 3 - * edx = Є®¤ Є« ўЁиЁ ¤«п ecx=2, Ё¤Ґ­вЁдЁЄ в®а Є­®ЇЄЁ ¤«п ecx=3 -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * eax = 0 - гбЇҐи­® - * eax = 1 - ЎгдҐа § Ї®«­Ґ­ - -====================================================================== -========== ”г­ЄжЁп -1 - § ўҐаиЁвм ўлЇ®«­Ґ­ЁҐ Ї®в®Є /Їа®жҐбб  ========= -====================================================================== -Џ а ¬Ґвал: - * eax = -1 - ­®¬Ґа дг­ЄжЁЁ -‚®§ўа й Ґ¬®Ґ §­ зҐ­ЁҐ: - * дг­ЄжЁп ­Ґ ў®§ўа й Ґв ­Ё §­ зҐ­Ёп, ­Ё гЇа ў«Ґ­Ёп -‡ ¬Ґз ­Ёп: - * …б«Ё Їа®жҐбб пў­® ­Ґ ᮧ¤ ў « Ї®в®Є®ў, в® г ­ҐЈ® Ґбвм в®«мЄ® - ®¤Ё­ Ї®в®Є, § ўҐа襭ЁҐ Є®в®а®Ј® ЇаЁў®¤Ёв Є § ўҐа襭Ёо Їа®жҐбб . - * …б«Ё ⥪гйЁ© Ї®в®Є - Ї®б«Ґ¤­Ё© ў Їа®жҐббҐ, в® ҐЈ® § ўҐа襭ЁҐ - в Є¦Ґ ЇаЁў®¤Ёв Є § ўҐа襭Ёо Їа®жҐбб . - * ќв  дг­ЄжЁп § ўҐаи Ґв ⥪гйЁ© Ї®в®Є. „агЈ®© Ї®в®Є ¬®¦­® ЇаЁЎЁвм - ўл§®ў®¬ Ї®¤дг­ЄжЁЁ 2 дг­ЄжЁЁ 18. - -====================================================================== -=========================== ‘ЇЁб®Є б®ЎлвЁ© =========================== -====================================================================== -ЋзҐаҐ¤­®Ґ б®ЎлвЁҐ ¬®¦­® Ї®«гзЁвм ўл§®ў®¬ ®¤­®© Ё§ дг­ЄжЁ© 10 -(®¦Ё¤ вм б®ЎлвЁп), 11 (Їа®ўҐаЁвм ЎҐ§ ®¦Ё¤ ­Ёп), 23 -(®¦Ё¤ вм ў вҐзҐ­ЁҐ § ¤ ­­®Ј® ўаҐ¬Ґ­Ё). -ќвЁ дг­ЄжЁЁ ў®§ўа й ов в®«мЄ® ⥠ᮡлвЁп, Є®в®алҐ ўе®¤пв ў ¬ бЄг, -гбв ­ ў«Ёў Ґ¬го дг­ЄжЁҐ© 40. Џ® 㬮«з ­Ёо нв® ЇҐаўлҐ ваЁ, 祣® -ўЇ®«­Ґ ¤®бв в®з­® ¤«п ¬­®ЈЁе ЇаЁ«®¦Ґ­Ё©. -Љ®¤л б®ЎлвЁ©: - * 1 = б®®ЎйҐ­ЁҐ ® ЇҐаҐаЁб®ўЄҐ (бЎа блў Ґвбп ЇаЁ ўл§®ўҐ дг­ЄжЁЁ 0) - * 2 = ­ ¦ в  Є« ўЁи  ­  Є« ўЁ вгॠ(Ї®бвгЇ Ґв, в®«мЄ® Є®Ј¤  ®Є­® -  ЄвЁў­®) Ё«Ё ­ ¦ в  "Ј®апз п Є« ўЁи "; - бЎа блў Ґвбп, Є®Ј¤  ўбҐ Є« ўЁиЁ Ё§ ЎгдҐа  бзЁв ­л дг­ЄжЁҐ© 2 - * 3 = ­ ¦ в  Є­®ЇЄ , ®ЇаҐ¤Ґ«с­­ п а ­ҐҐ дг­ЄжЁҐ© 8 (Ё«Ё Є­®ЇЄ  - § ЄалвЁп, ᮧ¤ ­­ п ­Ґпў­® дг­ЄжЁҐ© 0; Є­®ЇЄ  ¬Ё­Ё¬Ё§ жЁЁ - ®Ўа Ў влў Ґвбп бЁб⥬®© Ё ® ­Ґ© б®®ЎйҐ­Ёп ­Ґ ЇаЁе®¤Ёв; - Ї®бвгЇ Ґв, в®«мЄ® Є®Ј¤  ®Є­®  ЄвЁў­®; бЎа блў Ґвбп, Є®Ј¤  ўбҐ - Є­®ЇЄЁ Ё§ ЎгдҐа  бзЁв ­л дг­ЄжЁҐ© 17) - * 4 = § аҐ§ҐаўЁа®ў ­® (ў ⥪г饩 ॠ«Ё§ жЁЁ ­ЁЄ®Ј¤  ­Ґ ЇаЁе®¤Ёв ¤ ¦Ґ - ЇаЁ а §¬ бЄЁа®ўЄҐ дг­ЄжЁҐ© 40) - * 5 = ЇҐаҐаЁб®ўлў Ґвбп д®­ а Ў®зҐЈ® бв®«  (бЎа блў Ґвбп -  ўв®¬ вЁзҐбЄЁ Ї®б«Ґ ЇҐаҐаЁб®ўЄЁ, в Є зв® Ґб«Ё ў® ўаҐ¬п ЇҐаҐаЁб®ўЄЁ - д®­  Їа®Ја ¬¬  ­Ґ ¦¤св Ё ­Ґ Їа®ўҐапҐв б®ЎлвЁп, в® нв®Ј® б®ЎлвЁп - ®­  ­Ґ § ¬ҐвЁв) - * 6 = б®ЎлвЁҐ ®в ¬лиЁ (зв®-в® б«гзЁ«®бм - ­ ¦ вЁҐ ­  Є­®ЇЄг ¬лиЁ - Ё«Ё ЇҐаҐ¬ҐйҐ­ЁҐ; бЎа блў Ґвбп ЇаЁ Їа®з⥭ЁЁ) - * 7 = Їа®Ё§®и«® б®ЎлвЁҐ IPC (ᬮваЁ дг­ЄжЁо 60 - Inter Process - Communication; бЎа блў Ґвбп ЇаЁ Їа®з⥭ЁЁ) - * 8 = Їа®Ё§®и«® бҐвҐў®Ґ б®ЎлвЁҐ (бЎа блў Ґвбп ЇаЁ Їа®з⥭ЁЁ; - ᬮваЁ а Ў®вг б бҐвмо) - * 9 = Їа®Ё§®и«® ®в« ¤®з­®Ґ б®ЎлвЁҐ (бЎа блў Ґвбп ЇаЁ Їа®з⥭ЁЁ; - ᬮваЁ ®в« ¤®з­го Ї®¤бЁб⥬г) - * 16..31 = Їа®Ё§®и«® б®ЎлвЁҐ б ᮮ⢥вбвўгойЁ¬ IRQ - (16=IRQ0, 31=IRQ15) (бЎа блў Ґвбп ЇаЁ бзЁвлў ­ЁЁ ўбҐе ¤ ­­ле IRQ) - -====================================================================== -==================== Љ®¤л ®иЁЎ®Є д ©«®ў®© бЁб⥬л ==================== -====================================================================== - * 0 = гбЇҐи­® - * 1 = ­Ґ ®ЇаҐ¤Ґ«Ґ­  Ў §  Ё/Ё«Ё а §¤Ґ« ¦сбвЄ®Ј® ¤ЁбЄ  (Ї®¤дг­ЄжЁп¬Ё - 7, 8 дг­ЄжЁЁ 21) - * 2 = дг­ЄжЁп ­Ґ Ї®¤¤Ґа¦Ёў Ґвбп ¤«п ¤ ­­®© д ©«®ў®© бЁб⥬л - * 3 = ­ҐЁ§ўҐбв­ п д ©«®ў п бЁб⥬  - * 4 = § аҐ§ҐаўЁа®ў ­®, ­ЁЄ®Ј¤  ­Ґ ў®§ўа й Ґвбп ў ⥪г饩 ॠ«Ё§ жЁЁ - * 5 = д ©« ­Ґ ­ ©¤Ґ­ - * 6 = д ©« § Є®­зЁ«бп - * 7 = гЄ § вҐ«м ў­Ґ Ї ¬пвЁ ЇаЁ«®¦Ґ­Ёп - * 8 = ¤ЁбЄ § Ї®«­Ґ­ - * 9 = в Ў«Ёж  FAT а §аг襭  - * 10 = ¤®бвгЇ § ЇаҐйс­ - * 11 = ®иЁЎЄ  гбва®©бвў  -ЏаЁ § ЇгбЄҐ Їа®Ја ¬¬л ў®§¬®¦­л в Є¦Ґ б«Ґ¤гойЁҐ Є®¤л ®иЁЎ®Є: - * 30 = 0x1E = ­Ґ¤®бв в®з­® Ї ¬пвЁ - * 31 = 0x1F = д ©« ­Ґ пў«пҐвбп ЁбЇ®«­Ё¬л¬ - * 32 = 0x20 = б«ЁиЄ®¬ ¬­®Ј® Їа®жҐбб®ў diff --git a/kernel/branches/net/docs/sysfuncs.txt b/kernel/branches/net/docs/sysfuncs.txt deleted file mode 100644 index 5d548b3690..0000000000 --- a/kernel/branches/net/docs/sysfuncs.txt +++ /dev/null @@ -1,4488 +0,0 @@ -SYSTEM FUNCTIONS of OS Kolibri 0.7.5.0 - -Number of the function is located in the register eax. -The call of the system function is executed by "int 0x40" command. -All registers except explicitly declared in the returned value, - including eflags, are preserved. - - -====================================================================== -============== Function 0 - define and draw the window. ============== -====================================================================== -Defines an application window. Draws a frame of the window, header and -working area. For skinned windows defines standard close and minimize -buttons. -Parameters: - * eax = 0 - function number - * ebx = [coordinate on axis x]*65536 + [size on axis x] - * ecx = [coordinate on axis y]*65536 + [size on axis y] - * edx = 0xXYRRGGBB, where: - * Y = style of the window: - * Y=0 - type I - fixed-size window - * Y=1 - only define window area, draw nothing - * Y=2 - type II - variable-size window - * Y=3 - skinned window - * Y=4 - skinned fixed-size window - * other possible values (from 5 up to 15) are reserved, - function call with such Y is ignored - * RR, GG, BB = accordingly red, green, blue components of a color - of the working area of the window (are ignored for style Y=2) - * X = DCBA (bits) - * A = 1 - window has caption; for styles Y=3,4 caption string - must be passed in edi, for other styles use - subfunction 1 of function 71 - * B = 1 - coordinates of all graphics primitives are relative to - window client area - * C = 1 - don't fill working area on window draw - * D = 0 - normal filling of the working area, 1 - gradient - The following parameters are intended for windows - of a type I and II, and ignored for styles Y=1,3: - * esi = 0xXYRRGGBB - color of the header - * RR, GG, BB define color - * Y=0 - usual window, Y=1 - unmovable window - * X defines a gradient of header: X=0 - no gradient, - X=8 - usual gradient, - for windows of a type II X=4 - negative gradient - * other values of X and Y are reserved - * edi = 0x00RRGGBB - color of the frame -Returned value: - * function does not return value -Remarks: - * Position and sizes of the window are installed by the first - call of this function and are ignored at subsequent; to change - position and/or sizes of already created window use function 67. - * For windows with styles Y=3,4 and caption (A=1) caption string - is set by the first call of this function and is ignored - at subsequent (strictly speaking, is ignored after a call to - subfunction 2 of function 12 - end redraw); to change caption of - already created window use subfunction 1 of function 71. - * If the window has appropriate styles, position and/or sizes can be - changed by user. Current position and sizes can be obtained - by function 9. - * The window must fit on the screen. If the transferred - coordinates and sizes do not satisfy to this condition, - appropriate coordinate (or, probably, both) is considered as zero, - and if it does not help too, the appropriate size - (or, probably, both) is installed in a size of the screen. - - Further let us designate xpos,ypos,xsize,ysize - values passed - in ebx,ecx. The coordinates are resulted concerning - the left upper corner of the window, which, thus, is set as (0,0), - coordinates of the right lower corner essence (xsize,ysize). - * The sizes of the window are understood in sence of coordinates - of the right lower corner. This concerns all other functions too. - It means, that the real sizes are on 1 pixel more. - * The window of type I looks as follows: - * draw external frame of color indicated in edi, 1 pixel in width - * draw header - rectangle with the left upper corner (1,1) and - right lower (xsize-1,min(25,ysize)) color indicated in esi - (taking a gradient into account) - * if ysize>=26, fill the working area of the window - - rectangle with the left upper corner (1,21) and right lower - (xsize-1,ysize-1) (sizes (xsize-1)*(ysize-21)) with color - indicated in edx (taking a gradient into account) - * if A=1 and caption has been already set by subfunction 1 - of function 71, it is drawn in the corresponding place of header - * The window of style Y=1 looks as follows: - * completely defined by the application - * The window of type II looks as follows: - * draw external frame of width 1 pixel with the "shaded" color - edi (all components of the color decrease twice) - * draw intermediate frame of width 3 pixels with color edi - * draw internal frame of width 1 pixel with the "shaded" color edi - * draw header - rectangle with the left upper corner (4,4) - and right lower (xsize-4,min(20,ysize)) color, indicated in esi - (taking a gradient into account) - * if ysize>=26, fill the working area of the window - - rectangle with the left upper corner (5,20) and right lower - (xsize-5,ysize-5) with color indicated in edx - (taking a gradient into account) - * if A=1 and caption has been already set by subfunction 1 - of function 71, it is drawn in the corresponding place of header - * The skinned window looks as follows: - * draw external frame of width 1 pixel - with color 'outer' from the skin - * draw intermediate frame of width 3 pixel - with color 'frame' from the skin - * draw internal frame of width 1 pixel - with color 'inner' from the skin - * draw header (on bitmaps from the skin) in a rectangle - (0,0) - (xsize,_skinh-1) - * if ysize>=26, fill the working area of the window - - rectangle with the left upper corner (5,_skinh) and right lower - (xsize-5,ysize-5) with color indicated in edx - (taking a gradient into account) - * define two standard buttons: close and minimize - (see function 8) - * if A=1 and edi contains (nonzero) pointer to caption string, - it is drawn in place in header defined in the skin - * value _skinh is accessible as the result of call - subfunction 4 of function 48 - -====================================================================== -================ Function 1 - put pixel in the window. =============== -====================================================================== -Parameters: - * eax = 1 - function number - * ebx = x-coordinate (relative to the window) - * ecx = y-coordinate (relative to the window) - * edx = 0x00RRGGBB - color of a pixel - edx = 0x01xxxxxx - invert color of a pixel - (low 24 bits are ignored) -Returned value: - * function does not return value - -====================================================================== -============ Function 2 - get the code of the pressed key. =========== -====================================================================== -Takes away the code of the pressed key from the buffer. -Parameters: - * eax = 2 - function number -Returned value: - * if the buffer is empty, function returns eax=1 - * if the buffer is not empty, function returns al=0, - ah=code of the pressed key, high word of eax is zero - * if there is "hotkey", function returns al=2, - ah=scancode of the pressed key (0 for control keys), - high word of eax contains a status of control keys at the moment - of pressing a hotkey -Remarks: - * There is a common system buffer of the pressed keys - by a size of 120 bytes, organized as queue. - * There is one more common system buffer on 120 "hotkeys". - * If the application with the inactive window calls this function, - the buffer of the pressed keys is considered to be empty. - * By default this function returns ASCII-codes; to switch - to the scancodes mode (and back) use function 66. - However, hotkeys are always notificated as scancodes. - * To find out, what keys correspond to what codes, start - the application keyascii and scancode. - * Scancodes come directly from keyboard and are fixed; - ASCII-codes turn out with usage of the conversion tables, - which can be set by subfunction 2 of function 21 - and get by subfunction 2 of function 26. - * As a consequence, ASCII-codes take into account current - keyboard layout (rus/en) as opposed to scancodes. - * This function notifies only about those hotkeys, which were - defined by this thread by subfunction 4 of function 66. - -====================================================================== -==================== Function 3 - get system time. =================== -====================================================================== -Parameters: - * eax = 3 - function number -Returned value: - * eax = 0x00SSMMHH, where HH:MM:SS = Hours:Minutes:Seconds - * each item is BCD-number, for example, - for time 23:59:59 function returns 0x00595923 -Remarks: - * See also subfunction 9 of function 26 - get time from - the moment of start of the system; it is more convenient, because - returns simply DWORD-value of the time counter. - * System time can be set by function 22. - -====================================================================== -============ Function 4 - draw text string in the window. ============ -====================================================================== -Parameters: - * eax = 4 - function number - * ebx = [coordinate on axis x]*65536 + [coordinate on axis y] - * ecx = 0xX0RRGGBB, where - * RR, GG, BB specify text color - * X=ABnn (bits): - * nn specifies the used font: 0=system monospaced, - 1=system font of variable width - * A=0 - output esi characters, A=1 - output ASCIIZ-string - * B=1 - fill background with the color edi - * edx = pointer to the beginning of the string - * esi = for A=0 length of the string, must not exceed 255; - for A=1 is ignored -Returned value: - * function does not return value -Remarks: - * First system font is read out at loading from the file char.mt, - second - from char2.mt. - * Both fonts have height 9 pixels, width of the monospaced font - is equal to 6 pixels. - -====================================================================== -========================= Function 5 - delay. ======================== -====================================================================== -Delays execution of the program on the given time. -Parameters: - * eax = 5 - function number - * ebx = time in the 1/100 of second -Returned value: - * function does not return value -Remarks: - * Passing ebx=0 does not transfer control to the next process - and does not make any operations at all. If it is really required - to transfer control to the next process (to complete a current - time slice), use subfunction 1 of function 68. - -====================================================================== -============== Function 6 - read the file from ramdisk. ============== -====================================================================== -Parameters: - * eax = 6 - function number - * ebx = pointer to the filename - * ecx = number of start block, beginning from 1; - ecx=0 - read from the beginning of the file (same as ecx=1) - * edx = number of blocks to read; - edx=0 - read one block (same as edx=1) - * esi = pointer to memory area for the data -Returned value: - * eax = file size in bytes, if the file was successfully read - * eax = -1, if the file was not found -Remarks: - * This function is out-of-date; function 70 allows - to fulfil the same operations with the extended possibilities. - * Block = 512 bytes. - * For reading all file you can specify the certainly large value - in edx, for example, edx = -1; but in this case be ready that - the program will "fall", if the file will appear too large and can - not be placed in the program memory. - * The filename must be either in the format 8+3 characters - (first 8 characters - name itself, last 3 - extension, - the short names and extensions are supplemented with spaces), - or in the format 8.3 characters "FILE.EXT"/"FILE.EX " - (name no more than 8 characters, dot, extension 3 characters - supplemented if necessary by spaces). - The filename must be written with capital letters. The terminating - character with code 0 is not necessary (not ASCIIZ-string). - * This function does not support folders on the ramdisk. - -====================================================================== -=============== Function 7 - draw image in the window. =============== -====================================================================== -Paramters: - * eax = 7 - function number - * ebx = pointer to the image in the format BBGGRRBBGGRR... - * ecx = [size on axis x]*65536 + [size on axis y] - * edx = [coordinate on axis x]*65536 + [coordinate on axis y] -Returned value: - * function does not return value -Remarks: - * Coordinates of the image are coordinates of the upper left corner - of the image relative to the window. - * Size of the image in bytes is 3*xsize*ysize. - -====================================================================== -=============== Function 8 - define/delete the button. =============== -====================================================================== -Parameters for button definition: - * eax = 8 - function number - * ebx = [coordinate on axis x]*65536 + [size on axis x] - * ecx = [coordinate on axis y]*65536 + [size on axis y] - * edx = 0xXYnnnnnn, where: - * nnnnnn = identifier of the button - * high (31st) bit of edx is cleared - * if 30th bit of edx is set - do not draw the button - * if 29th bit of edx is set - do not draw a frame - at pressing the button - * esi = 0x00RRGGBB - color of the button -Parameters for button deleting: - * eax = 8 - function number - * edx = 0x80nnnnnn, where nnnnnn - identifier of the button -Returned value: - * function does not return value -Remarks: - * Sizes of the button must be more than 0 and less than 0x8000. - * For skinned windows definition of the window - (call of 0th function) creates two standard buttons - - for close of the window with identifier 1 and - for minimize of the window with identifier 0xffff. - * The creation of two buttons with same identifiers is admitted. - * The button with the identifier 0xffff at pressing is interpreted - by the system as the button of minimization, the system handles - such pressing independently, not accessing to the application. - In rest it is usual button. - * Total number of buttons for all applications is limited to 4095. - -====================================================================== -============ Function 9 - information on execution thread. =========== -====================================================================== -Parameters: - * eax = 9 - function number - * ebx = pointer to 1-Kb buffer - * ecx = number of the slot of the thread - ecx = -1 - get information on the current thread -Returned value: - * eax = maximum number of the slot of a thread - * buffer pointed to by ebx contains the following information: - * +0: dword: usage of the processor (how many time units - per second leaves on execution of this thread) - * +4: word: position of the window of thread in the window stack - * +6: word: (has no relation to the specified thread) - number of the thread slot, which window has in the window stack - position ecx - * +8: word: reserved - * +10 = +0xA: 11 bytes: name of the process - (name of corresponding executable file in the format 8+3) - * +21 = +0x15: byte: reserved, this byte is not changed - * +22 = +0x16: dword: address of the process in memory - * +26 = +0x1A: dword: size of used memory - 1 - * +30 = +0x1E: dword: identifier (PID/TID) - * +34 = +0x22: dword: coordinate of the thread window on axis x - * +38 = +0x26: dword: coordinate of the thread window on axis y - * +42 = +0x2A: dword: size of the thread window on axis x - * +46 = +0x2E: dword: size of the thread window on axis y - * +50 = +0x32: word: status of the thread slot: - * 0 = thread is running - * 1 = thread is suspended - * 2 = thread is suspended while waiting for event - * 3 = thread is terminating as a result of call to function -1 - or under duress as a result of call to subfunction 2 - of function 18 or termination of the system - * 4 = thread is terminating as a result of exception - * 5 = thread waits for event - * 9 = requested slot is free, all other information on the slot - is not meaningful - * +52 = +0x34: word: reserved, this word is not changed - * +54 = +0x36: dword: coordinate of the client area on axis x - * +58 = +0x3A: dword: coordinate of the client area on axis y - * +62 = +0x3E: dword: width of the client area - * +66 = +0x42: dword: height of the client area - * +70 = +0x46: byte: state of the window - bitfield - * bit 0 (mask 1): window is maximized - * bit 1 (mask 2): window is minimized to panel - * bit 2 (mask 4): window is rolled up -Remarks: - * Slots are numbered starting from 1. - * Returned value is not a total number of threads, because there - can be free slots. - * When process is starting, system automatically creates - execution thread. - * Function gives information on the thread. Each process has - at least one thread. One process can create many threads, - in this case each thread has its own slot and the fields - +10, +22, +26 in these slots coincide. - Applications have no common way to define whether two threads - belong to one process. - * The active window - window on top of the window stack - - receives the messages on a keyboard input. For such window - the position in the window stack coincides with returned value. - * Slot 1 corresponds to special system thread, for which: - * the window is in the bottom of the window stack, the fields - +4 and +6 contain value 1 - * name of the process - "OS/IDLE" (supplemented by spaces) - * address of the process in memory is 0, size of used memory is - 16 Mb (0x1000000) - * PID=1 - * coordinates and sizes of the window and the client area are by - convention set to 0 - * status of the slot is always 0 (running) - * the execution time adds of time leaving on operations itself - and idle time in waiting for interrupt (which can be got by call - to subfunction 4 of function 18). - * Beginning from slot 2, the normal applications are placed. - * The normal applications are placed in memory at the address - 0x60400000 (kernel constant 'std_application_base_address'). - There is no intersection, as each process has its own page table. - * At creation of the thread it is assigned the slot - in the system table and identifier (Process/Thread IDentifier = - PID/TID), which do not vary with time for given thread. - After completion of the thread its slot can be anew used - for another thread. The thread identifier can not be assigned - to other thread even after completion of this thread. - Identifiers, assigned to new threads, grow monotonously. - * If the thread has not yet defined the window by call to - function 0, the position and the sizes - of its window are considered to be zero. - * Coordinates of the client area are relative to the window. - * At the moment only the part of the buffer by a size - 71 = 0x37 bytes is used. Nevertheless it is recommended to use - 1-Kb buffer for the future compatibility, in the future - some fields can be added. - -====================================================================== -==================== Function 10 - wait for event. =================== -====================================================================== -If the message queue is empty, waits for appearance of the message -in queue. In this state thread does not consume CPU time. -Then reads out the message from queue. - -Parameters: - * eax = 10 - function number -Returned value: - * eax = event (see the list of events) -Remarks: - * Those events are taken into account only which enter into - a mask set by function 40. By default it is - redraw, key and button events. - * To check, whether there is a message in queue, use function 11. - To wait for no more than given time, use function 23. - -====================================================================== -=============== Function 11 - check for event, no wait. ============== -====================================================================== -If the message queue contains event, function reads out -and return it. If the queue is empty, function returns 0. -Parameters: - * eax = 11 - function number -Returned value: - * eax = 0 - message queue is empty - * else eax = event (see the list of events) -Remarks: - * Those events are taken into account only, which enter into - a mask set by function 40. By default it is - redraw, key and button events. - * To wait for event, use function 10. - To wait for no more than given time, use function 23. - -====================================================================== -=============== Function 12 - begin/end window redraw. =============== -====================================================================== - ----------------- Subfunction 1 - begin window redraw. ---------------- -Parameters: - * eax = 12 - function number - * ebx = 1 - subfunction number -Returned value: - * function does not return value - ------------------ Subfunction 2 - end window redraw. ----------------- -Parameters: - * eax = 12 - function number - * ebx = 2 - subfunction number -Returned value: - * function does not return value -Remarks: - * Subfunction 1 deletes all buttons defined with - function 8, they must be defined again. - -====================================================================== -============ Function 13 - draw a rectangle in the window. =========== -====================================================================== -Parameters: - * eax = 13 - function number - * ebx = [coordinate on axis x]*65536 + [size on axis x] - * ecx = [coordinate on axis y]*65536 + [size on axis y] - * edx = color 0xRRGGBB or 0x80RRGGBB for gradient fill -Returned value: - * function does not return value -Remarks: - * Coordinates are understood as coordinates of the left upper corner - of a rectangle relative to the window. - -====================================================================== -=================== Function 14 - get screen size. =================== -====================================================================== -Parameters: - * eax = 14 - function number -Returned value: - * eax = [xsize]*65536 + [ysize], where - * xsize = x-coordinate of the right lower corner of the screen = - horizontal size - 1 - * ysize = y-coordinate of the right lower corner of the screen = - vertical size - 1 -Remarks: - * See also subfunction 5 of function 48 - get sizes of - working area of the screen. - -====================================================================== -== Function 15, subfunction 1 - set a size of the background image. == -====================================================================== -Parameters: - * eax = 15 - function number - * ebx = 1 - subfunction number - * ecx = width of the image - * edx = height of the image -Returned value: - * function does not return value -Remarks: - * Before calling subfunctions 2 and 5 you should call this function - to set image size! - * For update of the screen (after completion of a series of commands - working with a background) call subfunction 3. - * There is a pair function for get size of the background image - - subfunction 1 of function 39. - -====================================================================== -=== Function 15, subfunction 2 - put pixel on the background image. == -====================================================================== -Parameters: - * eax = 15 - function number - * ebx = 2 - subfunction number - * ecx = offset - * edx = color of a pixel 0xRRGGBB -Returned value: - * function does not return value -Remarks: - * Offset for a pixel with coordinates (x,y) is calculated as - (x+y*xsize)*3. - * If the given offset exceeds size set by subfunction 1, - the call is ignored. - * For update of the screen (after completion of a series of commands - working with a background) call subfunction 3. - * There is a pair function for get pixel on the background image - - subfunction 2 of function 39. - -====================================================================== -=========== Function 15, subfunction 3 - redraw background. ========== -====================================================================== -Parameters: - * eax = 15 - function number - * ebx = 3 - subfunction number -Returned value: - * function does not return value - -====================================================================== -== Function 15, subfunction 4 - set drawing mode for the background. = -====================================================================== -Parameters: - * eax = 15 - function number - * ebx = 4 - subfunction number - * ecx = drawing mode: - * 1 = tile - * 2 = stretch -Returned value: - * function does not return value -Remarks: - * For update of the screen (after completion of a series of commands - working with a background) call subfunction 3. - * There is a pair function for get drawing mode of the background - - subfunction 4 of function 39. - -====================================================================== -===================== Function 15, subfunction 5 ===================== -============ Put block of pixels on the background image. ============ -====================================================================== -Parameters: - * eax = 15 - function number - * ebx = 5 - subfunction number - * ecx = pointer to the data in the format BBGGRRBBGGRR... - * edx = offset in data of the background image - * esi = size of data in bytes = 3 * number of pixels -Returned value: - * function does not return value -Remarks: - * Offset and size are not checked for correctness. - * Color of each pixel is stored as 3-bytes value BBGGRR. - * Pixels of the background image are written sequentially - from left to right, from up to down. - * Offset of pixel with coordinates (x,y) is (x+y*xsize)*3. - * For update of the screen (after completion of a series of commands - working with a background) call subfunction 3. - -====================================================================== -===================== Function 15, subfunction 6 ===================== -======== Map background data to the address space of process. ======== -====================================================================== -Parameters: - * eax = 15 - function number - * ebx = 6 - subfunction number -Returned value: - * eax = pointer to background data, 0 if error -Remarks: - * Mapped data are available for read and write. - * Size of background data is 3*xsize*ysize. The system blocks - changes of background sizes while process works with mapped data. - * Color of each pixel is stored as 3-bytes value BBGGRR. - * Pixels of the background image are written sequentially - from left to right, from up to down. - -====================================================================== -===== Function 15, subfunction 7 - close mapped background data. ===== -====================================================================== -Parameters: - * eax = 15 - function number - * ebx = 7 - subfunction number - * ecx = pointer to mapped data -Returned value: - * eax = 1 - success, 0 - error - -====================================================================== -=============== Function 16 - save ramdisk on a floppy. ============== -====================================================================== -Parameters: - * eax = 16 - function number - * ebx = 1 or ebx = 2 - on which floppy save -Returned value: - * eax = 0 - success - * eax = 1 - error - -====================================================================== -======= Function 17 - get the identifier of the pressed button. ====== -====================================================================== -Takes away the code of the pressed button from the buffer. -Parameters: - * eax = 17 - function number -Returned value: - * if the buffer is empty, function returns eax=1 - * if the buffer is not empty: - * high 24 bits of eax contain button identifier (in particular, - ah contains low byte of the identifier; if all buttons have - the identifier less than 256, ah is enough to distinguish) - * al = 0 - the button was pressed with left mouse button - * al = bit corresponding to used mouse button otherwise -Remarks: - * "Buffer" keeps only one button, at pressing the new button the - information about old is lost. - * The call of this function by an application with inactive window - will return answer "buffer is empty". - * Returned value for al corresponds to the state of mouse buttons - as in subfunction 2 of function 37 at the beginning - of button press, excluding lower bit, which is cleared. - -====================================================================== -= Function 18, subfunction 2 - terminate process/thread by the slot. = -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 2 - subfunction number - * ecx = number of the slot of process/thread -Returned value: - * function does not return value -Remarks: - * It is impossible to terminate system thread OS/IDLE (with - number of the slot 1), - it is possible to terminate any normal process/thread. - * See also subfunction 18 - terminate - process/thread by the identifier. - -====================================================================== -===================== Function 18, subfunction 3 ===================== -============= Make active the window of the given thread. ============ -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 3 - subfunction number - * ecx = number of the thread slot -Returned value: - * function does not return value -Remarks: - * If correct, but nonexistent slot is given, - some window is made active. - * To find out, which window is active, use subfunction 7. - -====================================================================== -===================== Function 18, subfunction 4 ===================== -=========== Get counter of idle time units per one second. =========== -====================================================================== -Idle time units are units, in which the processor stands idle -in waiting for interrupt (in the command 'hlt'). - -Parameters: - * eax = 18 - function number - * ebx = 4 - subfunction number -Returned value: - * eax = value of the counter of idle time units per one second - -====================================================================== -========== Function 18, subfunction 5 - get CPU clock rate. ========== -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 5 - subfunction number -Returned value: - * eax = clock rate (modulo 2^32 clock ticks = 4GHz) - -====================================================================== - Function 18, subfunction 6 - save ramdisk to the file on hard drive. -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 6 - subfunction number - * ecx = pointer to the full path to file - (for example, "/hd0/1/kolibri/kolibri.img") -Returned value: - * eax = 0 - success - * else eax = error code of the file system -Remarks: - * All folders in the given path must exist, otherwise function - returns value 5, "file not found". - -====================================================================== -=========== Function 18, subfunction 7 - get active window. ========== -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 7 - subfunction number -Returned value: - * eax = number of the active window - (number of the slot of the thread with active window) -Remarks: - * Active window is at the top of the window stack and receives - messages on all keyboard input. - * To make a window active, use subfunction 3. - -====================================================================== -== Function 18, subfunction 8 - disable/enable the internal speaker. = -====================================================================== -If speaker sound is disabled, all calls to subfunction 55 of -function 55 are ignored. If speaker sound is enabled, -they are routed on builtin speaker. - -------------------- Subsubfunction 1 - get status. ------------------- -Parameters: - * eax = 18 - function number - * ebx = 8 - subfunction number - * ecx = 1 - number of the subsubfunction -Returned value: - * eax = 0 - speaker sound is enabled; 1 - disabled - ------------------ Subsubfunction 2 - toggle status. ------------------ -Toggles states of disable/enable. -Parameters: - * eax = 18 - function number - * ebx = 8 - subfunction number - * ecx = 2 - number of the subsubfunction -Returned value: - * function does not return value - -====================================================================== -== Function 18, subfunction 9 - system shutdown with the parameter. == -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 9 - subfunction number - * ecx = parameter: - * 2 = turn off computer - * 3 = reboot computer - * 4 = restart the kernel from the file 'kernel.mnt' on ramdisk -Returned value: - * at incorrect ecx the registers do not change (i.e. eax=18) - * by correct call function always returns eax=0 - as the tag of success -Remarks: - * Do not rely on returned value by incorrect call, it can be - changed in future versions of the kernel. - -====================================================================== -===== Function 18, subfunction 10 - minimize application window. ===== -====================================================================== -Minimizes the own window. -Parameters: - * eax = 18 - function number - * ebx = 10 - subfunction number -Returned value: - * function does not return value -Remarks: - * The minimized window from the point of view of function 9 - keeps position and sizes. - * Restoring of an application window occurs at its activation by - subfunction 3. - * Usually there is no necessity to minimize/restire a window - obviously: minimization of a window is carried out by the system - at pressing the minimization button (for skinned windows - it is defined automatically by function 0, - for other windows it can be defined manually by function 8), - restore of a window is done by the application '@panel'. - -====================================================================== - Function 18, subfunction 11 - get information on the disk subsystem. -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 11 - subfunction number - * ecx = type of the table: - * 1 = short version, 10 bytes - * 2 = full version, 65536 bytes - * edx = pointer to the buffer (in the application) for the table -Returned value: - * function does not return value -Format of the table: short version: - * +0: byte: information about FDD's (drives for floppies), - AAAABBBB, where AAAA gives type of the first drive, BBBB - - of the second regarding to the following list: - * 0 = there is no drive - * 1 = 360Kb, 5.25'' - * 2 = 1.2Mb, 5.25'' - * 3 = 720Kb, 3.5'' - * 4 = 1.44Mb, 3.5'' - * 5 = 2.88Mb, 3.5'' (such drives are not used anymore) - For example, for the standard configuration from one 1.44-drive - here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B: - the value is 24h. - * +1: byte: information about hard disks and CD-drives, AABBCCDD, - where AA corresponds to the controller IDE0, ..., DD - IDE3: - * 0 = device is absent - * 1 = hard drive - * 2 = CD-drive - For example, in the case HD on IDE0 and CD on IDE2 - this field contains 48h. - * +2: 4 db: number of the retrieved partitions on hard disks - at accordingly IDE0,...,IDE3. - If the hard disk on IDEx is absent, appropriate byte is zero, - otherwise it shows number of the recognized partitions, which - can be not presented (if the drive is not formatted or if - the file system is not supported). Current version of the kernel - supports only FAT16, FAT32 and NTFS for hard disks. - * +6: 4 db: reserved -Format of the table: full version: - * +0: 10 db: same as for the short version - * +10: 100 db: data for the first partition - * +110: 100 db: data for the second partition - * ... - * +10+100*(n-1): 100 db: data for the last partition -The partitions are located as follows: at first sequentially all -recoginzed partitions on HD on IDE0 (if present), -then on HD on IDE1 (if present) and so on up to IDE3. -Format of the information about partition -(at moment only FAT is supported): - * +0: dword: first physical sector of the partition - * +4: dword: last physical sector of the partition - (belongs to the partition) - * +8: byte: file system type: - 16=FAT16, 32=FAT32, 1=NTFS - * other data are dependent on file system, are modified with - kernel modifications and therefore are not described -Remarks: - * The short table can be used for obtaining the information about - available devices. - -====================================================================== -========== Function 18, subfunction 13 - get kernel version. ========= -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 13 - subfunction number - * ecx = pointer to the buffer (not less than 16 bytes), where - the information will be placed -Returned value: - * function does not return value -Structure of the buffer: -db a,b,c,d for version a.b.c.d -db UID_xxx: one of UID_NONE=0, UID_MENUET=1, UID_KOLIBRI=2 -dd REV - kernel SVN revision number -For Kolibri 0.7.1.0 kernel: -db 0,7,0,0 -db 2 -dd 638 - -====================================================================== -======= Function 18, subfunction 14 - wait for screen retrace. ======= -====================================================================== -Waits for the beginning of retrace of the scanning ray of the screen -monitor. -Parameters: - * eax = 18 - function number - * ebx = 14 - subfunction number -Returned value: - * eax = 0 as the tag of success -Remarks: - * Function is intended only for active high-efficiency graphics - applications; is used for smooth output of a graphics. - -====================================================================== -== Function 18, subfunction 15 - center mouse cursor on the screen. == -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 15 - subfunction number -Returned value: - * eax = 0 as the tag of success - -====================================================================== -========= Function 18, subfunction 16 - get size of free RAM. ======== -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 16 - subfunction number -Returned value: - * eax = size of free memory in kilobytes - -====================================================================== -======== Function 18, subfunction 17 - get full amount of RAM. ======= -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 17 - subfunction number -Returned value: - * eax = total size of existing memory in kilobytes - -====================================================================== -===================== Function 18, subfunction 18 ==================== -============= Terminate process/thread by the identifier. ============ -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 18 - subfunction number - * ecx = identifer of process/thread (PID/TID) -Returned value: - * eax = 0 - success - * eax = -1 - error (process is not found or is system) -Remarks: - * It is impossible to terminate system thread OS/IDLE (identifier - 1), it is possible to terminate any normal process/thread. - * See also subfunction 2 - terminate - process/thread by given slot. - -====================================================================== -======== Function 18, subfunction 19 - get/set mouse features. ======= -====================================================================== - ----------------- Subsubfunction 0 - get mouse speed. ----------------- -Parameters: - * eax = 18 - function number - * ebx = 19 - subfunction number - * ecx = 0 - subsubfunction number -Returned value: - * eax = current mouse speed - ----------------- Subsubfunction 1 - set mouse speed. ----------------- -Parameters: - * eax = 18 - function number - * ebx = 19 - subfunction number - * ecx = 1 - subsubfunction number - * edx = new value for speed -Returned value: - * function does not return value - ----------------- Subsubfunction 2 - get mouse delay. ----------------- -Parameters: - * eax = 18 - function number - * ebx = 19 - subfunction number - * ecx = 2 - subsubfunction number -Returned value: - * eax = current mouse delay - ----------------- Subsubfunction 3 - set mouse delay. ----------------- -Parameters: - * eax = 18 - function number - * ebx = 19 - subfunction number - * ecx = 3 - subsubfunction number - * edx = new value for mouse delay -Returned value: - * function does not return value - ------------ Subsubfunction 4 - set mouse pointer position. ----------- -Parameters: - * eax = 18 - function number - * ebx = 19 - subfunction number - * ecx = 4 - subsubfunction number - * edx = [coordinate on axis x]*65536 + [coordinate on axis y] -Returned value: - * function does not return value - --------- Subsubfunction 5 - simulate state of mouse buttons. --------- -Parameters: - * eax = 18 - function number - * ebx = 19 - subfunction number - * ecx = 5 - subsubfunction number - * edx = information about emulated state of mouse buttons: - (same as return value in subfunction 2 of function 37) - * bit 0 is set = left button is pressed - * bit 1 is set = right button is pressed - * bit 2 is set = middle button is pressed - * bit 3 is set = 4th button is pressed - * bit 4 is set = 5th button is pressed -Returned value: - * function does not return value -Remarks: - * It is recommended to set speed of the mouse (in subsubfunction 1) - from 1 up to 9. The installed value is not inspected by the kernel - code, so set it carefully, at incorrect value the cursor - can "freeze". Speed of the mouse can be regulated through the - application SETUP. - * Recommended delay of the mouse (in subsubfunction 3) = 10. Lower - value is not handled by COM mice. At the very large values the - movement of the mouse on 1 pixel is impossible and the cursor will - jump on the value of installed speed (subsubfunction 1). The - installed value is not inspected by the kernel code. - Mouse delay can be regulated through the application SETUP. - * The subsubfunction 4 does not check the passed value. Before - its call find out current screen resolution (with function 14) - and check that the value of position is inside the limits of the - screen. - -====================================================================== -======== Function 18, subfunction 20 - get information on RAM. ======= -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 20 - subfunction number - * ecx = pointer to the buffer for information (36 bytes) -Returned value: - * eax = total size of existing RAM in pages - or -1 if error has occured - * buffer pointed to by ecx contains the following information: - * +0: dword: total size of existing RAM in pages - * +4: dword: size of free RAM in pages - * +8: dword: number of page faults (exceptions #PF) - in applications - * +12: dword: size of kernel heap in bytes - * +16: dword: free in kernel heap in bytes - * +20: dword: total number of memory blocks in kernel heap - * +24: dword: number of free memory blocks in kernel heap - * +28: dword: size of maximum free block in kernel heap - (reserved) - * +32: dword: size of maximum allocated block in kernel heap - (reserved) - -====================================================================== -===================== Function 18, subfunction 21 ==================== -======== Get slot number of process/thread by the identifier. ======== -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 21 - subfunction number - * ecx = identifer of process/thread (PID/TID) -Returned value: - * eax = 0 - error (invalid identifier) - * otherwise eax = slot number - -====================================================================== -===================== Function 18, subfunction 22 ==================== -============== Operations with window of another thread. ============= -====================================================================== -Parameters: - * eax = 18 - function number - * ebx = 22 - subfunction number - * ecx = operation type: - * 0 = minimize window of the thread with given slot number - * 1 = minimize window of the thread with given identifier - * 2 = restore window of the thread with given slot number - * 3 = restore window of the thread with given identifier - * edx = parameter (slot number or PID/TID) -Returned value: - * eax = 0 - success - * eax = -1 - error (invalid identifier) -Remarks: - * The thread can minimize its window with subfunction 10. - * One can restore and activate window simultaneously with - subfunction 3 (which requires slot number). - -====================================================================== -==================== Function 20 - MIDI interface. =================== -====================================================================== - ------------------------ Subfunction 1 - reset ------------------------ -Parameters: - * eax = 20 - function number - * ebx = 1 - subfunction number - --------------------- Subfunction 2 - output byte --------------------- -Parameters: - * eax = 20 - function number - * ebx = 2 - subfunction number - * cl = byte for output -Returned value (is the same for both subfunctions): - * eax = 0 - success - * eax = 1 - base port is not defined -Remarks: - * Previously the base port must be defined by - subfunction 1 of function 21. - -====================================================================== -======== Function 21, subfunction 1 - set MPU MIDI base port. ======== -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 1 - subfunction number - * ecx = number of base port -Returned value - * eax = 0 - success - * eax = -1 - erratic number of a port -Remarks: - * Number of a port must satisfy to conditions 0x100<=ecx<=0xFFFF. - * The installation of base is necessary for function 20. - * To get base port use subfunction 1 of function 26. - -====================================================================== -========== Function 21, subfunction 2 - set keyboard layout. ========= -====================================================================== -Keyboard layout is used to convert keyboard scancodes to ASCII-codes, -which will be read by function 2. -Parameters: - * eax = 21 - function number - * ebx = 2 - subfunction number - * ecx = which layout to set: - * 1 = normal layout - * 2 = layout at pressed Shift - * 3 = layout at pressed Alt - * edx = pointer to layout - table of length 128 bytes -Or: - * ecx = 9 - * dx = country identifier (1=eng, 2=fi, 3=ger, 4=rus) -Returned value: - * eax = 0 - success - * eax = 1 - incorrect parameter -Remarks: - * If Alt is pressed, the layout with Alt is used; - if Alt is not pressed, but Shift is pressed, - the layout with Shift is used; - if Alt and Shift are not pressed, but Ctrl is pressed, the normal - layout is used and then from the code is subtracted 0x60; - if no control key is pressed, the normal layout is used. - * To get layout and country identifier use - subfunction 2 of function 26. - * Country identifier is global system variable, which is not used - by the kernel itself; however the application '@panel' displays - the corresponding icon. - * The application @panel switches layouts on user request. - -====================================================================== -============== Function 21, subfunction 3 - set CD base. ============= -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 3 - subfunction number - * ecx = CD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -Returned value: - * eax = 0 -Remarks: - * CD base is used by function 24. - * To get CD base use subfunction 3 of function 26. - -====================================================================== -========== Function 21, subfunction 5 - set system language. ========= -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 5 - subfunction number - * ecx = system language (1=eng, 2=fi, 3=ger, 4=rus) -Returned value: - * eax = 0 -Remarks: - * System language is global system variable and is not used - by the kernel itself, however application @panel draws the - appropriate icon. - * Function does not check for correctness, as the kernel does not - use this variable. - * To get system language use subfunction 5 of function 26. - -====================================================================== -============== Function 21, subfunction 7 - set HD base. ============= -====================================================================== -The HD base defines hard disk to write with usage of obsolete -syntax /HD in obsolete function 58; at usage of modern syntax -/HD0,/HD1,/HD2,/HD3 base is set automatically. -Parameters: - * eax = 21 - function number - * ebx = 7 - subfunction number - * ecx = HD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -Returned value: - * eax = 0 -Remarks: - * Any application at any time can change the base. - * Do not change base, when any application works with hard disk. - If you do not want system bugs. - * To get HD base use subfunction 7 of function 26. - * It is also necessary to define used partition of hard disk by - subfunction 8. - -====================================================================== -========= Function 21, subfunction 8 - set used HD partition. ======== -====================================================================== -The HD partition defines partition of the hard disk to write with -usage of obsolete syntax /HD and obsolete function 58; -at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3 -base and partition are set automatically. -Parameters: - * eax = 21 - function number - * ebx = 8 - subfunction number - * ecx = HD partition (beginning from 1) -Return value: - * eax = 0 -Remarks: - * Any application at any time can change partition. - * Do not change partition when any application works with hard disk. - If you do not want system bugs. - * To get used partition use subfunction 8 of function 26. - * There is no correctness checks. - * To get the number of partitions of a hard disk use - subfunction 11 of function 18. - * It is also necessary to define used HD base by subfunction 7. - -====================================================================== - Function 21, subfunction 11 - enable/disable low-level access to HD. -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 11 - subfunction number - * ecx = 0/1 - disable/enable -Returned value: - * eax = 0 -Remarks: - * Is used in LBA-read (subfunction 8 of function 58). - * The current implementation uses only low bit of ecx. - * To get current status use subfunction 11 of function 26. - -====================================================================== - Function 21, subfunction 12 - enable/disable low-level access to PCI. -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 12 - subfunction number - * ecx = 0/1 - disable/enable -Returned value: - * eax = 0 -Remarks: - * Is used in operations with PCI bus (function 62). - * The current implementation uses only low bit of ecx. - * To get current status use subfunction 12 of function 26. - -====================================================================== -============ Function 21, subfunction 13, subsubfunction 1 =========== -======== Initialize + get information on the driver vmode.mdr. ======= -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 13 - subfunction number - * ecx = 1 - number of the driver function - * edx = pointer to 512-bytes buffer -Returned value: - * if driver is not loaded - (never happens in the current implementation): - * eax = -1 - * ebx, ecx destroyed - * if driver is loaded: - * eax = 'MDAZ' (in fasm style, that is 'M' - low byte, 'Z' - high) - - signature - * ebx = current frequency of the scanning (in Hz) - * ecx destroyed - * buffer pointed to by edx is filled -Format of the buffer: - * +0: 32*byte: driver name, "Trans VideoDriver" - (without quotes, supplemented by spaces) - * +32 = +0x20: dword: driver version (version x.y is encoded as - y*65536+x), for the current implementation is 1 (1.0) - * +36 = +0x24: 7*dword: reserved (0 in the current implementation) - * +64 = +0x40: 32*word: list of supported videomodes (each word - is number of a videomode, after list itself there are zeroes) - * +128 = +0x80: 32*(5*word): list of supported frequences of the - scannings for videomodes: for each videomode listed in the - previous field up to 5 supported frequences are given - (unused positions contain zeroes) -Remarks: - * Function initializes the driver (if it is not initialized yet) - and must be called first, before others (otherwise they will do - nothing and return -1). - * The current implementation supports only one frequency - of the scanning on videomode. - -====================================================================== -============ Function 21, subfunction 13, subsubfunction 2 =========== -================ Get information on current videomode. =============== -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 13 - subfunction number - * ecx = 2 - number of the driver function -Returned value: - * eax = -1 - driver is not loaded or not initialized; - ebx,ecx are destroyed - * eax = [width]*65536 + [height] - * ebx = frequency of the vertical scanning (in Hz) - * ecx = number of current videomode -Remarks: - * Driver must be initialized by call to - driver function 1. - * If only screen sizes are required, it is more expedient to use - function 14 taking into account that it - returns sizes on 1 less. - -====================================================================== -=== Function 21, subfunction 13, subsubfunction 3 - set videomode. === -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 13 - subfunction number - * ecx = 3 - number of the driver function - * edx = [scanning frequency]*65536 + [videomode number] -Returned value: - * eax = -1 - driver is not loaded, not initialized or - an error has occured - * eax = 0 - success - * ebx, ecx destroyed -Remarks: - * Driver must be initialized by driver function 1. - * The videomode number and frequency must be in the table - returned by driver function 1. - -====================================================================== -============ Function 21, subfunction 13, subsubfunction 4 =========== -================== Return to the initial videomode. ================== -====================================================================== -Returns the screen to the videomode set at system boot. -Parameters: - * eax = 21 - function number - * ebx = 13 - subfunction number - * ecx = 4 - number of the driver function -Returned value: - * eax = -1 - driver is not loaded or not initialized - * eax = 0 - success - * ebx, ecx destroyed -Remarks: - * Driver must be initialized by call to driver function 1. - -====================================================================== -============ Function 21, subfunction 13, subsubfunction 5 =========== -===== Increase/decrease the size of the visible area of monitor. ===== -====================================================================== -Parameters: - * eax = 21 - function number - * ebx = 13 - subfunction number - * ecx = 5 - number of the driver function - * edx = 0/1 - decrease/increase horizontal size on 1 position - * edx = 2/3 - is not supported in the current implementation; - is planned as decrease/increase vertical size on 1 position -Returned value: - * eax = -1 - driver is not loaded or not initialized - * eax = 0 - success - * ebx, ecx destroyed -Remarks: - * Driver must be initialized by call to driver function 1. - * Function influences only the physical size of the screen image; - the logical size (number of pixels) does not change. - -====================================================================== -================= Function 22 - set system date/time. ================ -====================================================================== -Parameters: - * eax = 22 - function number - * ebx = 0 - set time - * ecx = 0x00SSMMHH - time in the binary-decimal code (BCD): - * HH=hour 00..23 - * MM=minute 00..59 - * SS=second 00..59 - * ebx = 1 - set date - * ecx = 0x00DDMMYY - date in the binary-decimal code (BCD): - * DD=day 01..31 - * MM=month 01..12 - * YY=year 00..99 - * ebx = 2 - set day of week - * ecx = 1 for Sunday, ..., 7 for Saturday - * ebx = 3 - set alarm clock - * ecx = 0x00SSMMHH -Returned value: - * eax = 0 - success - * eax = 1 - incorrect parameter - * eax = 2 - CMOS-battery was unloaded -Remarks: - * Value of installation of day of week seems to be doubtful, - as it a little where is used - (day of week can be calculated by date). - * Alarm clock can be set on operation in the given time every day. - But there is no existing system function to disable it. - * Operation of alarm clock consists in generation IRQ8. - * Generally CMOS supports for alarm clock set of value 0xFF - as one of parameters and it means that the appropriate parameter - is ignored. But current implementation does not allow this - (will return 1). - * Alarm clock is a global system resource; the set of - an alarm clock cancels automatically the previous set. - However, at moment no program uses it. - -====================================================================== -============= Function 23 - wait for event with timeout. ============= -====================================================================== -If the message queue is empty, waits for new message in the queue, -but no more than given time. Then reads out a message from the queue. - -Parameters: - * eax = 23 - function number - * ebx = timeout (in 1/100 of second) -Returned value: - * eax = 0 - the message queue is empty - * otherwise eax = event (see the list of events) -Remarks: - * Only those events are taken into account, which enter into - the mask set by function 40. By default it is - redraw, key and button events. - * To check for presence of a message in the queue use function 11. - To wait without timeout use function 10. - * Transmission ebx=0 results in immediate returning eax=0. - * Current implementation returns immediately with eax=0, - if the addition of ebx with the current value of time counter - makes 32-bit overflow. - -====================================================================== -======== Function 24, subfunction 1 - begin to play CD-audio. ======== -====================================================================== -Parameters: - * eax = 24 - function number - * ebx = 1 - subfunction number - * ecx = 0x00FRSSMM, where - * MM = starting minute - * SS = starting second - * FR = starting frame -Returned value: - * eax = 0 - success - * eax = 1 - CD base is not defined -Remarks: - * Previously CD base must be defined by the call to - subfunction 3 of function 21. - * One second includes 75 frames, one minute includes 60 seconds. - * The function is asynchronous (returns control, when play begins). - -====================================================================== -======= Function 24, subfunction 2 - get information on tracks. ====== -====================================================================== -Parameters: - * eax = 24 - function number - * ebx = 2 - subfunction number - * ecx = pointer to the buffer for the table - (maximum 8*64h+4 bytes=100 tracks) -Returned value: - * eax = 0 - success - * eax = 1 - CD base is not defined -Remarks: - * The format of the table with tracks information is the same as - for ATAPI-CD command 43h (READ TOC), usual table (subcommand 00h). - Function returns addresses in MSF. - * Previously CD base port must be set by call to - subfunction 3 of function 21. - * Function returns information only about no more than 100 - first tracks. In most cases it is enough. - -====================================================================== -========== Function 24, subfunction 3 - stop play CD-audio. ========== -====================================================================== -Parameters: - * eax = 24 - function number - * ebx = 1 - subfunction number -Returned value: - * eax = 0 - success - * eax = 1 - CD base is not defined -Remarks: - * Previously CD base port must be defined by call to - subfunction 3 of function 21. - -====================================================================== -======= Function 24, subfunction 4 - eject tray of disk drive. ======= -====================================================================== -Parameters: - * eax = 24 - function number - * ebx = 4 - subfunction number - * ecx = position of CD/DVD-drive - (from 0=Primary Master to 3=Secondary Slave) -Returned value: - * function does not return value -Remarks: - * The function is supported only for ATAPI devices (CD and DVD). - * When the tray is being ejected, - manual control of tray is unlocked. - * When the tray is being ejected, the code clears the cache for - corresponding device. - * An example of usage of the function is the application CD_tray. - -====================================================================== -======== Function 24, subfunction 5 - load tray of disk drive. ======= -====================================================================== -Parameters: - * eax = 24 - function number - * ebx = 5 - subfunction number - * ecx = position of CD/DVD-drive - (from 0=Primary Master to 3=Secondary Slave) -Returned value: - * function does not return value -Remarks: - * The function is supported only for ATAPI devices (CD and DVD). - * An example of usage of the function is the application CD_tray. - -====================================================================== -======== Function 26, subfunction 1 - get MPU MIDI base port. ======== -====================================================================== -Parameters: - * eax = 26 - function number - * ebx = 1 - subfunction number -Returned value: - * eax = port number -Parameters: - * To set base port use subfunction 1 of function 21. - -====================================================================== -========== Function 26, subfunction 2 - get keyboard layout. ========= -====================================================================== -The keyboard layout is used to convert keyboard scancodes to -ASCII-codes for function 2. -Parameters: - * eax = 26 - function number - * ebx = 2 - subfunction number - * ecx = what layout to get: - * 1 = normal layout - * 2 = layout with pressed Shift - * 3 = layout with pressed Alt - * edx = pointer to the 128-bytes buffer, where the layout will be - copied -Returned value: - * function does not return value -Or: - * eax = 26 - function number - * ebx = 2 - subfunction number - * ecx = 9 -Returned value: - * eax = country identifier (1=eng, 2=fi, 3=ger, 4=rus) -Remarks: - * If Alt is pressed, the layout with Alt is used; - if Alt is not pressed, but Shift is pressed, - the layout with Shift is used; - if Alt and Shift are not pressed, but Ctrl is pressed, the normal - layout is used and then from the code is subtracted 0x60; - if no control key is pressed, the normal layout is used. - * To set layout and country identifier use - subfunction 2 of function 21. - * Country identifier is global system variable, which is not used - by the kernel itself; however the application '@panel' displays - the corresponding icon (using this function). - * The application @panel switches layouts on user request. - -====================================================================== -============== Function 26, subfunction 3 - get CD base. ============= -====================================================================== -Parameters: - * eax = 26 - function number - * ebx = 3 - subfunction number -Returned value: - * eax = CD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -Remarks: - * CD base is used by function 24. - * To set CD base use subfunction 3 of function 21. - -====================================================================== -========== Function 26, subfunction 5 - get system language. ========= -====================================================================== -Parameters: - * eax = 26 - function number - * ebx = 5 - subfunction number -Returned value: - * eax = system language (1=eng, 2=fi, 3=ger, 4=rus) -Remarks: - * System language is global system variable and is not used - by the kernel itself, however application @panel draws the - appropriate icon (using this function). - * To set system language use subfunction 5 of function 21. - -====================================================================== -============== Function 26, subfunction 7 - get HD base. ============= -====================================================================== -The HD base defines hard disk to write with usage of obsolete -syntax /HD in obsolete function 58; at usage of modern syntax -/HD0,/HD1,/HD2,/HD3 base is set automatically. -Parameters: - * eax = 26 - function number - * ebx = 7 - subfunction number -Returned value: - * eax = HD base: 1=IDE0, 2=IDE1, 3=IDE2, 4=IDE3 -Remarks: - * Any application in any time can change HD base. - * To set base use subfunction 7 of function 21. - * To get used partition of hard disk use subfunction 8. - -====================================================================== -========= Function 26, subfunction 8 - get used HD partition. ======== -====================================================================== -The HD partition defines partition of the hard disk to write with -usage of obsolete syntax /HD in obsolete function 58; -at usage of functions 58 and 70 and modern syntax /HD0,/HD1,/HD2,/HD3 -base and partition are set automatically. -Parameters: - * eax = 26 - function number - * ebx = 8 - subfunction number -Returned value: - * eax = HD partition (beginning from 1) -Remarks: - * Any application in any time can change partition. - * To set partition use subfunction 8 of function 21. - * To get number of partitions on a hard disk use - subfunction 11 of function 18. - * To get base of used hard disk, use subfunction 7. - -====================================================================== -=== Function 26, subfunction 9 - get the value of the time counter. == -====================================================================== -Parameters: - * eax = 26 - function number - * ebx = 9 - subfunction number -Returned value: - * eax = number of 1/100s of second, past from the system boot time -Remarks: - * Counter takes modulo 2^32, that correspond to a little more - than 497 days. - * To get system time use function 3. - -====================================================================== -===================== Function 26, subfunction 11 ==================== -========== Find out whether low-level HD access is enabled. ========== -====================================================================== -Parameters: - * eax = 26 - function number - * ebx = 11 - subfunction number -Returned value: - * eax = 0/1 - disabled/enabled -Remarks: - * Is used in LBA read (subfunction 8 of function 58). - * To set current state use subfunction 11 of function 21. - -====================================================================== -===================== Function 26, subfunction 12 ==================== -========== Find out whether low-level PCI access is enabled. ========= -====================================================================== -Parameters: - * eax = 26 - function number - * ebx = 12 - subfunction number -Returned value: - * eax = 0/1 - disabled/enabled -Remarks: - * Is used by operations with PCI bus (function 62). - * The current implementation uses only low bit of ecx. - * To set the current state use subfunction 12 of function 21. - -====================================================================== -=================== Function 29 - get system date. =================== -====================================================================== -Parameters: - * eax = 29 - function number -Returned value: - * eax = 0x00DDMMYY, where - (binary-decimal coding, BCD, is used) - * YY = two low digits of year (00..99) - * MM = month (01..12) - * DD = day (01..31) -Remarks: - * To set system date use function 22. - -====================================================================== -============= Function 30 - work with the current folder. ============ -====================================================================== - ---------- Subfunction 1 - set current folder for the thread. --------- -Parameters: - * eax = 30 - function number - * ebx = 1 - subfunction number - * ecx = pointer to ASCIIZ-string with the path to new current folder -Returned value: - * function does not return value - ---------- Subfunction 2 - get current folder for the thread. --------- -Parameters: - * eax = 30 - function number - * ebx = 2 - subfunction number - * ecx = pointer to buffer - * edx = size of buffer -Returned value: - * eax = size of the current folder's name (including terminating 0) -Remarks: - * If the buffer is too small to hold all data, only first (edx-1) - bytes are copied and than terminating 0 is inserted. - -====================================================================== -=============== Function 32 - delete file from ramdisk. ============== -====================================================================== -Parameters: - * eax = 32 - function number - * ebx = pointer to the filename -Returned value: - * eax = 0 - success; otherwise file system error code -Remarks: - * This function is obsolete; function 58 allows to fulfill - the same operations with the extended possibilities. - * The current implementation returns only values 0(success) and - 5(file not found). - * The filename must be either in the format 8+3 characters - (first 8 characters - name itself, last 3 - extension, - the short names and extensions are supplemented with spaces), - or in the format 8.3 characters "FILE.EXT"/"FILE.EX " - (name no more than 8 characters, dot, extension 3 characters - supplemented if necessary by spaces). - The filename must be written with capital letters. The terminating - character with code 0 is not necessary (not ASCIIZ-string). - * This function does not support folders on the ramdisk. - -====================================================================== -================ Function 33 - write file to ramdisk. ================ -====================================================================== -Parameters: - * eax = 33 - function number - * ebx = pointer to the filename - * ecx = pointer to data for writing - * edx = number of bytes for writing - * should be set esi=0 -Returned value: - * eax = 0 - success, otherwise file system error code -Remarks: - * This function is obsolete; function 70 allows to fulfil - the same operations with extended possibilities. - * If esi contains non-zero value and selected file already exists, - one more file with the same name will be created. - * Otherwise file will be overwritten. - * The filename must be either in the format 8+3 characters - (first 8 characters - name itself, last 3 - extension, - the short names and extensions are supplemented with spaces), - or in the format 8.3 characters "FILE.EXT"/"FILE.EX " - (name no more than 8 characters, dot, extension 3 characters - supplemented if necessary by spaces). - The filename must be written with capital letters. The terminating - character with code 0 is not necessary (not ASCIIZ-string). - * This function does not support folders on the ramdisk. - -====================================================================== -======= Function 35 - read the color of a pixel on the screen. ======= -====================================================================== -Parameters: - * eax = 35 - * ebx = y*xsize+x, where - * (x,y) = coordinates of a pixel (beginning from 0) - * xsize = horizontal screen size -Returned value: - * eax = color 0x00RRGGBB -Remarks: - * To get screen sizes use function 14. Pay attention, - that it subtracts 1 from both sizes. - * There is also direct access (without any system calls) - to videomemory through the selector gs. To get parameters of - the current videomode, use function 61. - -====================================================================== -=================== Function 36 - read screen area. ================== -====================================================================== -Paramters: - * eax = 36 - function number - * ebx = pointer to the previously allocated memory area, - where will be placed the image in the format BBGGRRBBGGRR... - * ecx = [size on axis x]*65536 + [size on axis y] - * edx = [coordinate on axis x]*65536 + [coordinate on axis y] -Returned value: - * function does not return value -Remarks: - * Coordinates of the image are coordinates of the upper left corner - of the image relative to the screen. - * Size of the image in bytes is 3*xsize*ysize. - -====================================================================== -=================== Function 37 - work with mouse. =================== -====================================================================== - ----------- Subfunction 0 - screen coordinates of the mouse ----------- -Parameters: - * eax = 37 - function number - * ebx = 0 - subfunction number -Returned value: - * eax = x*65536 + y, (x,y)=coordinates of the mouse pointer - (beginning from 0) - --- Subfunction 1 - coordinates of the mouse relative to the window --- -Parameters: - * eax = 37 - function number - * ebx = 1 - subfunction number -Returned value: - * eax = x*65536 + y, (x,y)=coordinates of the mouse pointer - relative to the application window (beginning from 0) -Remarks: - * The value is calculated by formula (x-xwnd)*65536 + (y-ywnd). - If y>=ywnd, the low word is non-negative and contains - relative y-coordinate, and the high word - relative x-coordinate - (with correct sign). Otherwise the low word is negative and still - contains relative y-coordinate, and to the high word - 1 should be added. - ------------- Subfunction 2 - pressed buttons of the mouse ------------ -Parameters: - * eax = 37 - function number - * ebx = 2 - subfunction number -Returned value: - * eax contains information on the pressed mouse buttons: - * bit 0 is set = left button is pressed - * bit 1 is set = right button is pressed - * bit 2 is set = middle button is pressed - * bit 3 is set = 4th button is pressed - * bit 4 is set = 5th button is pressed - * other bits are cleared - --------------------- Subfunction 4 - load cursor --------------------- -Parameters: - * eax = 37 - function number - * ebx = 4 - subfunction number - * dx = data source: - * dx = LOAD_FROM_FILE = 0 - data in a file - * ecx = pointer to full path to the cursor file - * the file must be in the format .cur, which is standard for - MS Windows, at that of the size 32*32 pixels - * dx = LOAD_FROM_MEM = 1 - data of file are already loaded in memory - * ecx = pointer to data of the cursor file - * the data format is the same as in the previous case - * dx = LOAD_INDIRECT = 2 - data in memory - * ecx = pointer to cursor image in the format ARGB 32*32 pixels - * edx = 0xXXYY0002, where - * XX = x-coordinate of cursor hotspot - * YY = y-coordinate - * 0 <= XX, YY <= 31 -Returned value: - * eax = 0 - failed - * otherwise eax = cursor handle - ---------------------- Subfunction 5 - set cursor --------------------- -Sets new cursor for the window of the current thread. -Parameters: - * eax = 37 - function number - * ebx = 5 - subfunction number - * ecx = cursor handle -Returned value: - * eax = handle of previous cursor -Remarks: - * If the handle is incorrect, the function restores the default - cursor (standard arrow). In particular, ecx=0 restores it. - -------------------- Subfunction 6 - delete cursor -------------------- -Parameters: - * eax = 37 - function number - * ebx = 6 - subfunction number - * ecx = cursor handle -Returned value: - * eax destroyed -Remarks: - * The cursor must be loaded previously by the current thread - (with the call to subfunction 4). The function does not delete - system cursors and cursors, loaded by another applications. - * If the active cursor (set by subfunction 5) is deleted, - the system restores the default cursor (standard arrow). - ------------------- Subfunction 7 - get scroll data ------------------- -Parameters: - * eax = 37 - function number - * ebx = 7 - subfunction number -Returned value: - * eax = [horizontal offset]*65536 + [vertical offset] -Remarks: - * Scroll data is available for active window only. - * Values are zeroed after reading. - * Values are signed. - -====================================================================== -====================== Function 38 - draw line. ====================== -====================================================================== -Parameters: - * eax = 38 - function number - * ebx = [start coordinate on axis x]*65536 + - [end coordinate on axis x] - * ecx = [start coordinate on axis y]*65536 + - [end coordinate on axis y] - * edx = 0x00RRGGBB - color - edx = 0x01xxxxxx - draw inversed line - (low 24 bits are ignored) -Returned value: - * function does not return value -Remarks: - * Coordinates are relative to the window. - * End point is also drawn. - -====================================================================== -== Function 39, subfunction 1 - get a size of the background image. == -====================================================================== -Parameters: - * eax = 39 - function number - * ebx = 1 - subfunction number -Returned value: - * eax = [width]*65536 + [height] -Remarks: - * There is a pair function to set sizes of background image - - subfunction 1 of function 15. After which it is necessary, - of course, anew to define image. - -====================================================================== -== Function 39, subfunction 2 - get pixel from the background image. = -====================================================================== -Parameters: - * eax = 39 - function number - * ebx = 2 - subfunction number - * ecx = offset -Returned value: - * eax = 0x00RRGGBB - pixel color, if offset is valid - (less than 0x160000-16) - * eax = 2 otherwise -Remarks: - * Do not rely on returned value for invalid offsets, it may be - changed in future kernel versions. - * Offset for pixel with coordinates (x,y) - is calculated as (x+y*xsize)*3. - * There is a pair function to set pixel on the background image - - subfunction 2 of function 15. - -====================================================================== -== Function 39, subfunction 4 - get drawing mode for the background. = -====================================================================== -Parameters: - * eax = 39 - function number - * ebx = 4 - subfunction number -Returned value: - * eax = 1 - tile - * eax = 2 - stretch -Remarks: - * There is a pair function to set drawing mode - - subfunction 4 of function 15. - -====================================================================== -=========== Function 40 - set the mask for expected events. ========== -====================================================================== -The mask for expected events affects function working with events -10, 11, 23 - they notify only about events allowed by this mask. -Parameters: - * eax = 40 - function number - * ebx = mask: bit i corresponds to event i+1 (see list of events) - (set bit permits notice on event) -Returned value: - * function does not return value -Remarks: - * Default mask (7=111b) enables nofices about redraw, - keys and buttons. This is enough for many applications. - * Events prohibited in the mask are saved anyway, when come; - they are simply not informed with event functions. - * Event functions take into account the mask on moment of - function call, not on moment of event arrival. - -====================================================================== -==================== Function 41 - get IRQ owner. ==================== -====================================================================== -Parameters: - * eax = 41 - function number - * ebx = IRQ number, 0..15 -Returned value: - * eax = owner PID - * eax = 0, if there is no owner - * eax = -1 for incorrect ebx - -====================================================================== -================== Function 42 - work with IRQ data. ================= -====================================================================== -When an IRQ occurs, the system reads data from ports indicated -earlier by function 44 and writes this data to -internal buffer. This function reads out data from that buffer. - ---------------------- Subfunction 0 - read data ---------------------- -Parameters: - * eax = 42 - function number - * bl = IRQ number, 0..15 - * bh = 0 - subfunction number - * rest of ebx must be zeroed - * ecx = pointer to a buffer with size not less than 4000 bytes -Returned value: (use value of eax to distinguish) - * if the thread is not IRQ owner - (or IRQ number is incorrect): eax = -1 - * if there is no data: eax = 0 - * if all is ok: - eax = size of data read (in bytes) - -------------- Subfunction 1 - get size of data in buffer ------------- -Parameters: - * eax = 42 - function number - * bl = IRQ number, 0..15 - * bh = 0 - subfunction number - * rest of ebx must be zeroed -Returned value: - * if the thread is not IRQ owner - (or IRQ number is incorrect): eax = -1 - * otherwise eax = size of data in buffer -Remarks: - * Previously the thread must reserve indicated IRQ for itself - by function 45. - * The size of data buffer is 4000 bytes, on overflow - "fresh" data cease to be written in the buffer. - -====================================================================== -================ Function 43 - input/output to a port. =============== -====================================================================== - ------------------------- Output data to port ------------------------- -Parameters: - * eax = 43 - function number - * bl = byte for output - * ecx = port number 0xnnnn (from 0 to 0xFFFF) -Returned value: - * eax = 0 - success - * eax = 1 - the thread has not reserved the selected port - ------------------------- Input data from port ------------------------ -Parameters: - * eax = 43 - function number - * ebx is ignored - * ecx = 0x8000nnnn, where nnnn = port number (from 0 to 0xFFFF) -Returned value: - * eax = 0 - success, thus ebx = entered byte - * eax = 1 - the thread has not reserved the selected port -Remarks: - * Previously the thread must reserve the selected port - for itself by function 46. - * Instead of call to this function it is better to use - processor instructions in/out - this is much - faster and a bit shorter and easier. - -====================================================================== -=========== Function 44 - define operations at IRQ arrival. ========== -====================================================================== -At IRQ arrival the system can read the data from ports defined -by this function and write these data to internal buffer, whence -they can be read by функцией 42. -Parameters: - * eax = 44 - function number - * ebx = pointer to the array of structures each describing one port: - * +0: word: 0 means end of array, otherwise port number - * +2: byte: reserved (ignored) - * +3: byte: 1=read byte from this port, 2=read word - * ecx = IRQ number, 0..15 -Returned value: - * eax = 0 - success - * eax = 1 - the thread is not owner of selected IRQ -Remarks: - * Previously the thread must reserve for itself selected IRQ - by function 45. - * First 16 ports are considered only. - * The current implementation considers incorrect value of field +3 - as a signal to terminate IRQ processing. - -====================================================================== -=================== Function 45 - reserve/free IRQ. ================== -====================================================================== -Parameters: - * eax = 45 - function number - * ebx = 0 - reserve, 1 = free - * ecx = IRQ number, 0..15 -Returned value: - * eax = 0 - success - * eax = 1 - error (invalid IRQ number - or attempt to reserve not free IRQ - or to free IRQ, not reserved by this thread) -Remarks: - * IRQ reservation is required for functions 42 and 44. - * Only one thread can reserve the specific IRQ. - * IRQs, handled by the system itself, are reserved by the system - (thread 1) at booting. - * When a thread terminates, all reserved by it IRQs - are freed automatically. - -====================================================================== -====== Function 46 - reserve/free a group of input/output ports. ===== -====================================================================== -To work with reserved ports an application can access directly by -commands in/out (recommended way) and can use function 43 -(not recommended way). -Parameters: - * eax = 46 - function number - * ebx = 0 - reserve, 1 - free - * ecx = start port number - * edx = end port number (inclusive) -Returned value: - * eax = 0 - success - * eax = 1 - error -Remarks: - * For ports reservation: an error occurs if and only if - one from the following condition satisfies: - * start port is more than end port; - * the selected range contains incorrect port number - (correct are from 0 to 0xFFFF); - * limit for the total number of reserved areas is exceeded - (maximum 255 are allowed); - * the selected range intersects with any of earlier reserved - * For ports free: an error is an attempt to free range, - that was not earlier reserved by this function - (with same ecx,edx). - * If an error occurs (for both cases) function performs no action. - * At booting the system reserves for itself ports - 0..0x2d, 0x30..0x4d, 0x50..0xdf, 0xe5..0xff (inclusively). - * When a thread terminates, all reserved by it ports - are freed automatically. - -====================================================================== -============= Function 47 - draw a number in the window. ============= -====================================================================== -Parameters: - * eax = 47 - function number - * ebx = parameters of conversion number to text: - * bl = 0 - ecx contains number - * bl = 1 - ecx contains pointer to dword/qword-number - * bh = 0 - display in decimal number system - * bh = 1 - display in hexadecimal system - * bh = 2 - display in binary system - * bits 16-21 = how many digits to display - * bits 22-29 reserved and must be set to 0 - * bit 30 set = display qword (64-bit) number (must be bl=1) - * bit 31 set = do not display leading zeroes of the number - * ecx = number (if bl=0) or pointer (if bl=1) - * edx = [coordinate on axis x]*65536 + [coordinate on axis y] - * esi = 0xX0RRGGBB: - * RR, GG, BB specify the color - * X = ABnn (bits) - * nn = font (0/1) - * A is ignored - * B=1 - fill background with the color edi -Returned value: - * function does not return value -Remarks: - * The given length must not exceed 60. - * The exactly given amount of digits is output. If number is small - and can be written by smaller amount of digits, it is supplemented - by leading zeroes; if the number is big and can not be written by - given amount of digits, extra digits are not drawn. - * Parameters of fonts are shown in the description of function 4 - (text output). - -====================================================================== -========= Function 48, subfunction 0 - apply screen settings. ======== -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 0 - subfunction number - * ecx = 0 - reserved -Returned value: - * function does not return value -Remarks: - * Function redraws the screen after parameters change by - subfunctions 1 and 2. - * Function call without prior call to one of indicated subfunctions - is ignored. - * Function call with nonzero ecx is ignored. - -====================================================================== -=========== Function 48, subfunction 1 - set button style. =========== -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 1 - subfunction number - * ecx = button style: - * 0 = flat - * 1 = 3d -Returned value: - * function does not return value -Remarks: - * After call to this function one should redraw the screen by - subfunction 0. - * Button style influences only to their draw of function 8. - -====================================================================== -====== Function 48, subfunction 2 - set standard window colors. ====== -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 2 - subfunction number - * ecx = pointer to the color table - * edx = size of the color table - (must be 40 bytes for future compatibility) -Format of the color table is shown in description of subfunction 3. -Returned value: - * function does not return value -Remarks: - * After call to this function one should redraw the screen by - subfunction 0. - * Table of standard colors influences only to applications, - which receive this table obviously (by subfunction 3) - and use it (specifying colors from it to drawing functions). - * Table of standard colors is included in skin and is installed - anew with skin installation (by subfunction 8). - * Color table can be viewed/changed interactively with - the application 'desktop'. - -====================================================================== -====== Function 48, subfunction 3 - get standard window colors. ====== -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 3 - subfunction number - * ecx = pointer to the buffer with size edx bytes, - where table will be written - * edx = size of color table - (must be 40 bytes for future compatibility) -Returned value: - * function does not return value -Format of the color table: -each item is dword-value for color 0x00RRGGBB - * +0: dword: frames - color of frame - * +4: dword: grab - color of header - * +8: dword: grab_button - color of button on header bar - * +12 = +0xC: dword: grab_button_text - color of text on button - on header bar - * +16 = +0x10: dword: grab_text - color of text on header - * +20 = +0x14: dword: work - color of working area - * +24 = +0x18: dword: work_button - color of button in working area - * +28 = +0x1C: dword: work_button_text - color of text on button - in working area - * +32 = +0x20: dword: work_text - color of text in working area - * +36 = +0x24: dword: work_graph - color of graphics in working area -Remarks: - * Structure of the color table is described in the standard - include file 'macros.inc' as 'system_colors'; for example, - it is possible to write: - sc system_colors ; variable declaration - ... ; somewhere one must call - ; this function with ecx=sc - mov ecx, [sc.work_button_text] ; read text color on - ; buttin in working area - * A program itself desides to use or not to use color table. - For usage program must simply at calls to drawing functions select - color taken from the table. - * At change of the table of standard colors (by subfunction 2 with - the subsequent application of changes by subfunction 0 or - at skin set by subfunction 8) the system sends to all windows - redraw message (the event with code 1). - * Color table can be viewed/changed interactively with - the application 'desktop'. - -====================================================================== -============ Function 48, subfunction 4 - get skin height. =========== -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 4 - subfunction number -Returned value: - * eax = skin height -Remarks: - * Skin height is defined as the height of a header - of skinned windows. - * See also general structure of window in the description - of function 0. - -====================================================================== -======== Function 48, subfunction 5 - get screen working area. ======= -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 5 - subfunction number -Returned value: - * eax = [left]*65536 + [right] - * ebx = [top]*65536 + [bottom] -Remarks: - * The screen working area defines position and coordinates of - a maximized window. - * The screen working area in view of normal work is all screen - without system panel (the application '@panel'). - * (left,top) are coordinates of the left upper corner, - (right,bottom) are coordinates of the right lower one. - Thus the size of working area on x axis can be calculated by - formula right-left+1, on y axis - by formula bottom-right+1. - * See also function 14, - to get sizes of all screen. - * There is a pair function to set working area - subfunction 6. - -====================================================================== -======== Function 48, subfunction 6 - set screen working area. ======= -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 6 - subfunction number - * ecx = [left]*65536 + [right] - * edx = [top]*65536 + [bottom] -Returned value: - * function does not return value -Remarks: - * The screen working area defines position and coordinates of - a maximized window. - * This function is used only by the application '@panel', - which set working area to all screen without system panel. - * (left,top) are coordinates of the left upper corner, - (right,bottom) are coordinates of the right lower one. - Thus the size of working area on x axis can be calculated by - formula right-left+1, on y axis - by formula bottom-right+1. - * If 'left'>='right', x-coordinate of working area is not changed. - If 'left'<0, 'left' will not be set. If 'right' is greater than or - equal to screen width, 'right' will not be set. - Similarly on y axis. - * See also function 14, - to get sizes of all screen. - * There is a pair function to get working area - subfunction 5. - * This function redraws the screen automatically, - updating coordinates and sizes of maximized windows. - The system sends to all windows redraw message (the event 1). - -====================================================================== -=========== Function 48, subfunction 7 - get skin margins. =========== -====================================================================== -Returns the area of a header of a skinned window, intended for -a text of a header. -Parameters: - * eax = 48 - function number - * ebx = 7 - subfunction number -Returned value: - * eax = [left]*65536 + [right] - * ebx = [top]*65536 + [bottom] -Remarks: - * An application decides itself to use or not to use this function. - * It is recommended to take into account returned value - of this function for choice of a place for drawing header text - (by function 4) or a substitute of header text - (at the discretion of an application). - -====================================================================== -============= Function 48, subfunction 8 - set used skin. ============ -====================================================================== -Parameters: - * eax = 48 - function number - * ebx = 8 - subfunction number - * ecx = pointer to a block for function 58, in - which the fields of intermediate buffer and file name are filled -Returned value: - * eax = 0 - success - * otherwise eax = file system error code; if file does not - contain valid skin, function returns error 3 - (unknown file system). -Remarks: - * After successful skin loading the system sends to all windows - redraw message (the event 1). - * At booting the system reads skin from file 'default.skn' - on ramdisk. - * User can change the skin statically by creating hisself - 'default.skn' or dynamically with the application 'desktop'. - -====================================================================== -=========== Function 49 - Advanced Power Management (APM). =========== -====================================================================== -Parameters: - * eax = 49 - function number - * dx = number of the APM function - (analogue of ax in APM specification) - * bx, cx = parameters of the APM function -Returned value: - * 16-bit registers ax, bx, cx, dx, si, di and carry flag CF - are set according to the APM specification - * high halves of 32-bit registers eax, ebx, ecx, - edx, esi, edi are destroyed -Remarks: - * APM 1.2 specification is described in the document - "Advanced Power Management (APM) BIOS Specification" - (Revision 1.2), available at - http://www.microsoft.com/whdc/archive/amp_12.mspx; - besides it is included in famous Interrupt List by Ralf Brown - (http://www.pobox.com/~ralf/files.html, - ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/). - -====================================================================== -=================== Function 50 - set window shape. ================== -====================================================================== -Normal windows have rectangular shape. This function can give to -a window any shape. The shape is given by a set of points inside -the base rectangle belonging to a window. Position and coordinates -of the base rectangle are set by function 0 -and changed by function 67. - ---------------------------- Set shape data --------------------------- -Parameters: - * eax = 50 - function number - * ebx = 0 - subfunction number - * ecx = pointer to shape data (array of bytes 0/1) -Returned value: - * function does not return value - --------------------------- Set shape scale --------------------------- -Parameters: - * eax = 50 - function number - * ebx = 1 - subfunction number - * ecx sets a scale: each byte of data defines - (2^scale)*(2^scale) pixels -Returned value: - * function does not return value -Remarks: - * Default scale is 0 (scale factor is 1). If in the shape data - one byte corresponds to one pixel, there is no necessity - to set scale. - * Let's designate xsize = window width (in pixels), ysize = height; - pay attention, that they are one pixel more than defined by - functions 0, 67. - * On definition of scale xsize and ysize must be divisible - on 2^scale. - * Byte of data on offset 'a' must be 0/1 and defines belonging - to a window of square with the side 2^scale (if scale=0, - this is one pixel) and coordinates of the left upper corner - (a mod (xsize shr scale), a div (xsize shr scale)) - * Data size: (xsize shr scale)*(ysize shr scale). - * Data must be presented in the memory and not change - after set of shape. - * The system views the shape data at every window redraw by - function 0. - * The call of subfunction 0 with NULL pointer results in return - to the rectangular shape. - -====================================================================== -==================== Function 51 - create thread. ==================== -====================================================================== -Parameters: - * eax = 51 - function number - * ebx = 1 - unique subfunction - * ecx = address of thread entry point (starting eip) - * edx = pointer to thread stack (starting esp) -Returned value: - * eax = -1 - error (there is too many threads) - * otherwise eax = TID - thread identifier - - -====================================================================== -=== Function 52, subfunction 0 - get network driver configuration. === -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 0 - subfunction number -Returned value: - * eax = configuration dword -Remarks: - * Configuration dword can be set by subfunction 2. - * The kernel does not use this variable. The value of this - variable and working with it subfunctions 0 and 2 is represented - doubtful. - -====================================================================== -========= Function 52, subfunction 1 - get local IP-address. ========= -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 1 - subfunction number -Returned value: - * eax = IP-address (4 bytes) -Remarks: - * Local IP-address is set by subfunction 3. - -====================================================================== -=== Function 52, subfunction 2 - set network driver configuration. === -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 2 - subfunction number - * ecx = configuration dword; if low 7 bits derivate the number 3, - function [re-]initializes Ethernet-card, otherwise - Ethernet turns off -Returned value: - * if Ethernet-interface is not requested, function returns eax=2, - but this can be changed in future kernel versions - * if Ethernet-interface is requested, eax=0 means error - (absence of Ethernet-card), and nonzero value - success -Remarks: - * Configuration dword can be read by subfunction 0. - * The kernel does not use this variable. The value of this - variable, subfunction 0 and part of subfunction 2, which set it, - is represented doubtful. - -====================================================================== -========= Function 52, subfunction 3 - set local IP-address. ========= -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 3 - subfunction number - * ecx = IP-address (4 bytes) -Returned value: - * the current implementation returns eax=3, but this can be changed - in future versions -Remarks: - * Local IP-address can be get by subfunction 1. - -====================================================================== -= Function 52, subfunction 6 - add data to the stack of input queue. = -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 6 - subfunction number - * edx = data size - * esi = data pointer -Returned value: - * eax = -1 - error - * eax = 0 - success -Remarks: - * This function is intended only for slow network drivers - (PPP, SLIP). - * Data size must not exceed 1500 bytes, though function - performs no checks on correctness. - -====================================================================== - Function 52, subfunction 8 - read data from the network output queue. -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 8 - subfunction number - * esi = pointer to 1500-byte buffer -Returned value: - * eax = number of read bytes (in the current implementation - either 0 = no data or 1500) - * data was copied in buffer -Remarks: - * This function is intended only for slow network drivers - (PPP, SLIP). - -====================================================================== -============ Function 52, subfunction 9 - get gateway IP. ============ -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 9 - subfunction number -Returned value: - * eax = gateway IP (4 bytes) - -====================================================================== -=========== Function 52, subfunction 10 - get subnet mask. =========== -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 10 - subfunction number -Returned value: - * eax = subnet mask - -====================================================================== -============ Function 52, subfunction 11 - set gateway IP. =========== -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 11 - subfunction number - * ecx = gateway IP (4 bytes) -Returned value: - * the current implementation returns eax=11, but this can be changed - in future versions - -====================================================================== -=========== Function 52, subfunction 12 - set subnet mask. =========== -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 12 - subfunction number - * ecx = subnet mask -Returned value: - * the current implementation returns eax=12, but this can be changed - in future versions - -====================================================================== -============== Function 52, subfunction 13 - get DNS IP. ============= -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 13 - subfunction number -Returned value: - * eax = DNS IP (4 bytes) - -====================================================================== -============== Function 52, subfunction 14 - set DNS IP. ============= -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 14 - subfunction number - * ecx = DNS IP (4 bytes) -Returned value: - * the current implementation returns eax=14, but this can be changed - in future versions - -====================================================================== -======== Function 52, subfunction 15 - get local MAC address. ======== -====================================================================== -Parameters: - * eax = 52 - function number - * ebx = 15 - subfunction number - * ecx = 0 - read first 4 bytes, - ecx = 4 - read last 2 bytes -Returned value: - * for ecx=0: eax = first 4 bytes of MAC address - * for ecx=4: ax = last 2 bytes of MAC address, - high half of eax is destroyed - * for other ecx: eax = -1 indicates an error - -====================================================================== -============ Function 53, subfunction 0 - open UDP-socket. =========== -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 0 - subfunction number - * ecx = local port (only low word is taken into account) - * edx = remote port (only low word is taken into account) - * esi = remote IP -Returned value: - * eax = -1 = 0xFFFFFFFF - error; ebx destroyed - * eax = socket handle (some number which unambiguously identifies - socket and have sense only for the system) - success; - ebx destroyed - -====================================================================== -=========== Function 53, subfunction 1 - close UDP-socket. =========== -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 1 - subfunction number - * ecx = socket handle -Returned value: - * eax = -1 - incorrect handle - * eax = 0 - success - * ebx destroyed -Remarks: - * The current implementation does not close automatically all - sockets of a thread at termination. In particular, one should not - kill a thread with many opened sockets - there will be an outflow - of resources. - -====================================================================== -============== Function 53, subfunction 2 - poll socket. ============= -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 2 - subfunction number - * ecx = socket handle -Returned value: - * eax = number of read bytes, 0 for incorrect handle - * ebx destroyed - -====================================================================== -========= Function 53, subfunction 3 - read byte from socket. ======== -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 3 - subfunction number - * ecx = socket handle -Returned value: - * if there is no read data or handle is incorrect: eax=0, bl=0, - other bytes of ebx are destroyed - * if there are read data: eax=number of rest bytes - (possibly 0), bl=read byte, other bytes of ebx are destroyed - -====================================================================== -========== Function 53, subfunction 4 - write to UDP-socket. ========= -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 4 - subfunction number - * ecx = socket handle - * edx = number of bytes to write - * esi = pointer to data to write -Returned value: - * eax = 0xffffffff - error (invalid handle or not enough memory) - * eax = 0 - success - * ebx destroyed -Remarks: - * Number of bytes to write must not exceed 1500-28, though - the appropriate check is not made. - -====================================================================== -============ Function 53, subfunction 5 - open TCP-socket. =========== -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 5 - subfunction number - * ecx = local port (only low word is taken into account) - * edx = remote port (only low word is taken into account) - * esi = remote IP - * edi = open mode: SOCKET_PASSIVE=0 or SOCKET_ACTIVE=1 -Returned value: - * eax = -1 = 0xFFFFFFFF - error; ebx destroys - * eax = socket handle (some number which unambiguously identifies - socket and have sense only for the system) - success; - ebx destroyed - -====================================================================== -========= Function 53, subfunction 6 - get TCP-socket status. ======== -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 6 - subfunction number - * ecx = socket handle -Returned value: - * eax = 0 for incorrect handle or socket status: one of - * TCB_LISTEN = 1 - * TCB_SYN_SENT = 2 - * TCB_SYN_RECEIVED = 3 - * TCB_ESTABLISHED = 4 - * TCB_FIN_WAIT_1 = 5 - * TCB_FIN_WAIT_2 = 6 - * TCB_CLOSE_WAIT = 7 - * TCB_CLOSING = 8 - * TCB_LAST_ASK = 9 - * TCB_TIME_WAIT = 10 - * TCB_CLOSED = 11 - * ebx destroyed - -====================================================================== -========== Function 53, subfunction 7 - write to TCP-socket. ========= -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 7 - subfunction number - * ecx = socket handle - * edx = number of bytes to write - * esi = pointer to data to write -Returned value: - * eax = 0xffffffff - error (invalid handle or not enough memory) - * eax = 0 - success - * ebx destroyed -Remarks: - * Number of bytes to write must not exceed 1500-40, though - the appropriate check is not made. - -====================================================================== -=========== Function 53, subfunction 8 - close TCP-socket. =========== -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 8 - subfunction number - * ecx = socket handle -Returned value: - * eax = -1 - error (invalid handle or - not enough memory for socket close packet) - * eax = 0 - success - * ebx destroyed -Remarks: - * The current implementation does not close automatically all - sockets of a thread at termination. In particular, one should not - kill a thread with many opened sockets - there will be an outflow - of resources. - -====================================================================== -=== Function 53, subfunction 9 - check whether local port is free. === -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 9 - subfunction number - * ecx = local port number (low 16 bits are used only) -Returned value: - * eax = 0 - port is used - * eax = 1 - port is free - * ebx destroyed - -====================================================================== -===== Function 53, subfunction 10 - query Ethernet cable status. ===== -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 10 - subfunction number -Returned value: - * al = -1 - a network driver is not loaded or - does not support this function - * al = 0 - Ethernet cable is unplugged - * al = 1 - Ethernet cable is plugged - * ebx destroyed -Remarks: - * The current kernel implementation supports this function - only for RTL8139 network cards. - -====================================================================== -======= Function 53, subfunction 11 - read network stack data. ======= -====================================================================== -Paramters: - * eax = 53 - function number - * ebx = 11 - subfunction number - * ecx = socket handle - * edx = pointer to buffer - * esi = number of bytes to read; - * esi = 0 - read all data (maximum 4096 bytes) -Returned value: - * eax = number of bytes read (0 for incorrect handle) - * ebx destroyed - -====================================================================== -= Function 53, subfunction 255 - debug information of network driver. -====================================================================== -Parameters: - * eax = 53 - function number - * ebx = 255 - subfunction number - * ecx = type of requested information (see below) -Returned value: - * eax = requested information - * ebx destroyed -Possible values for ecx: - * 100: length of queue 0 (empty queue) - * 101: length of queue 1 (ip-out queue) - * 102: length of queue 2 (ip-in queue) - * 103: length of queue 3 (net1out queue) - * 200: number of items in the ARP table - * 201: size of the ARP table (in items) (20 for current version) - * 202: read item at edx of the ARP table to the temporary buffer, - whence 5 following types take information; - in this case eax is not defined - * 203: IP-address saved by type 202 - * 204: high dword of MAC-address saved by type 202 - * 205: low word of MAC-address saved by type 202 - * 206: status word saved by type 202 - * 207: ttl word saved by type 202 - * 2: total number of received IP-packets - * 3: total number of transferred IP-packets - * 4: total number of dumped received packets - * 5: total number of received ARP-packets - * 6: status of packet driver, 0=inactive, nonzero=active - -====================================================================== - Function 55, subfunction 55 - begin to play data on built-in speaker. -====================================================================== -Parameters: - * eax = 55 - function number - * ebx = 55 - subfunction number - * esi = pointer to data -Returned value: - * eax = 0 - success - * eax = 55 - error (speaker is off or busy) -Data is an array of items with variable length. -Format of each item is defined by first byte: - * 0 = end of data - * 1..0x80 = sets sound duration on 1/100 of second; sound note - is defined by immediate value of frequency - * following word (2 bytes) contains frequency divider; - frequency is defined as 1193180/divider - * 0x81 = invalid - * 0x82..0xFF = note is defined by octave and number: - * duration in 1/100 of second = (first byte)-0x81 - * there is one more byte; - * (second byte)=0xFF - delay - * otherwise it looks like a*0x10+b, where b=number of the note in - an octave from 1 to 12, a=number of octave (beginning from 0) -Remarks: - * Speaker play can be disabled/enabled by - subfunction 8 of function 18. - * Function returns control, having informed the system - an information on request. Play itself goes independently from - the program. - * The data must be kept in the memory at least up to the end - of play. - -====================================================================== -======================= Function 57 - PCI BIOS. ====================== -====================================================================== -Parameters: - * eax = 57 - function number - * ebp corresponds to al in PCI BIOS specification - * other registers are set according to PCI BIOS specification -Returned value: - * CF is undefined - * other registers are set according to PCI BIOS specification -Remarks: - * Many effects of this function can be also achieved with - corresponding subfunctions of function 62. - * The function calls PCI32 BIOS extension, documented e.g. in - http://alpha1.dyns.net/files/PCI/bios21.pdf. - * If BIOS does not support this extension, its behavior is emulated - (through kernel-mode analogues of subfunctions of function 62). - -====================================================================== -================ Function 58 - work with file system. ================ -====================================================================== -Parameters: - * eax = 58 - * ebx = pointer to the information structure -Returned value: - * eax = 0 - success; otherwise file system error code - * some subfunctions return value in other registers too -General format of the information structure: - * +0: dword: subfunction number - * +4: dword: number of block - * +8: dword: size - * +12 = +0xC: dword: pointer to data - * +16 = +0x10: dword: pointer to a memory for system operations - (4096 bytes) - * +20 = +0x14: n db: ASCIIZ-string with the file name -Specifications - in documentation on the appropriate subfunction. -Filename is case-insensitive for latin letters, russian letters -must be capital. -Format of filename: -/base/number/dir1/dir2/.../dirn/file, -where /base/number identifies device, on which file is located: -one of - * /RD/1 = /RAMDISK/1 to access ramdisk - * /FD/1 = /FLOPPYDISK/1 to access first floppy drive, - /FD/2 = /FLOPPYDISK/2 to access second one - * /HD/x = /HARDDISK/x - obsolete variant of access to hard disk - (in this case base is defined by subfunction 7 of function 21), - x - partition number (beginning from 1) - * /HD0/x, /HD1/x, /HD2/x, /HD3/x to access accordingly to devices - IDE0 (Primary Master), IDE1 (Primary Slave), - IDE2 (Secondary Master), IDE3 (Secondary Slave); - x - partition number on the selected hard drive, varies from 1 - to 255 (on each hard drive the indexing starts from 1) -Remarks: - * In the first two cases it is also possible to use FIRST - instead of 1, SECOND instead of 2, but it is not recommended - for convenience of transition to the future extensions. - * Limitation n<=39 is imposed. - * Names of folders and file dir1,...,dirn,file must have the - format 8.3: name no more than 8 characters, dot, extension no - more than 3 characters. Trailing spaces are ignored, no other - spaces is allowed. If name occupies equally 8 characters, - dot may be omitted (though it is not recommended to use this - feature for convenience of transition to the future extensions). - * This function does not support folders on ramdisk. -Examples: - * '/RAMDISK/FIRST/KERNEL.ASM',0 - '/rd/1/kernel.asm',0 - * '/HD0/1/kernel.asm',0 - * '/hd0/1/menuet/pics/tanzania.bmp',0 -Existing subfunctions: - * subfunction 0 - read file/folder - * subfunction 8 - LBA-read from device - * subfunction 15 - get file system information - -====================================================================== -=========== Function 58, subfunction 0 - read file/folder. =========== -====================================================================== -Parameters: - * eax = 58 - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 0 = subfunction number - * +4: dword: first block to read (beginning from 0) - * +8: dword: amount of blocks to read - * +12 = +0xC: dword: pointer to buffer for data - * +16 = +0x10: dword: pointer to buffer for system operations - (4096 bytes) - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx = file size (in bytes) or -1=0xffffffff, if file was not found -Remarks: - * Block size is 512 bytes. - * This function is obsolete, for reading files use subfunction 0 - of function 70, for reading folders - subfunction 1 of - function 70. - * Function can read contents of a folder. Only FAT file system is - supported. The format of FAT-folder is described - in any FAT documentation. - * Size of a folder is determined by size of FAT clusters chain. - * If file was ended before last requested block was read, - the function will read as many as it can, and after that return - eax=6 (EOF). - * Function can read root folders /rd/1,/fd/x,/hd[n]/x, but - in the first two cases the current implementation does not follow - to the declared rules: - for /rd/1: - * if one want to read 0 blocks, function considers, - that he requested 1; - * if one requests more than 14 blocks or starting block is - not less than 14, function returns eax=5 (not found) и ebx=-1; - * size of ramdisk root folder is 14 blocks, - 0x1C00=7168 байт; but function returns ebx=0 - (except of the case of previous item); - * strangely enough, it is possible to read 14th block (which - generally contains a garbage - I remind, the indexing begins - from 0); - * if some block with the number not less than 14 was requested, - function returns eax=6(EOF); otherwise eax=0. - For /fd/x: - * if the start block is not less than 14, function returns - eax=5 (not found) and ebx=0; - * note that format of FAT12 allows floppies with the root size - more or less than 14 blocks; - * check for length is not performed; - * if data was successful read, function returns - eax=0,ebx=0; otherwise eax=10 (access denied), ebx=-1. - * The function handles reading of special folders /,/rd,/fd,/hd[n]; - but the result does not correspond to expected (on operations with - normal files/folders), does not follow the declared rules, - may be changed in future versions of the kernel and consequently - is not described. To obtain the information about the equipment - use subfunction 11 of function 18 or - read corresponding folder with subfunction 1 of function 70. - -====================================================================== -========= Function 58, subfunction 8 - LBA-read from device. ========= -====================================================================== -Parameters: - * eax = 58 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 8 = subfunction number - * +4: dword: number of block to read (beginning from 0) - * +8: dword: ignored (set to 1) - * +12 = +0xC: dword: pointer to buffer for data (512 bytes) - * +16 = +0x10: dword: pointer to buffer for system operations - (4096 bytes) - * +20 = +0x14: ASCIIZ-name of device: case-insensitive, one of - /rd/1 = /RamDisk/1, /hd/n = /HardDisk/n, - 1<=n<=4 - number of device: 1=IDE0, ..., 4=IDE3. - Instead of digits it is allowed, though not recommended for - convenience of transition to future extensions, to use - 'first','second','third','fourth'. -Returned value: - * for device name /hd/xxx, where xxx is not in the list above: - * eax = ebx = 1 - * for invalid device name (except for the previous case): - * eax = 5 - * ebx does not change - * if LBA-access is disabled by subfunction 11 of function 21: - * eax = 2 - * ebx destroyed - * for ramdisk: attempt to read block outside ramdisk - (18*2*80 blocks) results in - * eax = 3 - * ebx = 0 - * for successful read: - * eax = ebx = 0 -Remarks: - * Block size is 512 bytes; function reads one block. - * Do not depend on returned value, it can be changed - in future versions. - * Function requires that LBA-access to devices is enabled by - subfunction 11 of function 21. To check this one can use - subfunction 11 of function 26. - * LBA-read of floppy is not supported. - * Function reads data on physical hard drive; if for any reason - data of the concrete partition are required, application must - define starting sector of this partition (either directly - through MBR, or from the full structure returned by - подфункцией 11 функции 18). - * Function does not check error code of hard disk, so request of - nonexisting sector reads something (most probably it will be - zeroes, but this is defined by device) and this is considered - as success (eax=0). - -====================================================================== -==== Function 58, subfunction 15 - get information on file system. === -====================================================================== -Parameters: - * eax = 58 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 15 = subfunction number - * +4: dword: ignored - * +8: dword: ignored - * +12 = +0xC: dword: ignored - * +16 = +0x10: dword: ignored - * +20 = +0x14: (only second character is checked) - /rd=/RAMDISK or /hd=/HARDDISK -Returned value: - * if the second character does not belong to set {'r','R','h','H'}: - * eax = 3 - * ebx = ecx = dword [fileinfo] = 0 - * for ramdisk: - * eax = 0 (success) - * ebx = total number of clusters = 2847 - * ecx = number of free clusters - * dword [fileinfo] = cluster size = 512 - * for hard disk: base and partition are defined by subfunctions - 7 and 8 of function 21: - * eax = 0 (success) - * ebx = total number of clusters - * ecx = number of free clusters - * dword [fileinfo] = cluster size (in bytes) -Remarks: - * Be not surprised to strange layout of 4th returned parameter - - when this code was writing, at system calls application got - only registers eax,ebx,ecx (from pushad-structure transmitted - as argument to the system function). Now it is corrected, so, - probably, it is meaningful to return cluster size in edx, while - this function is not used yet. - * There exists also subfunction 11 of function 18, - which returns information on file system. From the full table - of disk subsystem it is possible to deduce cluster size (there - it is stored in sectors) and total number of clusters - for hard disks. - -====================================================================== -========== Function 60 - Inter Process Communication (IPC). ========== -====================================================================== -IPC is used for message dispatching from one process/thread to -another. Previously it is necessary to agree how to interpret -the concrete message. - ------------ Subfunction 1 - set the area for IPC receiving ----------- -Is called by process-receiver. -Parameters: - * eax = 60 - function number - * ebx = 1 - subfunction number - * ecx = pointer to the buffer - * edx = size of the buffer -Returned value: - * eax = 0 - always success -Format of IPC-buffer: - * +0: dword: if nonzero, buffer is considered locked; - lock/unlock the buffer, when you work with it and need that - buffer data are not changed from outside (no new messages) - * +4: dword: occupied place in the buffer (in bytes) - * +8: first message - * +8+n: second message - * ... -Format of a message: - * +0: dword: PID of sender - * +4: dword: message length (not including this header) - * +8: n*byte: message data - ------------------- Subfunction 2 - send IPC message ------------------ -Is called by process-sender. -Parameters: - * eax = 60 - function number - * ebx = 2 - subfunction number - * ecx = PID of receiver - * edx = pointer to the message data - * esi = message length (in bytes) -Returned value: - * eax = 0 - success - * eax = 1 - the receiver has not defined buffer for IPC messages - (can be, still have no time, - and can be, this is not right process) - * eax = 2 - the receiver has blocked IPC-buffer; try to wait a bit - * eax = 3 - overflow of IPC-buffer of the receiver - * eax = 4 - process/thread with such PID does not exist -Remarks: - * Immediately after writing of IPC-message to the buffer the system - sends to the receiver the event with code 7 (see event codes). - -====================================================================== -==== Function 61 - get parameters for the direct graphics access. ==== -====================================================================== -The data of the graphics screen (the memory area which displays -screen contents) are accessible to a program directly, without -any system calls, through the selector gs: - mov eax, [gs:0] -places in eax the first dword of the buffer, which contains -information on color of the left upper point (and, possibly, colors -of several following). - mov [gs:0], eax -by work in VESA modes with LFB sets color of the left upper point -(and, possibly, colors of several following). -To interpret the data of graphics screen program needs to know -some parameters, returning by this function. -Remarks: - * Graphics parameters changes very seldom at work, - namely, only in cases, when user works with the application VRR. - * At videomode change the system redraws all windows (event - with code 1) and redraws the background (event 5). - Same events occur in other cases too, which meet much more often, - than videomode change. - * By operation in videomodes with LFB the selector gs points to - LFB itself, so reading/writing on gs result directly in - change of screen contents. By operation in videomodes without - LFB gs points to some data area in the kernel, and all functions - of screen output fulfil honesty double operation on writing - directly to the screen and writing to this buffer. In result - at reading contents of this buffer the results correspond to - screen contents (with, generally speaking, large color - resolution), and writing is ignored. - One exception is the mode 320*200, for which main loop of the - system thread updates the screen according to mouse movements. - -------------------------- Screen resolution -------------------------- -Parameters: - * eax = 61 - function number - * ebx = 1 - subfunction number -Returned value: - * eax = [resolution on x axis]*65536 + [resolution on y axis] -Remarks: - * One can use function 14 paying attention that - it returns sizes on 1 pixel less. It is fully equivalent way. - ----------------------- Number of bits per pixel ---------------------- -Parameters: - * eax = 61 - function number - * ebx = 2 - subfunction number -Returned value: - * eax = number of bits per pixel (24 or 32) - --------------------- Number of bytes per scanline -------------------- -Parameters: - * eax = 61 - function number - * ebx = 3 - subfunction number -Returned value: - * eax = number of bytes occupied by one scanline - (horizontal line on the screen) - -====================================================================== -===== Function 62, subfunction 0 - get version of PCI-interface. ===== -====================================================================== -Parameters: - * eax = 62 - function number - * bl = 0 - subfunction number -Returned value: - * eax = -1 - PCI access is disabled; otherwise - * ah.al = version of PCI-interface (ah=version, al=subversion) - * high word of eax is zeroed -Remarks: - * Previously low-level access to PCI for applications must be - enabled by subfunction 12 of function 21. - * If PCI BIOS is not supported, the value of ax is undefined. - -====================================================================== -==== Function 62, subfunction 1 - get number of the last PCI-bus. ==== -====================================================================== -Parameters: - * eax = 62 - function number - * bl = 1 - subfunction number -Returned value: - * eax = -1 - access to PCI is disabled; otherwise - * al = number of the last PCI-bus; other bytes of eax are destroyed -Remarks: - * Previously low-level access to PCI for applications must be - enabled by subfunction 12 of function 21. - * If PCI BIOS is not supported, the value of ax is undefined. - -====================================================================== -===================== Function 62, subfunction 2 ===================== -===== Get mechanism of addressing to the PCI configuration space. ==== -====================================================================== -Parameters: - * eax = 62 - function number - * bl = 2 - subfunction number -Returned value: - * eax = -1 - access to PCI is disabled; otherwise - * al = mechanism (1 or 2); other bytes of eax are destroyed -Remarks: - * Previously low-level access to PCI for applications must be - enabled by subfunction 12 of function 21. - * Addressing mechanism is selected depending on - equipment characteristics. - * Subfunctions of read and write work automatically - with the selected mechanism. - -====================================================================== -======== Function 62, subfunctions 4,5,6 - read PCI-register. ======== -====================================================================== -Parameters: - * eax = 62 - function number - * bl = 4 - read byte - * bl = 5 - read word - * bl = 6 - read dword - * bh = number of PCI-bus - * ch = dddddfff, where ddddd = number of the device on the bus, - fff = function number of device - * cl = number of register (must be even for bl=5, - divisible by 4 for bl=6) -Returned value: - * eax = -1 - error (access to PCI is disabled or parameters - are not supported); otherwise - * al/ax/eax (depending on requested size) contains the data; - the other part of register eax is destroyed -Remarks: - * Previously low-level access to PCI for applications must be - enabled by subfunction 12 of function 21. - * Access mechanism 2 supports only 16 devices on a bus and ignores - function number. To get access mechanism use subfunction 2. - * Some registers are standard and exist for all devices, some are - defined by the concrete device. The list of registers of the - first type can be found e.g. in famous - Interrupt List by Ralf Brown - (http://www.pobox.com/~ralf/files.html, - ftp://ftp.cs.cmu.edu/afs/cs/user/ralf/pub/); - registers of the second type must be listed - in the device documentation. - -====================================================================== -====== Function 62, subfunctions 8,9,10 - write to PCI-register. ===== -====================================================================== -Parameters: - * eax = 62 - function number - * bl = 8 - write byte - * bl = 9 - write word - * bl = 10 - write dword - * bh = number of PCI-bus - * ch = dddddfff, where ddddd = number of the device on the bus, - fff = function number of device - * cl = number of register (must be even for bl=9, - divisible by 4 for bl=10) - * dl/dx/edx (depending on requested size) contatins - the data to write -Returned value: - * eax = -1 - error (access to PCI is disabled or parameters - are not supported) - * eax = 0 - success -Remarks: - * Previously low-level access to PCI for applications must be - enabled by subfunction 12 of function 21. - * Access mechanism 2 supports only 16 devices on a bus and ignores - function number. To get access mechanism use subfunction 2. - * Some registers are standard and exist for all devices, some are - defined by the concrete device. The list of registers of the - first type can be found e.g. in famous Interrupt List by - Ralf Brown; registers of the second type must be listed - in the device documentation. - -====================================================================== -============== Function 63 - work with the debug board. ============== -====================================================================== -The debug board is the global system buffer (with the size -1024 bytes), to which any program can write (generally speaking, -arbitrary) data and from which other program can read these data. -By the agreement written data are text strings interpreted as -debug messages on a course of program execution. The kernel in -some situations also writes to the debug board information on -execution of some functions; by the agreement kernel messages -begins from the prefix "K : ". -For view of the debug board the application 'board' was created, -which reads data from the buffer and displays them in its window. -'board' interpretes the sequence of codes 13,10 as newline. -A character with null code in an end of line is not necessary, -but also does not prevent. -Because debugger has been written, the value of the debug board -has decreased, as debugger allows to inspect completely a course of -program execution without any efforts from the direction of program -itself. Nevertheless in some cases the debug board is still useful. - ------------------------------ Write byte ----------------------------- -Parameters: - * eax = 63 - function number - * ebx = 1 - subfunction number - * cl = data byte -Returned value: - * function does not return value -Remarks: - * Byte is written to the buffer. Buffer size is 512 bytes. - At buffer overflow all obtained data are lost. - * For output to the debug board of more complicated objects - (strings, numbers) it is enough to call this function in cycle. - It is possible not to write the appropriate code manually and use - file 'debug.inc', which is included into the distributive. - ------------------------------ Read byte ------------------------------ -Takes away byte from the buffer. -Parameters: - * eax = 63 - function number - * ebx = 2 - subfunction number -Returned value: - * eax = ebx = 0 - the buffer is empty - * eax = byte, ebx = 1 - byte was successfully read - -====================================================================== -============== Function 64 - resize application memory. ============== -====================================================================== -Parameters: - * eax = 64 - function number - * ebx = 1 - unique subfunction - * ecx = new memory size -Returned value: - * eax = 0 - success - * eax = 1 - not enough memory -Remarks: - * There is another way to dynamically allocate/free memory - - subfunctions 11, 12, 13 of function 68. - * The function cannot be used together with 68.11, 68.12, 68.13. - The function call will be ignored after creation of process heap - with function 68.11. - -====================================================================== -======== Function 65 - draw image with palette in the window. ======== -====================================================================== -Parameters: - * eax = 65 - function number - * ebx = pointer to the image - * ecx = [size on axis x]*65536 + [size on axis y] - * edx = [coordinate on axis x]*65536 + [coordinate on axis y] - * esi = number of bits per pixel, must be 1,2,4,8,15,16,24 or 32 - * edi = pointer to palette (2 to the power esi colors 0x00RRGGBB); - ignored when esi > 8 - * ebp = offset of next row data relative to previous row data -Returned value: - * function does not return value -Remarks: - * Coordinates of the image are coordinates of the upper left corner - of the image relative to the window. - * Format of image with 1 bit per pixel: each byte of image - (possibly excluding last bytes in rows), contains information on - the color of 8 pixels, MSB corresponds to first pixel. - * Format of image with 2 bits per pixel: each byte of image - (possibly excluding last bytes in rows), contains information on - the color of 4 pixels, two MSBs correspond to first pixel. - * Format of image with 4 bits per pixel: each byte of image - excluding last bytes in rows (if width is odd) contains - information on the color of 2 pixels, high-order tetrad - corresponds to first pixel. - * Format of image with 8 bits per pixel: each byte of image is - index in the palette. - * Format of image with 15 bits per pixel: the color of each pixel - is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per - each color. - * Format of image with 16 bits per pixel: the color of each pixel - is coded as RRRRRGGGGGGBBBBB (5+6+5). - * Format of image with 24 bits per pixel: the color of each pixel - is coded as 3 bytes - sequentially blue, green, red components. - * Format of image with 32 bits per pixel: similar to 24, but - one additional ignored byte is present. - * The call to function 7 is equivalent to call to this function - with esi=24, ebp=0. - -====================================================================== -================== Function 66 - work with keyboard. ================= -====================================================================== -The input mode influences results of reading keys by function 2. -When a program loads, ASCII input mode is set for it. - --------------- Subfunction 1 - set keyboard input mode. -------------- -Parameters: - * eax = 66 - function number - * ebx = 1 - subfunction number - * ecx = mode: - * 0 = normal (ASCII-characters) - * 1 = scancodes -Returned value: - * function does not return value - --------------- Subfunction 2 - get keyboard input mode. -------------- -Parameters: - * eax = 66 - function number - * ebx = 2 - subfunction number -Returned value: - * eax = current mode - ------------- Subfunction 3 - get status of control keys. ------------- -Parameters: - * eax = 66 - function number - * ebx = 3 - subfunction number -Returned value: - * eax = bit mask: - * bit 0 (mask 1): left Shift is pressed - * bit 1 (mask 2): right Shift is pressed - * bit 2 (mask 4): left Ctrl is pressed - * bit 3 (mask 8): right Ctrl is pressed - * bit 4 (mask 0x10): left Alt is pressed - * bit 5 (mask 0x20): right Alt is pressed - * bit 6 (mask 0x40): CapsLock is on - * bit 7 (mask 0x80): NumLock is on - * bit 8 (mask 0x100): ScrollLock is on - * other bits are cleared - --------------- Subfunction 4 - set system-wide hotkey. --------------- -When hotkey is pressed, the system notifies only those applications, -which have installed it; the active application (which receives -all normal input) does not receive such keys. -The notification consists in sending event with the code 2. -Reading hotkey is the same as reading normal key - by function 2. -Parameters: - * eax = 66 - function number - * ebx = 4 - subfunction number - * cl determines key scancode; - use cl=0 to give combinations such as Ctrl+Shift - * edx = 0xXYZ determines possible states of control keys: - * Z (low 4 bits) determines state of LShift and RShift: - * 0 = no key must be pressed; - * 1 = exactly one key must be pressed; - * 2 = both keys must be pressed; - * 3 = must be pressed LShift, but not RShift; - * 4 = must be pressed RShift, but not LShift - * Y - similar for LCtrl and RCtrl; - * X - similar for LAlt and RAlt -Returned value: - * eax=0 - success - * eax=1 - too mant hotkeys (maximum 256 are allowed) -Remarks: - * Hotkey can work either at pressing or at release. Release - scancode of a key is more on 128 than pressing scancode - (i.e. high bit is set). - * Several applications can set the same combination; - all such applications will be informed on pressing - such combination. - --------------- Subfunction 5 - delete installed hotkey. -------------- -Parameters: - * eax = 66 - function number - * ebx = 5 - subfunction number - * cl = scancode of key and edx = 0xXYZ the same as in subfunction 4 -Returned value: - * eax = 0 - success - * eax = 1 - there is no such hotkey -Remarks: - * When a process/thread terminates, all hotkey installed by it are - deleted. - * The call to this subfunction does not affect other applications. - If other application has defined the same combination, it will - still receive notices. - -====================================================================== -========= Function 67 - change position/sizes of the window. ========= -====================================================================== -Parameters: - * eax = 67 - function number - * ebx = new x-coordinate of the window - * ecx = new y-coordinate of the window - * edx = new x-size of the window - * esi = new y-size of the window -Returned value: - * function does not return value -Remarks: - * The value -1 for a parameter means "do not change"; e.g. to move - the window without resizing it is possible to specify edx=esi=-1. - * Previously the window must be defined by function 0. - It sets initial coordinates and sizes of the window. - * Sizes of the window are understood in sense of function 0, - that is one pixel less than real sizes. - * The function call for maximized windows is simply ignored. - * For windows of appropriate styles position and/or sizes can be - changed by user; current position and sizes can be obtained by - call to function 9. - * The function sends to the window redraw event (with the code 1). - -====================================================================== -====== Function 68, subfunction 0 - get the task switch counter. ===== -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 0 - subfunction number -Returned value: - * eax = number of task switches from the system booting - (modulo 2^32) - -====================================================================== -======= Function 68, subfunction 1 - switch to the next thread. ====== -====================================================================== -The function completes the current time slice allocated to the -thread and switches to the next. (Which thread in which process -will be next, is unpredictable). Later, when execution queue -will reach the current thread, execution will be continued. -Parameters: - * eax = 68 - function number - * ebx = 1 - subfunction number -Returned value: - * function does not return value - -====================================================================== -============= Function 68, subfunction 2 - cache + rdpmc. ============ -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 2 - subfunction number - * ecx = required action: - * ecx = 0 - enable instruction 'rdpmc' - (ReaD Performance-Monitoring Counters) for applications - * ecx = 1 - find out whether cache is disabled/enabled - * ecx = 2 - enable cache - * ecx = 3 - disable cache -Returned value: - * for ecx=0: - * eax = the value of cr4 - * for ecx=1: - * eax = (cr0 and 0x60000000): - * eax = 0 - cache is on - * eax <> 0 - cache is off - * for ecx=2 and ecx=3: - * function does not return value - -====================================================================== -=========== Function 68, subfunction 3 - read MSR-register. ========== -====================================================================== -MSR = Model Specific Register; the complete list of MSR-registers -of a processor is included to the documentation on it (for example, -IA-32 Intel Architecture Software Developer's Manual, -Volume 3, Appendix B); each processor family has its own subset -of the MSR-registers. -Parameters: - * eax = 68 - function number - * ebx = 3 - subfunction number - * ecx is ignored - * edx = MSR address -Returned value: - * ebx:eax = high:low dword of the result -Remarks: - * If ecx contains nonexistent or not implemented for this processor - MSR, processor will generate an exception in the kernel, which - will kill the thread. - * Previously it is necessary to check, whether MSRs are supported - as a whole, with the instruction 'cpuid'. Otherwise processor - will generate other exception in the kernel, which will anyway - kill the thread. - -====================================================================== -========= Function 68, subfunction 4 - write to MSR-register. ======== -====================================================================== -MSR = Model Specific Register; the complete list of MSR-registers -of a processor is included to the documentation on it (for example, -IA-32 Intel Architecture Software Developer's Manual, -Volume 3, Appendix B); each processor family has its own subset -of the MSR-registers. -Parameters: - * eax = 68 - function number - * ebx = 4 - subfunction number - * ecx is ignored - * edx = MSR address - * esi:edi = high:low dword -Returned value: - * function does not return value -Remarks: - * If ecx contains nonexistent or not implemented for this processor - MSR, processor will generate an exception in the kernel, which - will kill the thread. - * Previously it is necessary to check, whether MSRs are supported - as a whole, with the instruction 'cpuid'. Otherwise processor - will generate other exception in the kernel, which will anyway - kill the thread. - -====================================================================== -======= Function 68, subfunction 11 - initialize process heap. ======= -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 11 - subfunction number -Returned value: - * eax = 0 - failed - * otherwise size of created heap -Remarks: - * The function call initializes heap, from which one can in future - allocate and free memory blocks with subfunctions 12 and 13. - Heap size is equal to total amount of free application memory. - * The second function call from the same process results in - returning the size of the existing heap. - * After creation of the heap calls to function 64 will be ignored. - -====================================================================== -======== Function 68, subfunction 12 - allocate memory block. ======== -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 12 - subfunction number - * ecx = required size in bytes -Returned value: - * eax = pointer to the allocated block -Remarks: - * Before this call one must initialize process heap by call to - subfunction 11. - * The function allocates an integer number of pages (4 Kb) in such - way that the real size of allocated block is more than or equal to - requested size. - -====================================================================== -========== Function 68, subfunction 13 - free memory block. ========== -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 13 - subfunction number - * ecx = pointer to the memory block -Returned value: - * eax = 1 - success - * eax = 0 - failed -Remarks: - * The memory block must have been allocated by subfunction 12 - or subfunction 20. - -====================================================================== -======== Function 68, subfunction 14 - wait for driver notify. ======= -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 14 - subfunction number - * ecx = pointer to the buffer for information (8 bytes) -Returned value: - * buffer pointed to by ecx contains the following information: - * +0: dword: constant EV_INTR = 1 - * +4: dword: driver data -Remarks: - * The current implementation at wait time uses "heavy" operations - of task switch. - -====================================================================== -====== Function 68, subfunction 15 - set FPU exception handler. ====== -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 15 - subfunction number - * ecx = address of the new exception handler -Returned value: - * eax = address of the old exception handler (0, if it was not set) - -====================================================================== -============= Function 68, subfunction 16 - load driver. ============= -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 16 - subfunction number - * ecx = pointer to ASCIIZ-string with driver name -Returned value: - * eax = 0 - failed - * otherwise eax = driver handle -Remarks: - * If the driver was not loaded yet, it is loaded; - if the driver was loaded yet, nothing happens. - * Driver name is case-sensitive. - Maximum length of the name is 16 characters, including - terminating null character, the rest is ignored. - * Driver ABC is loaded from file /rd/1/drivers/ABC.obj. - -====================================================================== -============ Function 68, subfunction 17 - driver control. =========== -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 17 - subfunction number - * ecx = pointer to the control structure: - * +0: dword: handle of driver - * +4: dword: code of driver function - * +8: dword: pointer to input data - * +12 = +0xC: dword: size of input data - * +16 = +0x10: dword: pointer to output data - * +20 = +0x14: dword: size of output data -Returned value: - * eax = determined by driver -Remarks: - * Function codes and the structure of input/output data - are defined by driver. - * Previously one must obtain driver handle by subfunction 16. - -====================================================================== -====== Function 68, subfunction 18 - set SSE exception handler. ====== -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 15 - subfunction number - * ecx = address of the new exception handler -Returned value: - * eax = address of the old exception handler (0, if it was not set) - -====================================================================== -=============== Function 68, subfunction 19 - load DLL. ============== -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 19 - subfunction number - * ecx = pointer to ASCIIZ-string with the full path to DLL -Returned value: - * eax = 0 - failed - * otherwise eax = pointer to DLL export table -Remarks: - * Export table is an array of structures of 2 dword's, terminated - by zero. The first dword in structure points to function name, - the second dword contains address of function. - -====================================================================== -======= Function 68, subfunction 20 - reallocate memory block. ======= -====================================================================== -Parameters: - * eax = 68 - function number - * ebx = 20 - subfunction number - * ecx = new size in bytes - * edx = pointer to already allocated block -Returned value: - * eax = pointer to the reallocated block, 0 = error -Remarks: - * Before this call one must initialize process heap by call to - subfunction 11. - * The function allocates an integer number of pages (4 Kb) in such - way that the real size of allocated block is more than or equal to - requested size. - * If edx=0, the function call is equivalent to memory allocation - with subfunction 12. Otherwise the block at edx - must be allocated earlier with subfunction 12 or this subfunction. - * If ecx=0, the function frees memory block at edx and returns 0. - * The contents of the block are unchanged up to the shorter of - the new and old sizes. - -====================================================================== -====================== Fucntion 69 - debugging. ====================== -====================================================================== -A process can load other process as debugged by set of corresponding -bit by call to subfunction 7 of function 70. -A process can have only one debugger; one process can debug some -others. The system notifies debugger on events occuring with -debugged process. Messages are written to the buffer defined by -subfunction 0. -Format of a message: - * +0: dword: message code - * +4: dword: PID of debugged process - * +8: there can be additional data depending on message code -Message codes: - * 1 = exception - * in addition dword-number of the exception is given - * process is suspended - * 2 = process has terminated - * comes at any termination: both through the system function -1, - and at "murder" by any other process (including debugger itself) - * 3 = debug exception int 1 = #DB - * in addition dword-image of the register DR6 is given: - * bits 0-3: condition of the corresponding breakpoint (set by - subfunction 9) is satisfied - * бит 14: exception has occured because of the trace mode - (flag TF is set TF) - * process is suspended -When debugger terminates, all debugged processes are killed. -If debugger does not want this, it must previously detach by -subfunction 3. - -All subfunctions are applicable only to processes/threads started -from the current by function 70 with set debugging flag. -Debugging of multithreaded programs is not supported yet. -The full list of subfunctions: - * subfunction 0 - define data area for debug messages - * subfunction 1 - get contents of registers of debugged thread - * subfunction 2 - set contents of registers of debugged thread - * subfunction 3 - detach from debugged process - * subfunction 4 - suspend debugged thread - * subfunction 5 - resume debugged thread - * subfunction 6 - read from the memory of debugged process - * subfunction 7 - write to the memory of debugged process - * subfunction 8 - terminate debugged thread - * subfunction 9 - set/clear hardware breakpoint - -====================================================================== -= Function 69, subfunction 0 - define data area fror debug messages. = -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 0 - subfunction number - * ecx = pointer -Format of data area: - * +0: dword: N = buffer size (not including this header) - * +4: dword: occupied place - * +8: N*byte: buffer -Returned value: - * function does not return value -Remarks: - * If the size field is negative, the buffer is considered locked - and at arrival of new message the system will wait. - For synchronization frame all work with the buffer by operations - lock/unlock - neg [bufsize] - * Data in the buffer are considered as array of items with variable - length - messages. Format of a message is explained in - general description. - -====================================================================== -===================== Function 69, subfunction 1 ===================== -============ Get contents of registers of debugged thread. =========== -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 1 - subfunction number - * ecx = thread identifier - * edx = size of context structure, must be 0x28=40 bytes - * esi = pointer to context structure -Returned value: - * function does not return value -Format of context structure: (FPU is not supported yet) - * +0: dword: eip - * +4: dword: eflags - * +8: dword: eax - * +12 = +0xC: dword: ecx - * +16 = +0x10: dword: edx - * +20 = +0x14: dword: ebx - * +24 = +0x18: dword: esp - * +28 = +0x1C: dword: ebp - * +32 = +0x20: dword: esi - * +36 = +0x24: dword: edi -Remarks: - * If the thread executes code of ring-0, the function returns - contents of registers of ring-3. - * Process must be loaded for debugging (as is shown in - general description). - -====================================================================== -===================== Function 69, subfunction 2 ===================== -============ Set contents of registers of debugged thread. =========== -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 2 - subfunction number - * ecx = thread identifier - * edx = size of context structure, must be 0x28=40 bytes -Returned value: - * function does not return value -Format of context structure is shown in the description of -subfunction 1. -Remarks: - * If the thread executes code of ring-0, the function returns - contents of registers of ring-3. - * Process must be loaded for debugging (as is shown in - general description). - -====================================================================== -===== Function 69, subfunction 3 - detach from debugged process. ===== -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 3 - subfunction number - * ecx = identifier -Returned value: - * function does not return value -Remarks: - * If the process was suspended, it resumes execution. - -====================================================================== -======== Function 69, subfunction 4 - suspend debugged thread. ======= -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 4 - subfunction number - * ecx = thread identifier -Returned value: - * function does not return value -Remarks: - * Process must be loaded for debugging (as is shown in - general description). - -====================================================================== -======== Function 69, subfunction 5 - resume debugged thread. ======== -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 5 - subfunction number - * ecx = thread identifier -Returned value: - * function does not return value -Remarks: - * Process must be loaded for debugging (as is shown in - general description). - -====================================================================== -= Fucntion 69, subfunction 6 - read from memory of debugged process. = -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 6 - subfunction number - * ecx = identifier - * edx = number of bytes to read - * esi = address in the memory of debugged process - * edi = pointer to buffer for data -Returned value: - * eax = -1 at an error (invalid PID or buffer) - * otherwise eax = number of read bytes (possibly, 0, - if esi is too large) -Remarks: - * Process must be loaded for debugging (as is shown in - general description). - -====================================================================== -== Function 69, subfunction 7 - write to memory of debugged process. = -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 7 - subfunction number - * ecx = identifier - * edx = number of bytes to write - * esi = address of memory in debugged process - * edi = pointer to data -Returned value: - * eax = -1 at an error (invalid PID or buffer) - * otherwise eax = number of written bytes (possibly, 0, - if esi is too large) -Remarks: - * Process must be loaded for debugging (as is shown in - general description). - -====================================================================== -======= Function 69, subfunction 8 - terminate debugged thread. ====== -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 8 - subfunction number - * ecx = identifier -Returned value: - * function does not return value -Remarks: - * Process must be loaded for debugging (as is shown in - general description). - * The function is similar to subfunction 2 of function 18 - with two differences: it requires first remark and - accepts PID rather than slot number. - -====================================================================== -===== Function 69, subfunction 9 - set/clear hardware breakpoint. ==== -====================================================================== -Parameters: - * eax = 69 - function number - * ebx = 9 - subfunction number - * ecx = thread identifier - * dl = index of breakpoint, from 0 to 3 inclusively - * dh = flags: - * if high bit is cleared - set breakpoint: - * bits 0-1 - condition: - * 00 = breakpoint on execution - * 01 = breakpoint on read - * 11 = breakpoint on read/write - * bits 2-3 - length; for breakpoints on exception it must be - 00, otherwise one of - * 00 = byte - * 01 = word - * 11 = dword - * esi = breakpoint address; must be aligned according to - the length (i.e. must be even for word breakpoints, - divisible by 4 for dword) - * if high bit is set - clear breakpoint -Returned value: - * eax = 0 - success - * eax = 1 - error in the input data - * eax = 2 - (reserved, is never returned in the current - implementation) a global breakpoint with that index is already set -Remarks: - * Process must be loaded for debugging (as is shown in - general description). - * Hardware breakpoints are implemented through DRx-registers of - the processor, all limitations results from this. - * The function can reinstall the breakpoint, previously set - by it (and it does not inform on this). - Carry on the list of set breakpoints in the debugger. - * Breakpoints generate debug exception #DB, on which the system - notifies debugger. - * Breakpoints on write and read/write act after - execution of the caused it instruction. - -====================================================================== -==== Function 70 - work with file system with long names support. ==== -====================================================================== -Parameters: - * eax = 70 - * ebx = pointer to the information structure -Returned value: - * eax = 0 - success; otherwise file system error code - * some subfunctions return value in other registers too -General format of the information structure: - * +0: dword: subfunction number - * +4: dword: file offset - * +8: dword: high dword of offset (must be 0) or flags field - * +12 = +0xC: dword: size - * +16 = +0x10: dword: pointer to data - * +20 = +0x14: n db: ASCIIZ-string with the filename - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with the filename -Specifications - in documentation on the appropriate subfunction. -Filename is case-insensitive. Russian letters must be written in -the encoding cp866 (DOS). -Format of filename: -/base/number/dir1/dir2/.../dirn/file, -where /base/number identifies device, on which file is located: -one of - * /RD/1 = /RAMDISK/1 to access ramdisk - * /FD/1 = /FLOPPYDISK/1 to access first floppy drive, - /FD/2 = /FLOPPYDISK/2 to access second one - * /HD0/x, /HD1/x, /HD2/x, /HD3/x to access accordingly to devices - IDE0 (Primary Master), IDE1 (Primary Slave), - IDE2 (Secondary Master), IDE3 (Secondary Slave); - x - partition number on the selected hard drive, varies from 1 - to 255 (on each hard drive the indexing starts from 1) - * /CD0/1, /CD1/1, /CD2/1, /CD3/1 to access accordingly to - CD on IDE0 (Primary Master), IDE1 (Primary Slave), - IDE2 (Secondary Master), IDE3 (Secondary Slave) - * /SYS means system folder; with the usual boot (from floppy) - is equivalent to /RD/1 -Examples: - * '/rd/1/kernel.asm',0 - * '/HD0/1/kernel.asm',0 - * '/hd0/2/menuet/pics/tanzania.bmp',0 - * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0 - * '/sys/MySuperApp.ini',0 -Available subfunctions: - * subfunction 0 - read file - * subfunction 1 - read folder - * subfunction 2 - create/rewrite file - * subfunction 3 - write to existing file - * subfunction 4 - set file size - * subfunction 5 - get attributes of file/folder - * subfunction 6 - set attributes of file/folder - * subfunction 7 - start application - * subfunction 8 - delete file/folder - * subfunction 9 - create folder -For CD-drives due to hardware limitations only subfunctions -0,1,5 and 7 are available, other subfunctions return error -with code 2. -At the first call of subfunctions 0,1,5,7 to ATAPI devices -(CD and DVD) the manual control of tray is locked due to caching -drive data. Unlocking is made when subfunction 4 of function 24 -is called for corresponding device. - -====================================================================== -=== Function 70, subfunction 0 - read file with long names support. == -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 0 = subfunction number - * +4: dword: file offset (in bytes) - * +8: dword: 0 (reserved for high dword of offset) - * +12 = +0xC: dword: number of bytes to read - * +16 = +0x10: dword: pointer to buffer for data - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx = number of read bytes or -1=0xffffffff if file was not found -Remarks: - * If file was ended before last requested block was read, - the function will read as many as it can, and after that return - eax=6 (EOF). - * The function does not allow to read folder (returns eax=10, - access denied). - -====================================================================== -== Function 70, subfunction 1 - read folder with long names support. = -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 1 = subfunction number - * +4: dword: index of starting block (beginning from 0) - * +8: dword: flags field: - * bit 0 (mask 1): in what format to return names, - 0=ANSI, 1=UNICODE - * other bits are reserved and must be set to 0 for the future - compatibility - * +12 = +0xC: dword: number of blocks to read - * +16 = +0x10: dword: pointer to buffer for data, buffer size - must be not less than 32 + [+12]*560 bytes - * +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx = number of files, information on which was written to - the buffer, or -1=0xffffffff, if folder was not found -Structure of the buffer: - * +0: 32*byte: header - * +32 = +0x20: n1*byte: block with information on file 1 - * +32+n1: n2*byte: block with information on file 2 - * ... -Structure of header: - * +0: dword: version of structure (current is 1) - * +4: dword: number of placed blocks; is not greater than requested - in the field +12 of information structure; can be less, if - there are no more files in folder (the same as in ebx) - * +8: dword: total number of files in folder - * +12 = +0xC: 20*byte: reserved (zeroed) -Structure of block of data for folder entry (BDFE): - * +0: dword: attributes of file: - * bit 0 (mask 1): file is read-only - * bit 1 (mask 2): file is hidden - * bit 2 (mask 4): file is system - * bit 3 (mask 8): this is not a file but volume label - (for one partition meets no more than once and - only in root folder) - * bit 4 (mask 0x10): this is a folder - * bit 5 (mask 0x20): file was not archived - many archivation - programs have an option to archive only files with this bit set, - and after archiving this bit is cleared - it can be useful - for automatically creating of backup-archives as at writing - this bit is usually set - * +4: byte: type of name data: - (coincides with bit 0 of flags in the information structure) - * 0 = ASCII = 1-byte representation of each character - * 1 = UNICODE = 2-byte representation of each character - * +5: 3*byte: reserved (zero) - * +8: 4*byte: time of file creation - * +12 = +0xC: 4*byte: date of file creation - * +16 = +0x10: 4*byte: time of last access (read or write) - * +20 = +0x14: 4*byte: date of last access - * +24 = +0x18: 4*byte: time of last modification - * +28 = +0x1C: 4*byte: date of last modification - * +32 = +0x20: qword: file size in bytes (up to 16777216 Tb) - * +40 = +0x28: name - * for ASCII format: maximum length is 263 characters - (263 bytes), byte after the name has value 0 - * for UNICODE format: maximum length is 259 characters - (518 bytes), 2 bytes after the name have value 0 -Time format: - * +0: byte: seconds - * +1: byte: minutes - * +2: byte: hours - * +3: byte: reserved (0) - * for example, 23.59.59 is written as (in hex) 3B 3B 17 00 -Date format: - * +0: byte: day - * +1: byte: month - * +2: word: year - * for example, 25.11.1979 is written as (in hex) 19 0B BB 07 -Remarks: - * If BDFE contains ASCII name, the length of BDFE is 304 bytes, - if UNICODE name - 560 bytes. Value of length is aligned - on 16-byte bound (to accelerate processing in CPU cache). - * First character after a name is zero (ASCIIZ-string). The further - data contain garbage. - * If files in folder were ended before requested number was read, - the function will read as many as it can, and after that return - eax=6 (EOF). - * Any folder on the disk, except for root, contains two special - entries "." and "..", identifying accordingly the folder itself - and the parent folder. - * The function allows also to read virtual folders "/", "/rd", - "/fd", "/hd[n]", thus attributes of subfolders are set to 0x10, - and times and dates are zeroed. An alternative way to get the - equipment information - subfunction 11 of function 18. - -====================================================================== -===================== Function 70, subfunction 2 ===================== -============ Create/rewrite file with long names support. ============ -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 2 = subfunction number - * +4: dword: 0 (reserved) - * +8: dword: 0 (reserved) - * +12 = +0xC: dword: number of bytes to read - * +16 = +0x10: dword: pointer to data - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx = number of written bytes (possibly 0) -Remarks: - * If a file with given name did not exist, it is created; - if it existed, it is rewritten. - * If there is not enough free space on disk, the function will - write as many as can and then return error code 8. - * The function is not supported for CD (returns error code 2). - -====================================================================== -===================== Function 70, subfunction 3 ===================== -=========== Write to existing file with long names support. ========== -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 3 = subfunction number - * +4: dword: file offset (in bytes) - * +8: dword: high dword of offset (must be 0 for FAT) - * +12 = +0xC: dword: number of bytes to write - * +16 = +0x10: dword: pointer to data - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx = number of written bytes (possibly 0) -Remarks: - * The file must already exist, otherwise function returns eax=5. - * The only result of write 0 bytes is update in the file attributes - date/time of modification and access to the current date/time. - * If beginning and/or ending position is greater than file size - (except for the previous case), the file is expanded to needed - size with zero characters. - * The function is not supported for CD (returns error code 2). - -====================================================================== -============ Function 70, subfunction 4 - set end of file. =========== -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 4 = subfunction number - * +4: dword: low dword of new file size - * +8: dword: high dword of new file size (must be 0 for FAT) - * +12 = +0xC: dword: 0 (reserved) - * +16 = +0x10: dword: 0 (reserved) - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx destroyed -Remarks: - * If the new file size is less than old one, file is truncated. - If the new size is greater than old one, file is expanded with - characters with code 0. If the new size is equal to old one, - the only result of call is set date/time of modification and - access to the current date/time. - * If there is not enough free space on disk for expansion, the - function will expand to maximum possible size and then return - error code 8. - * The function is not supported for CD (returns error code 2). - -====================================================================== -==== Function 70, subfunction 5 - get information on file/folder. ==== -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 5 = subfunction number - * +4: dword: 0 (reserved) - * +8: dword: 0 (reserved) - * +12 = +0xC: dword: 0 (reserved) - * +16 = +0x10: dword: pointer to buffer for data (40 bytes) - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx destroyed -Information on file is returned in the BDFE format (block of data -for folder entry), explained in the description of -subfunction 1, but without filename -(i.e. only first 40 = 0x28 bytes). -Remarks: - * The function does not support virtual folders such as /, /rd and - root folders like /rd/1. - -====================================================================== -===== Function 70, subfunction 6 - set attributes of file/folder. ==== -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 6 = subfunction number - * +4: dword: 0 (reserved) - * +8: dword: 0 (reserved) - * +12 = +0xC: dword: 0 (reserved) - * +16 = +0x10: dword: pointer to buffer with attributes (32 bytes) - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx destroyed -File attributes are first 32 bytes in BDFE (block of data -for folder entry), explained in the description of subfunction 1 -(that is, without name and size of file). Attribute -file/folder/volume label (bits 3,4 in dword +0) is not changed. -Byte +4 (name format) is ignored. -Remarks: - * The function does not support virtual folders such as /, /rd and - root folders like /rd/1. - * The function is not supported for CD (returns error code 2). - -====================================================================== -=========== Function 70, subfunction 7 - start application. ========== -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 7 = subfunction number - * +4: dword: flags field: - * бит 0: start process as debugged - * other bits are reserved and must be set to 0 - * +8: dword: 0 or pointer to ASCIIZ-string with parameters - * +12 = +0xC: dword: 0 (reserved) - * +16 = +0x10: dword: 0 (reserved) - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax > 0 - program is loaded, eax contains PID - * eax < 0 - an error has occured, -eax contains - file system error code - * ebx destroyed -Remarks: - * Command line must be terminated by the character with the code 0 - (ASCIIZ-string); function takes into account either all characters - up to terminating zero inclusively or first 256 character - regarding what is less. - * If the process is started as debugged, it is created in - the suspended state; to run use subfunction 5 of function 69. - -====================================================================== -========== Function 70, subfunction 8 - delete file/folder. ========== -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 8 = subfunction number - * +4: dword: 0 (reserved) - * +8: dword: 0 (reserved) - * +12 = +0xC: dword: 0 (reserved) - * +16 = +0x10: dword: 0 (reserved) - * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with file name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx destroyed -Remarks: - * The function is not supported for CD (returns error code 2). - * The function can delete only empty folders (attempt to delete - nonempty folder results in error with code 10, "access denied"). - -====================================================================== -============= Function 70, subfunction 9 - create folder. ============ -====================================================================== -Parameters: - * eax = 70 - function number - * ebx = pointer to the information structure -Format of the information structure: - * +0: dword: 9 = subfunction number - * +4: dword: 0 (reserved) - * +8: dword: 0 (reserved) - * +12 = +0xC: dword: 0 (reserved) - * +16 = +0x10: dword: 0 (reserved) - * +20 = +0x14: ASCIIZ-name of folder, the rules of names forming are - given in the general description - or - * +20 = +0x14: db 0 - * +21 = +0x15: dd pointer to ASCIIZ-string with folder name -Returned value: - * eax = 0 - success, otherwise file system error code - * ebx destroyed -Remarks: - * The function is not supported for CD (returns error code 2). - * The parent folder must already exist. - * If target folder already exists, function returns success (eax=0). - -====================================================================== -========== Function 71, subfunction 1 - set window caption. ========== -====================================================================== -Parameters: - * eax = 71 - function number - * ebx = 1 - subfunction number - * ecx = pointer to caption string -Returned value: - * function does not return value -Remarks: - * String must be in the ASCIIZ-format. Disregarding real string - length, no more than 255 characters are drawn. - * Pass NULL in ecx to remove caption. - -====================================================================== -=============== Function 72 - send message to a window. ============== -====================================================================== - -- Subfunction 1 - send message with parameter to the active window. -- -Parameters: - * eax = 72 - function number - * ebx = 1 - subfunction number - * ecx = event code: 2 or 3 - * edx = parameter: key code for ecx=2, button identifier for ecx=3 -Returned value: - * eax = 0 - success - * eax = 1 - buffer is full - -====================================================================== -=============== Function -1 - terminate thread/process =============== -====================================================================== -Parameters: - * eax = -1 - function number -Returned value: - * function does not return neither value nor control -Remarks: - * If the process did not create threads obviously, it has only - one thread, which termination results in process termination. - * If the current thread is last in the process, its termination - also results in process terminates. - * This function terminates the current thread. Other thread can be - killed by call to subfunction 2 of function 18. - -====================================================================== -=========================== List of events =========================== -====================================================================== -Next event can be retrieved by the call of one from functions 10 -(to wait for event), 11 (to check without waiting), 23 -(to wait during the given time). -These functions return only those events, which enter into a mask set -by function 40. By default it is first three, -there is enough for most applications. -Codes of events: - * 1 = redraw event (is reset by call to function 0) - * 2 = key on keyboard is pressed (acts, only when the window is - active) or hotkey is pressed; is reset, when all keys from - the buffer are read out by function 2 - * 3 = button is pressed, defined earlier by function 8 - (or close button, created implicitly by function 0; - minimize button is handled by the system and sends no message; - acts, only when the window is active; - is reset when all buttons from the buffer - are read out by function 17) - * 4 = reserved (in current implementation never comes even after - unmasking by function 40) - * 5 = the desktop background is redrawed (is reset automatically - after redraw, so if in redraw time program does not wait and - does not check events, it will not remark this event) - * 6 = mouse event (something happened - button pressing or moving; - is reset at reading) - * 7 = IPC event (see function 60 - - Inter Process Communication; is reset at reading) - * 8 = network event (is reset at reading) - * 9 = debug event (is reset at reading; see - debug subsystem) - * 16..31 = event with appropriate IRQ - (16=IRQ0, 31=IRQ15) (is reset after reading all IRQ data) - -====================================================================== -=================== Error codes of the file system =================== -====================================================================== - * 0 = success - * 1 = base and/or partition of a hard disk is not defined - (by subfunctions 7, 8 of function 21) - * 2 = function is not supported for the given file system - * 3 = unknown file system - * 4 = reserved, is never returned in the current implementation - * 5 = file not found - * 6 = end of file, EOF - * 7 = pointer lies outside of application memory - * 8 = disk is full - * 9 = FAT table is destroyed - * 10 = access denied - * 11 = device error -Application start functions can return also following errors: - * 30 = 0x1E = not enough memory - * 31 = 0x1F = file is not executable - * 32 = 0x20 = too many processes diff --git a/kernel/branches/net/skin/base.bmp b/kernel/branches/net/skin/base.bmp deleted file mode 100644 index 185b1f8289..0000000000 Binary files a/kernel/branches/net/skin/base.bmp and /dev/null differ diff --git a/kernel/branches/net/skin/base_1.bmp b/kernel/branches/net/skin/base_1.bmp deleted file mode 100644 index f53bbeb6f4..0000000000 Binary files a/kernel/branches/net/skin/base_1.bmp and /dev/null differ diff --git a/kernel/branches/net/skin/default.asm b/kernel/branches/net/skin/default.asm deleted file mode 100644 index 88c6f15f12..0000000000 --- a/kernel/branches/net/skin/default.asm +++ /dev/null @@ -1,38 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; -;; ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -include 'me_skin.inc' - -SKIN_PARAMS \ - height = bmp_base.height,\ ; skin height - margins = [5:1:43:1],\ ; margins [left:top:right:bottom] - colors active = [binner=0x00081d:\ ; border inner color - bouter=0x00081d:\ ; border outer color - bframe=0x0054e7],\ ; border frame color - colors inactive = [binner=0x00081d:\ ; border inner color - bouter=0x00081d:\ ; border outer color - bframe=0x1a8acc],\ ; border frame color - dtp = 'myblue.dtp' ; dtp colors - -SKIN_BUTTONS \ - close = [-21:3][16:16],\ ; buttons coordinates - minimize = [-39:3][16:16] ; [left:top][width:height] - -SKIN_BITMAPS \ - left active = bmp_left,\ ; skin bitmaps pointers - left inactive = bmp_left1,\ - oper active = bmp_oper,\ - oper inactive = bmp_oper1,\ - base active = bmp_base,\ - base inactive = bmp_base1 - -BITMAP bmp_left ,'left.bmp' ; skin bitmaps -BITMAP bmp_oper ,'oper.bmp' -BITMAP bmp_base ,'base.bmp' -BITMAP bmp_left1,'left_1.bmp' -BITMAP bmp_oper1,'oper_1.bmp' -BITMAP bmp_base1,'base_1.bmp' diff --git a/kernel/branches/net/skin/left.bmp b/kernel/branches/net/skin/left.bmp deleted file mode 100644 index bfd97344eb..0000000000 Binary files a/kernel/branches/net/skin/left.bmp and /dev/null differ diff --git a/kernel/branches/net/skin/left_1.bmp b/kernel/branches/net/skin/left_1.bmp deleted file mode 100644 index 51b9d15f7f..0000000000 Binary files a/kernel/branches/net/skin/left_1.bmp and /dev/null differ diff --git a/kernel/branches/net/skin/me_skin.inc b/kernel/branches/net/skin/me_skin.inc deleted file mode 100644 index 365964eb38..0000000000 --- a/kernel/branches/net/skin/me_skin.inc +++ /dev/null @@ -1,242 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;; -;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; -;; Distributed under terms of the GNU General Public License ;; -;; ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;============================================================================ -; This file should be used to generate skins of new standard -;============================================================================ -; skin file structure: -;---------------------------------------------------------------------------- -; header: -; dd 'SKIN' -; dd = version (1 for now) -; dd @ params -; dd @ buttons -; dd @ bitmaps -; ... -;---------------------------------------------------------------------------- -; NOTE: order of sections listed below is insignificant -; since they're identified by pointer in above header -;---------------------------------------------------------------------------- -; ... -; params: -; dd = skin height -; dw = right margin -; dw = left margin -; dw = bottom margin -; dw = top margin -; dd = inner line color -; dd = outer line color -; dd = frame color -; dd = dtp file size -; ?? = dtp file itself -; ... -;---------------------------------------------------------------------------- -; ... -; buttons: -; dd = button type (1 = close, 2 = minimize) -; dw = left button coord (could be negative) -; dw = top button coord (could be negative) -; dw = button width -; dw = button height -; ... etc for all buttons -; dd = 0 (end of buttons list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmaps: -; dw = bitmap kind (1 = left, 2 = oper, 3 = base) -; dw = bitmap type (1 = active, 0 = inactive) -; dd @ bitmap -; ... etc for all bitmaps -; dd 0 (end of bitmaps list) -; ... -;---------------------------------------------------------------------------- -; ... -; bitmap: -; dd = bitmap width -; dd = bitmap height -; ?? = raw bitmap data -; ... etc for all bitmaps -; ... -;============================================================================ - -dd 'SKIN',1,__params__,__buttons__,__bitmaps__ - -struc BITMAPFILEHEADER { - .bfType dw ? ; WORD - .bfSize dd ? ; DWORD - .bfReserved1 dw ? ; WORD - .bfReserved2 dw ? ; WORD - .bfOffBits dd ? ; DWORD -} - -struc BITMAPINFOHEADER { - .biSize dd ? ; DWORD - .biWidth dd ? ; LONG - .biHeight dd ? ; LONG - .biPlanes dw ? ; WORD - .biBitCount dw ? ; WORD - .biCompression dd ? ; DWORD - .biSizeImage dd ? ; DWORD - .biXPelsPerMeter dd ? ; LONG - .biYPelsPerMeter dd ? ; LONG - .biClrUsed dd ? ; DWORD - .biClrImportant dd ? ; DWORD -} - -struc _bmp { - .h BITMAPFILEHEADER - .i BITMAPINFOHEADER -} -virtual at 0 - _bmp _bmp -end virtual - -macro BITMAP _name*,_fname* -{ - local w,h,a,r,g,b - virtual at 0 - file _fname - load w dword from _bmp.i.biWidth - load h dword from _bmp.i.biHeight - end virtual - align 4 - label _name - .width = w - .height = h - dd w,h - a=54+(w*3+(w mod 4))*(h-1) - size = $ - repeat h - repeat w - virtual at 0 - file _fname - load r from a+0 - load g from a+1 - load b from a+2 - end virtual - db r,g,b - a=a+3 - end repeat - a=a-w*3*2-(w mod 4) - end repeat -} - -macro define_colors name,[col,val] -{ - common - local a,b,c - forward - match =binner,col \{ a = val \} - match =bouter,col \{ b = val \} - match =bframe,col \{ c = val \} - common - name equ a,b,c -} - -macro SKIN_PARAMS [a] -{ - common - local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz - __params__: - forward - match qq == ww,a - \{ - match =height,qq \\{ _height = ww \\} - match =margins,qq \\{ - match [q1:q2:q3:q4],ww - \\\{ - _margins equ q3,q1,q4,q2 - \\\} - \\} - match =colors =active,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =colors =inactive,qq - \\{ - match [q10==q11:q20==q21:q30==q31],ww - \\\{ - define_colors _colors_1,q10,q11,q20,q21,q30,q31 - \\\} - \\} - match =dtp,qq \\{ _dtp equ ww \\} - \} - common - dd _height - dw _margins - dd _colors,_colors_1 - virtual at 0 - file _dtp - _dtp_sz = $ - end virtual - dd _dtp_sz - file _dtp -} - -macro SKIN_BUTTONS [a] -{ - common - local btn - __buttons__: - forward - match qq == ww,a - \{ - btn = 0 - match =close,qq \\{ btn = 1 \\} - match =minimize,qq \\{ btn = 2 \\} - match [q1:q2][q3:q4],ww - \\{ - if btn <> 0 - dd btn - dw q1,q2,q3,q4 - end if - \\} - \} - common - dd 0 -} - -macro SKIN_BITMAPS [a] -{ - common - local bmp - __bitmaps__: - forward - match qq == ww,a - \{ - bmp=-1 - match qqq =active,qq \\{ bmp = 1 \\} - match qqq =inactive,qq \\{ bmp = 0 \\} - match =left qqq,qq - \\{ - if bmp >= 0 - dw 1,bmp - dd ww - end if - \\} - match =oper qqq,qq - \\{ - if bmp >= 0 - dw 2,bmp - dd ww - end if - \\} - match =base qqq,qq - \\{ - if bmp >= 0 - dw 3,bmp - dd ww - end if - \\} - \} - common - dd 0 -} \ No newline at end of file diff --git a/kernel/branches/net/skin/myblue.dtp b/kernel/branches/net/skin/myblue.dtp deleted file mode 100644 index 9e268cc7a7..0000000000 Binary files a/kernel/branches/net/skin/myblue.dtp and /dev/null differ diff --git a/kernel/branches/net/skin/oper.bmp b/kernel/branches/net/skin/oper.bmp deleted file mode 100644 index 6011b6d1bd..0000000000 Binary files a/kernel/branches/net/skin/oper.bmp and /dev/null differ diff --git a/kernel/branches/net/skin/oper_1.bmp b/kernel/branches/net/skin/oper_1.bmp deleted file mode 100644 index d57bd2d161..0000000000 Binary files a/kernel/branches/net/skin/oper_1.bmp and /dev/null differ