home *** CD-ROM | disk | FTP | other *** search
-
-
- IDEAL
- %pagesize 56,120
- MODEL LARGE
- P386
- STRUC descSTRUCTURE ;global descriptor table entry
- seglim dw ? ;max size of the segment
- loaddr dw ? ;24-bits of address little-endian
- hiaddr db ?
- axright db ? ;access rights must be 93h
- res0 dw ? ;reserved - must be zero
- ENDS
-
- stack
- DB 512 DUP (?)
-
- dataseg
- label GDT descstructure ;User supplied partially filled-in GDT
- descstructure <0,0,0,0,0> ;dummy - must be zeros
- descstructure <0,0,0,0,0> ;descriptor of this GDT - must be zero
- label movesource descstructure
- descstructure <0ffffh,0,0,0,0> ;descriptor of source block
- label movedest descstructure
- descstructure <0ffffh,0,0,0,0> ;descriptor of destination block
- descstructure <0,0,0,0,0> ;BIOS will modify to Protected code seg
- DESCSTRUCTURE <0,0,0,0,0> ;BIOS will modify to Protected stk seg
-
- POSTER DB 0
- COUNTER DW 0
-
- FILL DB 2400 DUP (0AAH) ;move this to FELL
- FELL DB 2400 DUP (055H)
-
- MACRO MAKE_24_BIT_ADDR SEGVAL, OFSET, MEG
- MOV AX,MEG
- MOV CX,SEGVAL
- REPT 4
- SHL CX,1
- RCL AX,1
- ENDM
- ADD CX,offset OFSET
- ADC AL,0 ;fixup if carry out of 16 bits
- ENDM
-
- codeseg
- proc start near
- cld ;string direction
- mov ax,dgroup ;init data seg
- MOV DS,AX
- make_24_bit_addr ds, fill, 0 ;test pattern
- MOV [MOVESOURCE.LOADDR],CX ;addr goes into GDT entry for
- MOV [MOVESOURCE.HIADDR],AL ; source
-
- make_24_bit_addr ds, fell, 0 ;address target area
- MOV [MOVEdest.LOADDR],CX
- MOV [MOVEdest.HIADDR],AL
- MOV [MOVEsource.axright],93h;tell 80x86 protection it's ok
- MOV AX,DS ;point ES:SI to our GDT
- MOV ES,AX
- MOV SI,OFFSET GDT
- MOV AH,87H ;request function 87h
- MOV CX,1200 ;how many WORDS to move
- INT 15H
-
- MOV AH,4CH ;terminate program
- INT 21H
- ENDP
-
- end start
-
-