home *** CD-ROM | disk | FTP | other *** search
- { Qpage.inc - procedures for changing pages ver 3.0, 08-31-87 }
- { These procedures are only needed if you intend to use more than one page. }
-
- { QviewPage - changes the page to be displayed ver 3.0, 08-31-87 }
- procedure QviewPage (Page: byte);
- begin
- Inline( {Assembly by Inline 08/17/87 16:54}
- $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.}
- $85/$C0/ { test ax,ax ;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 3.0, 08-31-87 }
- { All Q procedures 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( {Assembly by Inline 08/17/87 16:54}
- $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.}
- $85/$C0/ { test ax,ax ;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/ { es: ;Segment override}
- $F7/$26/$4C/$04/ { 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 procs}
- ); {Exit:}
- end;