home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April (Special)
/
Chip-Special_1997-04_cd.bin
/
canon
/
bj364
/
bj364d1.exe
/
BJL.BIN
/
SOURCE.ZIP
/
BJSETUP.H
< prev
next >
Wrap
Text File
|
1996-04-19
|
10KB
|
221 lines
// ========================================================================================
// BJ Printer Setup Utility Program
// DOS Base
// BJ Printer (such as the A250 and A5311)
//
// 1. Version 1.00 [August 18, '95] : Tsukasa Jackie AIBA : created new
// 2. Version 1.01 [September 21, '95] : Tsukasa Jackie AIBA : added A240
// 3. Version 1.02 [September 26, '95] : Tsukasa Jackie AIBA : added mono display
// 4. Version 1.03 [March 8, '96] : Tsukasa Jackie AIBA : added MultiPASS C2500
// 5. Version 1.10 [April 30, '96] : Tsukasa Jackie AIBA : Added BJC-80/240/4200/4550
//
// Copyright Canon Information Systems, Inc. 1995, 1996
// ========================================================================================
// ***********************************************************************
// define global macro
// ***********************************************************************
#define BJC4100 1
#define BJC210 2
#define BJC80 3
#define BJC240 4
#define BJC4200 5
#define BJC4550 6
#define MPC2500 20
#define MPC30 21
#define B380IF 22
#define INI_FILE "bjl.reg"
#define SVGA_COLOR 2 // Special
#define BW_COLOR 1 // Black & White
#define CO_COLOR 0 // Color
#define BK_CHAR 0xB0 // 0xB2 : background pattern
#define BK_COLOR1 0x07 // 0x03 : background
#define BK_COLOR2 0x08 // 0x01 : shadow
#define BK_COLOR3 0x08 // 0x01 : shadow2
#define WHITE_RED 0x47
#define RED_WHITE 0x74
#define WHITE_CYAN 0x37
#define CYAN_WHITE 0x73
#define WHITE_BLUE 0x17
#define BLUE_WHITE 0x71
#define WHITE_GRAY 0x87
#define GRAY_WHITE 0x78
#define GRAY_BLUE 0x38
#define BLUE_GRAY 0x83
#define GRAY_CYAN 0xB8
#define CYAN_GRAY 0x8B
#define GRAY_YELLOW 0xE8
#define YELLOW_GRAY 0x8E
#define BLACK_GRAY 0x80
#define GRAY_BLACK 0x08
#define BLACK_RED 0x40
#define RED_BLACK 0x04
#define BLACK_WHITE2 0xF0
#define WHITE2_BLACK 0x0F
#define GRAY_WHITE2 0xF8
#define WHITE2_GRAY 0x8F
#define WHITE_BLACK 0x07
#define BLACK_WHITE 0x70
#define BLACK_CYAN 0x30
#define CYAN_BLACK 0x03
#define BLACK_GREEN 0x20
#define GREEN_BLACK 0x02
#define BLACK_BLUE 0x10
#define BLUE_BLACK 0x01
#define BLACK_MAGENTA 0x50
#define MAGENTA_BLACK 0x05
#define BLACK_BROWN 0x60
#define BROWN_BLACK 0x06
#define BLACK_YELLOW 0xE0
#define YELLOW_BLACK 0x0E
#define GRAY_GREEN 0xA8
#define GREEN_GRAY 0x8A
#define WHITE_GREEN 0x27
#define GREEN_WHITE 0x72
#define BLACK_LCYAN 0xB0
#define LCYAN_BLACK 0x0B
#define EXIT_KEY 201
#define STATUS_KEY 202
#define SEND_KEY 203
#define DEFAULT_KEY 204
#define ABOUT_KEY 205
#define HELP_USE_KEY 206
#define PRINTER 6
#define MODE 7
#define OPEN 8
#define SAVE 9
#define DELETE 10
#define QUIT 11
#define HE1 12
#define HE2 13
#define HE3 14
#define HE4 15
#define HE5 16
#define HE6 17
#define HE7 18
#define HE8 19
#define HE9 20
#define HE0 21
#define OKAY 24
#define CANCEL 25
#define PNG 100
#define P1A 101
#define P2A 102
#define P3A 103
#define P4A 104
#define P4B 105
#define P4C 106
#define P5A 107
#define P5B 108
#define P5C 109
#define P5D 110
#define P5E 111
#define P6A 112
#define P7A 113
#define P8A 150
#define P8B 151
#define P9A 115
#define P9B 116
#define P9C 117
#define P9D 118
#define P9E 119
#define P9F 120
#define P0A 121
#define P0B 122
#define PRINTER_STR "6"
#define MODE_STR "7"
#define OPEN_STR "8"
#define SAVE_STR "9"
#define DELETE_STR "10"
#define QUIT_STR "11"
#define OKAY_STR "24"
#define CANCEL_STR "25"
#define FILE_ERROR -1 // _open() error
#define LPT1 0 // printer port LPT1:
#define LPT2 1 // printer port LPT2:
#define _WRITE _PRINTER_WRITE // Printer function desired service (output)
#define _INIT _PRINTER_INIT // Printer function desired service (reset)
#define _STATUS _PRINTER_STATUS // Printer function desired service (status)
#define PRINTER_TIME_OUT 0x0001 // Printer timed out
#define PRINTER_NOT_USED1 0x0002 // Not used
#define PRINTER_NOT_USED2 0x0004 // Not used
#define PRINTER_I_O_ERROR 0x0008 // I/O error
#define PRINTER_SELECTED 0x0010 // Printer selected
#define PRINTER_OUT_OF_PAPER 0x0020 // Out of paper
#define PRINTER_ACKNOWLEDGE 0x0040 // Acknowledge
#define PRINTER_NOT_BUSY 0x0080 // Printer not busy
#define PRINTER_NO_ERROR 0x0000 // No error
#define WIN4_MENU 51 // Number of Window 4's menu
#define WIN4_MENU_W 20 // Number of Window 4's menu
#define WIN4_BUFF WIN4_MENU*WIN4_MENU_W // Number of Window 4's data buffer
#define PRINTER_NAME 22 // choice[22][0] = printer name
// ***********************************************************************
int colors, a240, reduction, printerID, printer_old, mode;
static struct hv_struct hvd = { -1, -1, -1, -1, 0x07, bd_cua };
FILE *fp_help;
sed_type window_0, window_1, window_2, window_3, window_4, window_5, win_20, win_21; //
unsigned char choice[WIN4_MENU][WIN4_MENU_W];
unsigned char choice_old;
unsigned int port;
sed_type sedlist[4];
// ***********************************************************************
// ---------------------------------------------------- bjl_dos.c
extern spc_func (spc_Jump);
void StartCheck (void);
int ChoiceDataInitial (void);
int iniFileWrite (void);
int EndDisplay (void);
int InitError (void);
int MenuBar0 (VOID *sdata, int idata);
int MenuBar1 (VOID *sdata, int idata);
int MenuBar2 (VOID *sdata, int idata);
int MenuBar3 (VOID *sdata, int idata);
int MenuBar4 (VOID *sdata, int idata);
int MenuBar5 (VOID *sdata, int idata);
extern unsigned int _bios_printer (unsigned int, unsigned int, unsigned int);
void CommandOutput (unsigned char *,unsigned int,unsigned int,unsigned int);
void Win2_PopUp (sed_type sed);
void Win2_PopUp_Printer (sed_type sed);
void Win3_PopUp (sed_type sed);
int ModeSet (VOID *sdata, int idata);
int PrinterSet (VOID *sdata, int idata);
int SelectDisplay (VOID *sdata, int idata);
int PrinterCheck (int check);
void Win2_Menu_Sub (void);
void Win2_Menu_Main (void);
int Win3_Menu_Printer (void);
int Win4_Menu (int first);
int ConfirmDelete (char *file);
void PrinterIDNumber (void);
void PrinterName (void);
void EndHelpFile (void);