+7 (495) 229-0436   shopadmin@itshop.ru 119334, . , . , . 4, . 3
 
 
 
 
 
 
ITShop
Windows 7 Office:
Microsoft
MSSQLServer
Delphi -
Adobe Photoshop:
 
   ITShop.ru  .. - Google!
 
 
 
 
 1 .. = 75.86 .
 
  :
 
 
 
 
  
, ,
 

16.08.2012 14:07

, . , . , - , . , .

[1] . Microsoft, 5.0 , , . MASM 5.0 Microsoft, , MASM 6.0-6.1.

, : 1 , - 64 . , , - . : , DS , DS. DS, .

, , , PUBLIC FAR. . , BP (Base Pointer - ), BP SP (Stack Pointer - ) BP . , N , k- [BP]+6+(N-k)*2.

:

_ [_]

. CALLS SEG , , .

( ):

1) ASMPROC Param1 Param2

ASMPROC Param1, Param2

2) ASMPROC 25 Param2

ASMPROC (25), BYVAL Param2

3) ASMPROC Param1 Param2

ASMPROC Param1, SEG Param2

4) ASMPROC

CALLS ASMPROC (Param1, Param2)

RET m ( m = N * 2, N - ).

, . , ; . , .

EQUAL, INTEGER ( -32768 +32767). . , , POKE, , .

.model medium,basic ;

;

;

.code ; MASM

PUBLIC EQUAL ; EQUAL

;

; ------------------ EQUAL ------------------

EQUAL proc far

push bp ; BP

mov bp,sp ; SP BP

push di ;

push es ; DI ES

mov bx,[bp]+12 ;

; BX

mov di,[bx] ;

; DI BX

mov bx,[bp]+10 ;

; BX

mov es,[bx] ;

; ES BX

mov bx,[bp]+8 ; pp CX

mov cx,[bx]

mov bx,[bp]+6 ;

mov ax,[bx] ; AX

cld ;

rep stosw ; CX

; AX

pop es ;

pop di ;

pop bp

ret 8 ;

EQUAL endp

; ------------------ EQUAL ------------------

END

, EQUAL.OBJ Quick, LINK.EXE. :

Object Modules [.OBJ]: /QU EQUAL <ENTER>

Run File [EQUAL.QLB]: <ENTER>

List File [NUL.MAP]: <ENTER>

Libraries [.LIB]: QBXQLB.LIB <ENTER>

Definitions File [NUL.DEF]: <ENTER>

QBXQLB.LIB Professional Basic 7.0-7.1, 4.0 BQLB40.LIB, 4.5 - BQLB45.LIB.

EQUAL.QLB, p /L EQUAL :

DECLARE SUB EQUAL (Offset%, Segment%, Size%, Value%)

DEFINT A-Z

DIM Array(1 TO 32767) AS INTEGER

Size = UBOUND(Array) - LBOUND(Array) + 1

DO

INPUT " "; Value

IF Value >= -32768 AND Value <= 32767 THEN

OK = -1

ELSE

OK = 0

PRINT " -32768 +32767"

END IF

LOOP UNTIL OK

EQUAL VARPTR(Array(1)), VARSEG(Array(1)), Size, Value

PRINT " "; Value

, : . , 0-65535,

- , 32767 - (.. , ). SADD, , . 32767, , .

, . , Value :

DEFINT A-Z

DIM Result AS LONG

. . . . .

DEF SEG '

'

POKE VARPTR(Result), PEEK(VARPTR(Value))

POKE VARPTR(Result) + 1, PEEK(VARPTR(Value) + 1)

Result LONG Value, .

, 32 . TPRINT.BAS , [2], Professional Basic 7.0-7.1. , , DPRINT.ASM, MASM 5.0, Quick : QBX/L DPRINT.

DECLARE SUB DPRINT (Size%,Ofs%,Segm%,r1%,c1%,r2%,c2%)

DEFINT A-Z

DIM Text AS STRING

LINE INPUT " (1-2000 ) "; Text

INPUT ", "; r1, c1

INPUT ", "; r2, c2

CLS

DPRINT LEN(Text), SADD(Text), SSEG(Text), r1, c1, r2, c2

END

; -----------------------------------------------------------------

; DPRINT () .., 1993

; ( QBX PDS 7.0-7.1)

; ----------------------------------------------------------------- .model medium,basic

.data

c1 dw ?

c2 dw ?

f dw ?

Len dw ?

multy db 160

r1 db ?

r2 db ?

.code

public DPRINT

; ----- pp p p -----

DPRINT proc far push bp

mov bp,sp

push di

push si

push es

pushf

push ds

;

mov bx,[bp]+18 ; Len

mov ax,[bx]

mov Len,ax

mov bx,[bp]+16 ; SI

mov si, [bx]

mov bx,[bp]+14 ; DX

mov dx,[bx]

mov bx,[bp]+12 ; r1 (p p p 1-25)

mov ax,[bx]

dec al ; r1 - 1

mov r1,al

mov bx,[bp]+10 ;c1 (p 1-80)

mov ax,[bx]

dec al ; c1 - 1

shl al,1 ; c1 2

mov c1,ax

mov bx,[bp]+8 ; r2

mov ax,[bx]

dec al ; r2 - 1

mov r2,al

mov bx,[bp]+6 ;c2

mov ax,[bx]

dec al ; c2 - 1

shl al,1 ; c2 2

mov c2,ax

mov ax,0B800h ; p ES

mov es,ax

sub ax,ax ; AX

mov bl,r1 ; BL - 1-

sub cx,cx ; p

cld

; 1-

St1: mov al,bl

mul multy ;BL160

push ax ; p p

add ax,c1

mov di,ax ; DI p

; p

pop ax ; AX

add ax,c2

mov f,ax ; f

; p

; 2-

;

St2: cmp cx,Len ; p

je Ex ; CX = Len, p

mov ds,dx ; DS p

movsb ; p

; p p

pop ds ; DS

push ds ;

inc cx ;

; p

inc di ;

cmp di,f ; p DI

; p

jbe St2 ; DI <= f, p

;

; 2-

inc bl ; 1-

cmp bl,r2 ; p BL r2

jbe St1 ; BL <= r2, p 1

; 1-

Ex: pop ds

popf

pop es

pop si

pop di

pop bp

ret 14

DPRINT endp

END

- ?

, 6.0

Professional Basic 7.0-7.1. PROC 6- . (, 6.0 , MASM

5.0 , , .) Professional Basic . FuncName - .

.model medium ;

;

; FuncName FuncName PROTO basic, Param1:PTR word, Param2:PTR word

.code

FuncName PROC basic, Param1:PTR word, Param2:PTR word

mov bx, word ptr Param1 ;Param1AX

mov ax,[bx]

mov bx, word ptr Param2 ;Param2CX

mov cx,[bx]

add ax,cx

ret ;

; AX

FuncName ENDP

END

: ML /C FUNCNAME.ASM ( ).

- :

DECLARE FUNCTION FuncName%(Param1%, Param2%)

, AX. ( LONG) AX:DX. , , Param1, :

.model medium

; FuncName FuncName PROTO basic, Param1:PTR word, Param2:PTR word

.data

buf dw ?

.code

FuncName PROC basic, Param1:PTR word, Param2:PTR word mov bx, word ptr Param1

mov buf,bx ; Param1

mov ax,[bx]

mov bx, word ptr Param2

mov cx,[bx]

add ax,cx

mov bx,buf

mov [bx],ax ;

; Param1

shr ax,1 ; AX 2

ret ;

; AX

FuncName ENDP

END

Param1 Param2

Param1, (Param1 + Param2) \ 2.

,

EGA, (/) .

EGA EGA, VGA, SVGA .

- CGA, MCGA, MDA, Hercules.

.model medium

EGA PROTO basic, Mono:PTR word, Mem:PTR word

.data

buf1 dw ?

buf2 dw ?

.code

; ------- -------

; ------ EGA, -----

EGA proc basic, Mono:PTR word, Mem:PTR word

mov si,word ptr Mono ; Mono

mov buf1,si

mov si,word ptr Mem ; Mem

mov buf2,si

xor ax,ax

mov es,ax

mov al,es:[463h]

cmp al,180 ; AL=180,

je @EgaMono ;

mov dx,0 ; - DX=0

jmp short @MonoSend

@EgaMono:

mov dx,-1 ; - DX=-1

@MonoSend:

mov si,buf1

mov [si],dx ; Mono

mov ah,12h

mov bl,10h

int 10h

cmp bl,10h ;BL<>10h,EGA-

je @NoEga ;BIOS

xor bh,bh

inc bl

mov cl,6

shl bx,cl

mov si,buf2

mov [si],bx ;Mem

mov ax,-1 ; EGA -

jmp short @ExEga

@NoEga:

mov ax,0 ; EGA -

@ExEga:

ret

EGA endp

END

EGA EasyWork-4

Professional Basic 7.0-7.1 ( PS- " ", Microsoft Basic). TRUE (-1), EGA FALSE (0), - . Mono TRUE (-1), , FALSE (0), - ; Mem EGA .

ABSOLUTE , , . ABSOLUTE :

1) , ;

2) , *.LST ;

3) *.LST PUSH BP MOV BP,SP RET;

4) POKE - , , Proc(0 TO

25) ABSOLUTE:

DEF SEG = VARSEG(Proc(0))

CALL ABSOLUTE ([_,] VARPTR(Proc(0)))

ABSOLUTE . , . , - . , .

' ------- -------

SUB KEYSOFF

' :

' PUSH BP ;&H55

' MOV BP,SP ;&H8B,&HEC

' CLI ;&HFA ( )

' SUB AX,AX ;&H2B,&HC0 ( AX)

' MOV ES,AX ;&H8E,&HC0

' MOV AL,ES:[41AH] ;&H26,&HA0,&H1A,&H04

' MOV ES:[41CH],AL ;&H26,&HA2,&H1C,&H04

' STI ;&HFB ( )

' POP BP ;&H5D

' RET ;&HCB

DIM KEYS(0 TO 9) AS INTEGER

KEYS(0) = -29867: KEYS(1) = -1300: KEYS(2) = -16341

KEYS(3) = -16242: KEYS(4) = -24538: KEYS(5) = 1050

KEYS(6) = -24026: KEYS(7) = 1052: KEYS(8) = 24059

KEYS(9) = 203

DEF SEG = VARSEG(KEYS(0))

CALL ABSOLUTE (VARPTR(KEYS(0)))

DEF SEG

END SUB

, :

DECLARE SUB KEYSOFF ()

:KEYSOFF

  
 
 
 
 
ICQ-
Skype-

-
 
"Atlassian JIRA - "
Microsoft Office 365 32-bit/x64. 5 /Mac + 5 + 5 . 1 .
Microsoft Windows 10 32-bit/64-bit. .
Microsoft Office 2019. .
"Oracle. SQL PL/SQL"
" TOGAF 9"
Microsoft Office 365 32-bit/x64. 1 /MAC + 1 + 1 . . 1 .
" BPMN 2.0. - "
ESET NOD32 Antivirus Business Edition
Corel CorelDRAW Home & Student Suite X8
 

- ITShop.ru .

- , - .

.

. , . . , -, . - - .



 

 




 

 




-
 

 

Interface Ltd.

 
Interface.ru   ITShop.ru   Interface.ru/training   Olap.ru   ITnews.ru  
 

119334, . , . , . 4, . 3
+7 (495) 229-0436   shopadmin@itshop.ru
© "Interface Ltd."
1990