01659@AECLCR.BITNET (Greg Csullog) (01/09/89)
CONTROL.ACC has the following dialog box to configure the ST for
printing:
-------------------
PRINTER TYPE: DOT DAISY
COLOR: B/W COLOR
PIXELS/LINE 1280 960
QUALITY DRAFT FINAL
PRINTER PORT PRINTER MODEM
PAPER TYPE FEED SINGLE
-------------------
All choices in the left column have a bit setting of 0, all on the
right have a setting of 1. Therefore, for example, 960 pixels/
line and a single sheet printer would have a register value of
001001 (this is the format used in DESKTOP.INF) or decimal 36. I
wrote the following program to check the value of the printer
configuration register - I tried setting the printer using
CONTROL.ACC and after each setting, ran the program. Everything
checked out, all settings were properly reported.
{***************************************************************}
PROGRAM set_prn ;
VAR
cfg : integer;
result : integer;
dummy : integer;
FUNCTION setprt(VAR config:integer):integer;XBIOS(33);
BEGIN
cfg := -1; {value of -1 = report status}
result := setprt(cfg);
writeln('Status:');
writeln(result);
read(dummy); {wait for keyboard input to quit}
END.
{***************************************************************}
When I added the following two lines to the program (just before
the request to check status) that is when things got really weird:
cfg := $0004;
result := setprt(cfg);
I should have been able to set the value to 4 and had 4 reported
back in the status request. However, I got 3 as the value if I ran
the code from inside the PASCAL shell. From desktop, or from the
AUTO folder, the status reported back as 2!!!! I cannot figure out
what is going on; anyone have an idea? (for the checks, no desk
accessories were installed).
Thanks to Juergen Lanzki for forwarding a binary to set the printer
for me. Juergen, do you have any idea why my Pascal code is giving me
these strange status reports for the printer configuration?????