Skip to content

Commit c04170d

Browse files
committed
implement first pass of printer.
1 parent bffbed8 commit c04170d

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

printer/commands.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include <string.h>
77
#include <dos.h>
88

9-
#undef DEBUG
10-
119
extern void End_code(void);
1210

1311
static cmdFrame_t cmd; // FIXME - make this shared with init.c?
@@ -49,7 +47,14 @@ uint16_t Input_flush_cmd(SYSREQ far *req)
4947

5048
uint16_t Output_cmd(SYSREQ far *req)
5149
{
52-
return UNKNOWN_CMD;
50+
char c;
51+
cmd.device = 0x40;
52+
cmd.comnd = 'W';
53+
c=req->io.buffer_ptr[0];
54+
if (fujicom_command_write(&cmd,&c,1) != 'C')
55+
return ERROR_BIT | NOT_READY;
56+
57+
return OP_COMPLETE;
5358
}
5459

5560
uint16_t Output_verify_cmd(SYSREQ far *req)
@@ -59,7 +64,7 @@ uint16_t Output_verify_cmd(SYSREQ far *req)
5964

6065
uint16_t Output_status_cmd(SYSREQ far *req)
6166
{
62-
return UNKNOWN_CMD;
67+
return OP_COMPLETE;
6368
}
6469

6570
uint16_t Output_flush_cmd(SYSREQ far *req)
@@ -74,12 +79,12 @@ uint16_t Ioctl_output_cmd(SYSREQ far *req)
7479

7580
uint16_t Dev_open_cmd(SYSREQ far *req)
7681
{
77-
return UNKNOWN_CMD;
82+
return OP_COMPLETE;
7883
}
7984

8085
uint16_t Dev_close_cmd(SYSREQ far *req)
8186
{
82-
return UNKNOWN_CMD;
87+
return OP_COMPLETE;
8388
}
8489

8590
uint16_t Remove_media_cmd(SYSREQ far *req)

printer/header.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ _sys_hdr_ label near
2525
extrn Interrupt_:near
2626

2727
dd -1
28-
dw 2002h
28+
dw 8000h
2929
dw Strategy_
3030
dw Interrupt_
31-
db 8, 0, 0, 0, 0, 0, 0, 0
31+
db 'P', 'R', 'N', ' ', ' ', ' ', ' ', ' '
3232

3333
_SYS_HEADER ends
3434

0 commit comments

Comments
 (0)