===========================================================================
| 127 | |
| 128 | //=========================================================================== |
| 129 | BYTE __stdcall ParallelPrinterCard::IOWrite(WORD, WORD address, BYTE, BYTE value, ULONG) |
| 130 | { |
| 131 | UINT slot = ((address & 0xff) >> 4) - 8; |
| 132 | ParallelPrinterCard* card = (ParallelPrinterCard*)MemGetSlotParameters(slot); |
| 133 | |
| 134 | if (!card->CheckPrint()) |
| 135 | return 0; |
| 136 | |
| 137 | // only allow writes to the load output port (i.e., $C090) |
| 138 | if ((address & 0xF) != 0) |
| 139 | return 0; |
| 140 | |
| 141 | BYTE c = value & 0x7F; |
| 142 | |
| 143 | if (IsPravets(GetApple2Type())) |
| 144 | { |
| 145 | if (card->m_bConvertEncoding) |
| 146 | c = GetPravets().ConvertToPrinterChar(value); |
| 147 | } |
| 148 | |
| 149 | if ((card->m_bFilterUnprintable == false) || (c>31) || (c==13) || (c==10) || (c>0x7F)) //c>0x7F is needed for cyrillic characters |
| 150 | fwrite(&c, 1, 1, card->m_file); |
| 151 | |
| 152 | return 0; |
| 153 | } |
| 154 | |
| 155 | //=========================================================================== |
| 156 |
nothing calls this directly
no test coverage detected