home *** CD-ROM | disk | FTP | other *** search
- { Qpage.inc - procedures for changing pages ver 2.0, 11-24-86 }
- { These procedures are only needed if you intend to use more than one page. }
-
- { QviewPage - changes the page to be displayed ver 2.0, 11-24-86 }
- procedure QviewPage (Page: byte);
- begin
- Inline(
- $8B/$46/<PAGE { MOV AX,[BP+<Page] ;Move new page number}
- /$38/$06/>MAXPAGE { CMP [>MaxPage],AL ;If page>MaxPage ...}
- /$78/$08 { JS Exit ; exit.}
- /$84/$C0 { TEST AL,AL ;If page<0 ...}
- /$78/$04 { JS Exit ; exit.}
- /$B4/$05 { MOV AH,$05 ;To select page}
- /$CD/$10 { INT $10 ;Change view page}
- {Exit:}
- );
- end;
-
- { QwritePage - changes the page to be written by Q ver 2.0, 11-24-86 }
- { All Q utilities only write to the page defined by this procedure. The
- default is page 0 and you should usually end your programs on page 0. }
- procedure QwritePage (Page: byte);
- begin
- Inline(
- $8B/$46/<PAGE { MOV AX,[BP+<Page] ;Move new page number}
- /$38/$06/>MAXPAGE { CMP [>MaxPage],AL ;If page>MaxPage ...}
- /$78/$18 { JS Exit ; exit.}
- /$84/$C0 { TEST AL,AL ;If page<0 ...}
- /$78/$14 { JS Exit ; exit.}
- /$31/$C9 { XOR CX,CX ;Set CX=0}
- /$8E/$C1 { MOV ES,CX ;Set ES=0}
- /$26/$F7/$26/$4C/$04 { ES: MUL WO[$044C] ;AX*(bytes/page)}
- /$B1/$04 { MOV CL,$04 ;Set counter}
- /$D3/$E8 { SHR AX,CL ;Divide AX by 16}
- /$03/$06/>PAGE0SEG { ADD AX,[>Page0seg] ;Add display segment}
- /$A3/>QSEG { MOV [>Qseg],AX ;Segment for Q utils}
- {Exit:}
- );
- end;
-