Post Reply 
Undocumented card reader function?
07-02-2024, 11:19 AM
Post: #2
RE: Undocumented card reader function?
I got a hint from Mike, that the instruction is mentioned in the Zenrom Manual (p 127).
That manual indicates that the instruction checks if a card is inserted ("Fetch Card IN Flag").

Then the code would be interpreted like this:

Code:
 EBE0 2E53B0                GSUBNC  ECB9           Select CardReader
 EBE2 028                   REGN=C  0              End write cycle
 EBE3 0A8                   REGN=C  2              End read cycle

 EBE4 328                   REGN=C  12             Set card trip flag

 EBE5 268                   REGN=C  9              Is card inserted? (TBD)
 EBE6 32C                   ?CDRD                  CardReader interrupt flag?
 EBE7 03B                   GONC    +7  EBEE       No card, lets continue ...
 EBE8 226                   C=C+1   X              Increment timeout value
 EBE9 02F                   GOC     +5  EBEE       Continue if timeout (after 3843 loops)
 EBEA 160                   ?LLD                   Set flag on Low Bat
 EBEB 3CF                   GOC     -7  EBE4
 EBEC 368                   REGN=C  13             Test and clear card trip flag
 EBED 3C3                   GONC    -8  EBE5       Try again ...

 EBEE 328                   REGN=C  12             Set card trip flag

 EBEF 268                   REGN=C  9              Is card inserted? (TBD)
 EBF0 32C                   ?CDRD                  CardReader interrupt flag?
 EBF1 3F7                   GOC     -2  EBEF       Loop forever while card is inserted ...

That makes a little more sens ...

* Wait until a card is inserted with a timeout (EBE5-EBED).
* Set card trip flag.
* Then wait while card is inserted.


Looking at the two lists, there are some differences (e.g. instruction 328 and 368).
The Zenrom list looks a little bit more likely and closer to the real thing.

Code:
Inst| Mnemonic from Zenrom Manual               | Programmers Handbook
----+---------+---------------------------------+---------------------------------------------
028 | ENDWRIT | End write cycle                 | end write cycle
068 | STWRIT  | Start write cycle               | start write cycle when motor is running
0A8 | ENDREAD | End read cycle                  | end read cycle
0E8 | STREAD  | Start read cycle                | set read mode
168 | CRDWPF  | Fetch CaRD Write Protect Flag   | set CardReader interrupt flag if card is write protected
1E8 | CRDOHF  | Fetch CaRD Over Head Flag       | set CardReader interrupt flag if there is a card and the motor is running
268 | CRDINF  | Fetch Card IN Flag              | (missing)
2E8 | TSTBUF  | TeST card read BUFfer           | read mode: clears interrupt flag if a record can be read
2E8 | TSTBUF  | TeST card write BUFfer          | write mode: sets interrupt flag if a record can be written to buffer
328 | SETCTF  | SET Card Trip Flag              | stop the motor
368 | TCLCTF  | Test and CLear Card Trip Flag   | start the motor
3E8 | CRDEXF  | Fetch CaRD reader EXternal Flag | set CardReader interrupt flag if the CardReader external flag is set
----+---------+---------------------------------+---------------------------------------------

I will try to map the flags to the actual switches and sensors in the reader, maybe it will make more sense.

Anyone else who have some more info on these instructions?

Cheers,
Thomas

[35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Undocumented card reader function? - ThomasF - 07-02-2024 11:19 AM



User(s) browsing this thread: 1 Guest(s)