home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
lib4a86
/
lib
/
mengen.lib
< prev
next >
Wrap
Text File
|
1992-02-12
|
3KB
|
173 lines
#IF !LIB4A86
#ELSE
#IF !INTERN_LIB4A86_S
INTERN_LIB4A86_S EQU 01
JMP START
#ENDIF
#ENDIF
DEFINIEREMENGE MACRO
#1 DW 16XD DUP 0
#EM
MENGE_DER_GROSSBUCHSTABEN DW 0000H, 0000H, 0000H, 0000H
DW 0FFFEH, 07FFH, 0000H, 0000H
DW 4000H, 0600H, 0000H, 0000H
DW 0000H, 0000H, 0002H, 0000H
MENGE_DER_KLEINBUCHSTABEN DW 0000H, 0000H, 0000H, 0000H
DW 0000H, 0000H, 0FFFEH, 07FFH
DW 0012H, 0010H, 0000H, 0000H
DW 0000H, 0000H, 0002H, 0000H
MENGE_DER_BUCHSTABEN DW 0000H, 0000H, 0000H, 0000H
DW 0FFFEH, 07FFH, 0FFFEH, 07FFH
DW 4012H, 0610H, 0000H, 0000H
DW 0000H, 0000H, 0002H, 0000H
BILDE_MENGE:
PUSH DI
CALL LOESCHE_MENGE
XOR CH,CH
JCXZ >L2
L1:
MOV AL,ES:[DI]
INC DI
CALL ADD_ELEMENT
LOOP L1
L2:
POP DI
RET
ELEMENT_VORHANDEN?:
MOV AH,-1
JMP >L1
ADD_ELEMENT:
MOV AH,01
JMP >L1
SUB_ELEMENT:
MOV AH,0
L1:
PUSH DX
PUSH BX,CX
MOV DH,AH
XOR AH,AH
MOV CL,8
DIV CL
ADD BL,AL
ADC BH,0
MOV AL,DS:[BX]
MOV CL,AH
MOV DL,01H
SHL DL,CL
OR DH,DH
JG >L1
JL >L2
XOR DL,0FFH
AND DS:[BX],DL
JMP >L9
L1:
OR DS:[BX],DL
JMP >L9
L2:
TEST DS:[BX],DL
L9:
POP CX,BX
POP DX
RET
LOESCHE_MENGE:
MOV AL,INTERN_LOESCHEO
JMP >L1
KOPIERE_MENGE:
MOV AL,INTERN_KOPIEREO
JMP >L1
CARD_MENGE:
MOV AL,INTERN_CARDO
JMP >L1
NEGIERE_MENGE:
MOV AL,INTERN_NEGIEREO
JMP >L1
VEREINIGE_MENGEN:
MOV AL,INTERN_VEREINIGEO
JMP >L1
SCHNEIDE_MENGEN:
MOV AL,INTERN_SCHNEIDEO
JMP >L1
XOR_MENGEN:
MOV AL,INTERN_XORO
L1:
PUSH BX,CX,DX,SI,DI
MOV SI,BX
CBW
ADD AX,OFFSET INTERN_MENGENBASIS
MOV BX,AX
XOR DX,DX
MOV CX,010H
CLD
L1:
LODSW
CALL BX
INC DI,2
LOOP L1
POP DI,SI,DX,CX,BX
RET
INTERN_MENGENBASIS LABEL BYTE
INTERN_LOESCHE:
MOV W DS:[SI-2],DX
RET
INTERN_VEREINIGE:
OR ES:[DI],AX
RET
INTERN_SCHNEIDE:
AND ES:[DI],AX
RET
INTERN_XOR:
XOR ES:[DI],AX
RET
INTERN_NEGIERE:
XOR AX,0FFFFH
INTERN_KOPIERE:
MOV ES:[DI],AX
RET
INTERN_CARD:
PUSH CX
MOV CX,010H
L1:
SHR AX,1
ADC DX,0
LOOP L1
MOV AX,DX
POP CX
RET
INTERN_CARDO EQU (OFFSET INTERN_CARD - OFFSET INTERN_MENGENBASIS)
INTERN_KOPIEREO EQU (OFFSET INTERN_KOPIERE - OFFSET INTERN_MENGENBASIS)
INTERN_NEGIEREO EQU (OFFSET INTERN_NEGIERE - OFFSET INTERN_MENGENBASIS)
INTERN_XORO EQU (OFFSET INTERN_XOR - OFFSET INTERN_MENGENBASIS)
INTERN_SCHNEIDEO EQU (OFFSET INTERN_SCHNEIDE - OFFSET INTERN_MENGENBASIS)
INTERN_VEREINIGEO EQU (OFFSET INTERN_VEREINIGE - OFFSET INTERN_MENGENBASIS)
INTERN_LOESCHEO EQU (OFFSET INTERN_LOESCHE - OFFSET INTERN_MENGENBASIS)
#IF !INTERN_CMARK0
INTERN_CMARK0 EQU 01H
INTERN_CMARK1:
PUSH BP
MOV BP,SP
MOV BX,06H
SUB CH,[BP+SI]
SUB AH,[BX+SI]
DEC SP
DEC CX
INC DX
XOR AL,041H
CMP B[02820H],DH
INC BX
SUB W[BX+SI],SP
INC DX
CS AND B[BP+DI+043H],DL
DEC AX
INC BP
DEC BP
DEC BP
INC BP
PUSH DX
AND B[BP+SI],CH
SUB CH,[BP+SI]
POP DX
MOV SP,BP
POP BP
RET
#ENDIF