Mudanças entre as edições de "Painel Banctec 91690"

De Garoa Hacker Clube
Ir para navegação Ir para pesquisar
Linha 38: Linha 38:
   
 
Documentação menciona TTL PROM 2048 x8. Etiqueta do que parece ser a EPROM tem escrito o código 0111-004.
 
Documentação menciona TTL PROM 2048 x8. Etiqueta do que parece ser a EPROM tem escrito o código 0111-004.
 
   
 
No esquemático o chip está identificado como dm87s191
 
No esquemático o chip está identificado como dm87s191
   
  +
===Datasheet DM87s191 ===
 
Datasheet DM87s191 - 2K x 8 TTL PROM Memory - DIP 24 pinos [[Arquivo:DM87S191.pdf]]
 
Datasheet DM87s191 - 2K x 8 TTL PROM Memory - DIP 24 pinos [[Arquivo:DM87S191.pdf]]
   
*Pinagem
+
===Pinagem DM87s191 ===
**24 - Vcc
+
*24 - Vcc
**23 - A8
+
*23 - A8
**22 - A9
+
*22 - A9
**21 - A10 (MSB)
+
*21 - A10 (MSB)
**20 - !CE1
+
*20 - !CE1
**19 - CE2
+
*19 - CE2
**18 - CE3
+
*18 - CE3
**17 - DO7 (MSB)
+
*17 - DO7 (MSB)
**16 - DO6
+
*16 - DO6
**15 - DO5
+
*15 - DO5
**14 - DO4
+
*14 - DO4
**13 - DO3
+
*13 - DO3
**12 - GND
+
*12 - GND
**11 - DO2
+
*11 - DO2
**10 - DO1
+
*10 - DO1
**09 - DO0 (LSB)
+
*09 - DO0 (LSB)
**08 - A0 (LSB)
+
*08 - A0 (LSB)
**07 - A1
+
*07 - A1
**06 - A2
+
*06 - A2
**05 - A3
+
*05 - A3
**04 - A4
+
*04 - A4
**03 - A5
+
*03 - A5
**02 - A6
+
*02 - A6
**01 - A7
+
*01 - A7
   
 
<strike>'''Próximos passos:''' Fazer dump da EPROM, rodar um disassembler e analisar o código para tentar entender como o painel processa e exibe os dados.</strike>
 
<strike>'''Próximos passos:''' Fazer dump da EPROM, rodar um disassembler e analisar o código para tentar entender como o painel processa e exibe os dados.</strike>

Edição das 20h36min de 26 de setembro de 2012

O Garoa recebeu como doação o Painel de operação de uma classificadora de cheques, marca Banctec modelo 91690, que foi aposentada em 2011.

Pretendemos reutilizar o Painel no Garoa e para isso vamos fazer engenharia reversa no equipamento.

PAINEL 91690.JPG


O Painel

É composto por um display de 7 linhas por 40 colunas, com dois botões (FEED, STOP) e um teclado numérico com algumas teclas adicionais (A,B,C,D,E,F,DO,CHG,CLR,EX).

Documentação

Temos também boa parte da documentação de manutenção da máquina na qual o painel era utilizado.

Arquivo:PAINEL BANCTEC 91690.PDF

Quando

A idéia é trabalhar no painel durante o evento Eletrônica com Carinho que acontece às segundas-feiras, às 19h 30min.


Histórico de Atividades

Esta página será utilizada para registrar o progresso das atividades.

27/08/2012

O painel foi desmontado e tiramos fotos de todas as placas.

Revisamos a documentação e localizamos o esquemático das placas que compõem o painel.

Próximo passo: Fazer dump da EPROM para tentar entender como o painel processa e exibe os dados.

06/Set/2012

Tentando descobrir qual o modelo de EPROM usado.

Documentação menciona TTL PROM 2048 x8. Etiqueta do que parece ser a EPROM tem escrito o código 0111-004.

No esquemático o chip está identificado como dm87s191

Datasheet DM87s191

Datasheet DM87s191 - 2K x 8 TTL PROM Memory - DIP 24 pinos Arquivo:DM87S191.pdf

Pinagem DM87s191

  • 24 - Vcc
  • 23 - A8
  • 22 - A9
  • 21 - A10 (MSB)
  • 20 - !CE1
  • 19 - CE2
  • 18 - CE3
  • 17 - DO7 (MSB)
  • 16 - DO6
  • 15 - DO5
  • 14 - DO4
  • 13 - DO3
  • 12 - GND
  • 11 - DO2
  • 10 - DO1
  • 09 - DO0 (LSB)
  • 08 - A0 (LSB)
  • 07 - A1
  • 06 - A2
  • 05 - A3
  • 04 - A4
  • 03 - A5
  • 02 - A6
  • 01 - A7

Próximos passos: Fazer dump da EPROM, rodar um disassembler e analisar o código para tentar entender como o painel processa e exibe os dados.

21/Set/2012

Dump da EPROM efetuado

Foram utilizados dois CI SN74393N - Dual 4-bit counter para passar os endereços para a EPROM (11 bits) e um arduino para ler os dados (8 bits por endereço).

DUMP da EPROM (dm87s191)

0      02 00 26 FF FF FF FF FF FF FF FF 02 01 80 FF FF
10     FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
20     FF FF FF 02 02 CA 75 D0 00 75 90 D4 78 01 76 AA
30     B6 AA FD 08 B8 80 F7 78 01 76 55 B6 55 FD 08 B8
40     50 F7 78 00 76 00 08 B8 80 FA 75 81 10 75 2C 01
50     75 2D FE 79 74 78 74 75 D0 08 79 30 78 30 D2 7F
60     90 40 00 E0 F5 2E 75 89 21 75 8D FD 75 8B FD 75
70     8C F0 75 8A 00 75 B8 02 00 00 00 75 98 70 75 88
80     50 75 A8 92 D2 95 D2 94 C2 94 12 00 92 12 01 6A
90     80 F8 30 B3 6E 75 D0 08 E9 98 60 67 E6 08 B8 74
A0     02 78 30 B4 0D 02 80 65 B4 0A 02 80 5C B4 0E 02
B0     80 7E B4 0C 02 80 5B B4 11 02 80 7E B4 13 02 80
C0     77 B4 14 02 80 62 B4 15 02 80 61 B4 08 02 80 35
D0     B4 17 02 80 14 B4 87 13 C0 D0 75 D0 00 F7 09 B9
E0     80 02 79 74 D0 D0 02 01 68 74 87 AD 2B BD 20 02
F0     80 76 05 2B 90 20 00 F0 7F 50 DF FE D2 91 20 B3
100    FD C2 91 80 63 15 2B 80 47 05 2A 80 43 75 2B 00
110    80 3E 75 2B 00 75 2A 00 D2 93 7F 50 DF FE C2 93
120    20 B3 FD 30 B3 FD 80 40 D2 92 80 3C C2 92 80 38
130    75 2B 00 75 2A 00 80 18 D2 7D E9 98 60 FC E6 30
140    7D 06 F5 2A C2 7D 80 02 F5 2B 08 B8 74 02 78 30
150    75 F0 20 E5 2A A4 25 2B 90 20 00 F0 7F 50 DF FE
160    D2 90 7F 50 DF FE C2 90 00 22 30 7F 12 75 D0 00
170    E9 98 60 0B E6 F5 99 C2 7F 08 B8 80 02 78 74 22
180    C0 D0 C0 E0 C0 F0 C0 82 C0 83 75 D0 00 D2 94 C2
190    94 75 8C F0 75 8A 00 75 83 10 E5 2C FE F5 82 E0
1A0    54 07 B4 07 2A 20 7E 02 80 1F 05 2D AD 2D BD 00
1B0    66 C2 7E 75 2D FE 20 7B 06 20 7C 0B 02 02 A6 C2
1C0    7B 75 28 88 02 02 A6 C2 7C 75 2D FE 02 02 B5 30
1D0    7E 37 75 2D FE C0 82 75 82 01 E0 D0 82 54 07 B4
1E0    00 06 74 84 F5 28 C2 7C E5 28 B4 80 03 02 02 58
1F0    B4 84 08 20 7B 10 D2 7B 02 02 A6 B4 85 08 20 7C
200    05 D2 7C 02 02 A6 02 02 BF 05 2D AD 2D BD 00 3D
210    BE 01 07 24 02 80 13 02 02 B5 BE 02 04 24 0A 80
220    09 BE 04 04 24 12 80 02 24 1A 83 80 26 84 85 31
230    34 37 30 80 00 00 00 32 35 38 46 81 00 00 00 33
240    36 39 45 82 00 00 00 41 42 43 44 83 00 02 02 BF
250    02 01 9C D2 7E 02 02 A2 C0 82 75 82 08 E0 D0 82
260    54 07 B4 06 5A C0 82 C0 83 C0 D0 75 D0 08 12 01
270    12 74 FE 12 00 F4 D2 94 C2 94 D5 29 F6 30 8D FD
280    C2 8D D2 94 C2 94 75 8C F0 75 8A 00 05 29 E5 29
290    B4 00 EA 12 01 12 74 86 D0 D0 D0 83 D0 82 80 02
2A0    74 80 F5 28 80 19 E5 28 F7 09 B9 80 02 79 74 20
2B0    7B 0D 20 7C 0A EE 23 F5 2C BE 10 94 75 2C 01 D0
2C0    83 D0 82 D0 F0 D0 E0 D0 D0 32 C0 D0 C0 E0 C0 F0
2D0    C0 82 C0 83 75 D0 08 30 99 06 C2 99 D2 7F 80 0B
2E0    C2 98 E5 99 F7 09 B9 74 02 79 30 D0 83 D0 82 D0
2F0    F0 D0 E0 D0 D0 32 FF FF FF FF FF FF FF FF FF FF
300    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
310    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
320    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
330    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
340    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
350    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
360    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
370    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
380    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
390    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3A0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3B0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3C0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3D0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3E0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3F0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
400    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
410    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
420    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
430    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
440    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
450    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
460    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
470    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
480    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
490    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
4A0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
4B0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
4C0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
4D0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
4E0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
4F0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
500    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
510    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
520    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
530    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
540    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
550    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
560    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
570    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
580    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
590    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
5A0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
5B0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
5C0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
5D0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
5E0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
5F0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
600    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
610    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
620    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
630    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
640    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
650    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
660    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
670    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
680    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
690    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
6A0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
6B0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
6C0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
6D0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
6E0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
6F0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
700    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
710    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
720    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
730    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
740    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
750    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
760    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
770    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
780    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
790    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7A0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7B0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7C0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7D0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7E0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
7F0    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

Sketch arduino usado para fazer o dump - adaptado do que foi usado no projeto IntelbrasOP4114

//counter ICs = 2x SN74393N (total of 16 bits of which we use 11 to address the 16k of ROM mem)
int counter_reset = 2; //pin 2 & 12 of both counter ICs
int counter_increment = 3; //pin 1 of the first counter IC

//eprom IC = dm87s191
int eprom_data[8] = {6,7,8,9,10,11,12,13}; // pins 09, 10, 11, 13, 14, 15, 16, 17 of the eprom IC
//CE - CHIP ENABLE PINS
int oe=4; //pin 18 (CE2) of the eprom IC
int ce=5; //pin 19 (CE3) of the eprom IC
			// PIN 20 (!CE1) connected to ground directly

long int address;
int data;

void reset_counter(){
  digitalWrite(counter_increment, HIGH);

  digitalWrite(counter_reset, HIGH);
  delay(10);
  digitalWrite(counter_reset, LOW);
}

void increment_counter(){
  digitalWrite(counter_increment, LOW);
  delay(10);//do we need it?
  digitalWrite(counter_increment, HIGH);
}

void setup(){
  address=0x0;
  int i;

  for (i=0;i<8;i++){
    pinMode(eprom_data[i], INPUT);
  }
  
  pinMode(counter_reset, OUTPUT);
  pinMode(counter_increment, OUTPUT);
  pinMode(oe, OUTPUT);
  pinMode(ce, OUTPUT);

    digitalWrite(oe, LOW);
    digitalWrite(ce, LOW);
  
  reset_counter();
  Serial.begin(38400);
}

int readDm87s191_counter(){
  int i,j;

    digitalWrite(oe, HIGH);
    digitalWrite(ce, HIGH);

    data=0;
    for (i=0, j=1; i<8; i++,j*=2){
      if (digitalRead(eprom_data[i])==HIGH){
         data+=j;
      }
    }
  
    digitalWrite(oe, LOW);
    digitalWrite(ce, LOW);

    increment_counter();
  return data;
}

long int MAXADDR=0x7ff;
int chunk_size = 16;
void loop(){
  reset_counter();
  
  while(address<=MAXADDR){
    
      Serial.print(address, HEX);
      Serial.print("\t");
      for (int i=0; i<chunk_size; i++){
        Serial.print(readDm87s191_counter(), HEX);
        Serial.print(" ");
      }
      Serial.println();
    
    address+=chunk_size;
  }
  while(true){}
}

Possível disassembly - não confirmado se está correto

Efetuado com a ferramenta d51v26

;
;  D51 V2.6 8051 Disassembly of .\rom_painel_banctec.bin
;  9/21/2012 22:48
;
	org	0
;
reset:	ljmp	X0026		; 0000   02 00 26   ..&
;
ie0vec:	mov	r7,a		; 0003   ff         .	; data truncated
;
	org	0bh
;
tf0vec:	ljmp	X0180		; 000b   02 01 80   ...
;
	org	12h
;
here:	mov	r7,a		; 0012   ff         .
ie1vec:	mov	r7,a		; 0013   ff         .	; data truncated
;
	org	1bh
;
tf1vec:	mov	r7,a		; 001b   ff         .	; data truncated
;
	org	23h
;
servec:	ljmp	X02ca		; 0023   02 02 ca   ..J
;
X0026:	mov	psw,#0		; 0026   75 d0 00   uP.
	mov	p1,#0d4h	; 0029   75 90 d4   u.T
	mov	r0,#1		; 002c   78 01      x.
X002e:	mov	@r0,#0aah	; 002e   76 aa      v*
X0030:	cjne	@r0,#0aah,X0030	; 0030   b6 aa fd   6*}
	inc	r0		; 0033   08         .
	cjne	r0,#80h,X002e	; 0034   b8 80 f7   8.w
	mov	r0,#1		; 0037   78 01      x.
X0039:	mov	@r0,#55h	; 0039   76 55      vU
X003b:	cjne	@r0,#55h,X003b	; 003b   b6 55 fd   6U}
	inc	r0		; 003e   08         .
	cjne	r0,#50h,X0039	; 003f   b8 50 f7   8Pw
	mov	r0,#0		; 0042   78 00      x.
X0044:	mov	@r0,#0		; 0044   76 00      v.
	inc	r0		; 0046   08         .
	cjne	r0,#80h,X0044	; 0047   b8 80 fa   8.z
	mov	sp,#10h		; 004a   75 81 10   u..
	mov	2ch,#1		; 004d   75 2c 01   u,.
	mov	2dh,#0feh	; 0050   75 2d fe   u-~
	mov	r1,#74h		; 0053   79 74      yt
	mov	r0,#74h		; 0055   78 74      xt
	mov	psw,#8		; 0057   75 d0 08   uP.
	mov	r1,#30h		; 005a   79 30      y0
	mov	r0,#30h		; 005c   78 30      x0
	setb	2fh.7		; 005e   d2 7f      R.
	mov	dptr,#X4000	; 0060   90 40 00   .@.
	movx	a,@dptr		; 0063   e0         `
	mov	2eh,a		; 0064   f5 2e      u.
	mov	tmod,#21h	; 0066   75 89 21   u.!
	mov	th1,#0fdh	; 0069   75 8d fd   u.}
	mov	tl1,#0fdh	; 006c   75 8b fd   u.}
	mov	th0,#0f0h	; 006f   75 8c f0   u.p
	mov	tl0,#0		; 0072   75 8a 00   u..
	mov	ip,#2		; 0075   75 b8 02   u8.
	nop			; 0078   00         .	; data truncated
;
	org	7bh
;
	mov	scon,#70h	; 007b   75 98 70   u.p
	mov	tcon,#50h	; 007e   75 88 50   u.P
	mov	ie,#92h		; 0081   75 a8 92   u(.
	setb	p1.5		; 0084   d2 95      R.
	setb	p1.4		; 0086   d2 94      R.
	clr	p1.4		; 0088   c2 94      B.
X008a:	lcall	X0092		; 008a   12 00 92   ...
	lcall	X016a		; 008d   12 01 6a   ..j
	sjmp	X008a		; 0090   80 f8      .x
;
X0092:	jnb	int1,X0103	; 0092   30 b3 6e   03n
	mov	psw,#8		; 0095   75 d0 08   uP.
	mov	a,r1		; 0098   e9         i
	subb	a,r0		; 0099   98         .
	jz	X0103		; 009a   60 67      `g
	mov	a,@r0		; 009c   e6         f
	inc	r0		; 009d   08         .
	cjne	r0,#74h,X00a3	; 009e   b8 74 02   8t.
	mov	r0,#30h		; 00a1   78 30      x0
X00a3:	cjne	a,#0dh,X00a8	; 00a3   b4 0d 02   4..
	sjmp	X010d		; 00a6   80 65      .e
;
X00a8:	cjne	a,#0ah,X00ad	; 00a8   b4 0a 02   4..
	sjmp	X0109		; 00ab   80 5c      .\
;
X00ad:	cjne	a,#0eh,X00b2	; 00ad   b4 0e 02   4..
	sjmp	X0130		; 00b0   80 7e      .~
;
X00b2:	cjne	a,#0ch,X00b7	; 00b2   b4 0c 02   4..
	sjmp	X0112		; 00b5   80 5b      .[
;
X00b7:	cjne	a,#11h,X00bc	; 00b7   b4 11 02   4..
	sjmp	X013a		; 00ba   80 7e      .~
;
X00bc:	cjne	a,#13h,X00c1	; 00bc   b4 13 02   4..
	sjmp	X0138		; 00bf   80 77      .w
;
X00c1:	cjne	a,#14h,X00c6	; 00c1   b4 14 02   4..
	sjmp	X0128		; 00c4   80 62      .b
;
X00c6:	cjne	a,#15h,X00cb	; 00c6   b4 15 02   4..
	sjmp	X012c		; 00c9   80 61      .a
;
X00cb:	cjne	a,#8,X00d0	; 00cb   b4 08 02   4..
	sjmp	X0105		; 00ce   80 35      .5
;
X00d0:	cjne	a,#17h,X00d5	; 00d0   b4 17 02   4..
	sjmp	X00e9		; 00d3   80 14      ..
;
X00d5:	cjne	a,#87h,X00eb	; 00d5   b4 87 13   4..
	push	psw		; 00d8   c0 d0      @P
	mov	psw,#0		; 00da   75 d0 00   uP.
	mov	@r1,a		; 00dd   f7         w
	inc	r1		; 00de   09         .
	cjne	r1,#80h,X00e4	; 00df   b9 80 02   9..
	mov	r1,#74h		; 00e2   79 74      yt
X00e4:	pop	psw		; 00e4   d0 d0      PP
	ljmp	X0168		; 00e6   02 01 68   ..h
;
X00e9:	mov	a,#87h		; 00e9   74 87      t.
X00eb:	mov	r5,2bh		; 00eb   ad 2b      -+
	cjne	r5,#20h,X00f2	; 00ed   bd 20 02   = .
	sjmp	X0168		; 00f0   80 76      .v
;
X00f2:	inc	2bh		; 00f2   05 2b      .+
X00f4:	mov	dptr,#X2000	; 00f4   90 20 00   . .
	movx	@dptr,a		; 00f7   f0         p
	mov	r7,#50h		; 00f8   7f 50      .P
X00fa:	djnz	r7,X00fa	; 00fa   df fe      _~
	setb	p1.1		; 00fc   d2 91      R.
X00fe:	jb	int1,X00fe	; 00fe   20 b3 fd    3}
	clr	p1.1		; 0101   c2 91      B.
X0103:	sjmp	X0168		; 0103   80 63      .c
;
X0105:	dec	2bh		; 0105   15 2b      .+
	sjmp	X0150		; 0107   80 47      .G
;
X0109:	inc	2ah		; 0109   05 2a      .*
	sjmp	X0150		; 010b   80 43      .C
;
X010d:	mov	2bh,#0		; 010d   75 2b 00   u+.
	sjmp	X0150		; 0110   80 3e      .>
;
X0112:	mov	2bh,#0		; 0112   75 2b 00   u+.
	mov	2ah,#0		; 0115   75 2a 00   u*.
	setb	p1.3		; 0118   d2 93      R.
	mov	r7,#50h		; 011a   7f 50      .P
X011c:	djnz	r7,X011c	; 011c   df fe      _~
	clr	p1.3		; 011e   c2 93      B.
X0120:	jb	int1,X0120	; 0120   20 b3 fd    3}
X0123:	jnb	int1,X0123	; 0123   30 b3 fd   03}
	sjmp	X0168		; 0126   80 40      .@
;
X0128:	setb	p1.2		; 0128   d2 92      R.
	sjmp	X0168		; 012a   80 3c      .<
;
X012c:	clr	p1.2		; 012c   c2 92      B.
	sjmp	X0168		; 012e   80 38      .8
;
X0130:	mov	2bh,#0		; 0130   75 2b 00   u+.
	mov	2ah,#0		; 0133   75 2a 00   u*.
	sjmp	X0150		; 0136   80 18      ..
;
X0138:	setb	2fh.5		; 0138   d2 7d      R}
X013a:	mov	a,r1		; 013a   e9         i
	subb	a,r0		; 013b   98         .
	jz	X013a		; 013c   60 fc      `|
	mov	a,@r0		; 013e   e6         f
	jnb	2fh.5,X0148	; 013f   30 7d 06   0}.
	mov	2ah,a		; 0142   f5 2a      u*
	clr	2fh.5		; 0144   c2 7d      B}
	sjmp	X014a		; 0146   80 02      ..
;
X0148:	mov	2bh,a		; 0148   f5 2b      u+
X014a:	inc	r0		; 014a   08         .
	cjne	r0,#74h,X0150	; 014b   b8 74 02   8t.
	mov	r0,#30h		; 014e   78 30      x0
X0150:	mov	b,#20h		; 0150   75 f0 20   up 
	mov	a,2ah		; 0153   e5 2a      e*
	mul	ab		; 0155   a4         $
	add	a,2bh		; 0156   25 2b      %+
	mov	dptr,#X2000	; 0158   90 20 00   . .
	movx	@dptr,a		; 015b   f0         p
	mov	r7,#50h		; 015c   7f 50      .P
X015e:	djnz	r7,X015e	; 015e   df fe      _~
	setb	p1.0		; 0160   d2 90      R.
	mov	r7,#50h		; 0162   7f 50      .P
X0164:	djnz	r7,X0164	; 0164   df fe      _~
	clr	p1.0		; 0166   c2 90      B.
X0168:	nop			; 0168   00         .
	ret			; 0169   22         "
;
X016a:	jnb	2fh.7,X017f	; 016a   30 7f 12   0..
	mov	psw,#0		; 016d   75 d0 00   uP.
	mov	a,r1		; 0170   e9         i
	subb	a,r0		; 0171   98         .
	jz	X017f		; 0172   60 0b      `.
	mov	a,@r0		; 0174   e6         f
	mov	sbuf,a		; 0175   f5 99      u.
	clr	2fh.7		; 0177   c2 7f      B.
	inc	r0		; 0179   08         .
	cjne	r0,#80h,X017f	; 017a   b8 80 02   8..
	mov	r0,#74h		; 017d   78 74      xt
X017f:	ret			; 017f   22         "
;
X0180:	push	psw		; 0180   c0 d0      @P
	push	acc		; 0182   c0 e0      @`
	push	b		; 0184   c0 f0      @p
	push	dpl		; 0186   c0 82      @.
	push	dph		; 0188   c0 83      @.
	mov	psw,#0		; 018a   75 d0 00   uP.
	setb	p1.4		; 018d   d2 94      R.
	clr	p1.4		; 018f   c2 94      B.
	mov	th0,#0f0h	; 0191   75 8c f0   u.p
	mov	tl0,#0		; 0194   75 8a 00   u..
	mov	dph,#10h	; 0197   75 83 10   u..
	mov	a,2ch		; 019a   e5 2c      e,
X019c:	mov	r6,a		; 019c   fe         ~
	mov	dpl,a		; 019d   f5 82      u.
	movx	a,@dptr		; 019f   e0         `
	anl	a,#7		; 01a0   54 07      T.
	cjne	a,#7,X01cf	; 01a2   b4 07 2a   4.*
	jb	2fh.6,X01aa	; 01a5   20 7e 02    ~.
	sjmp	X01c9		; 01a8   80 1f      ..
;
X01aa:	inc	2dh		; 01aa   05 2d      .-
	mov	r5,2dh		; 01ac   ad 2d      --
	cjne	r5,#0,X0217	; 01ae   bd 00 66   =.f
	clr	2fh.6		; 01b1   c2 7e      B~
	mov	2dh,#0feh	; 01b3   75 2d fe   u-~
	jb	2fh.3,X01bf	; 01b6   20 7b 06    {.
	jb	2fh.4,X01c7	; 01b9   20 7c 0b    |.
	ljmp	X02a6		; 01bc   02 02 a6   ..&
;
X01bf:	clr	2fh.3		; 01bf   c2 7b      B{
	mov	28h,#88h	; 01c1   75 28 88   u(.
	ljmp	X02a6		; 01c4   02 02 a6   ..&
;
X01c7:	clr	2fh.4		; 01c7   c2 7c      B|
X01c9:	mov	2dh,#0feh	; 01c9   75 2d fe   u-~
	ljmp	X02b5		; 01cc   02 02 b5   ..5
;
X01cf:	jnb	2fh.6,X0209	; 01cf   30 7e 37   0~7
	mov	2dh,#0feh	; 01d2   75 2d fe   u-~
	push	dpl		; 01d5   c0 82      @.
	mov	dpl,#1		; 01d7   75 82 01   u..
	movx	a,@dptr		; 01da   e0         `
	pop	dpl		; 01db   d0 82      P.
	anl	a,#7		; 01dd   54 07      T.
	cjne	a,#0,X01e8	; 01df   b4 00 06   4..
	mov	a,#84h		; 01e2   74 84      t.
	mov	28h,a		; 01e4   f5 28      u(
	clr	2fh.4		; 01e6   c2 7c      B|
X01e8:	mov	a,28h		; 01e8   e5 28      e(
	cjne	a,#80h,X01f0	; 01ea   b4 80 03   4..
	ljmp	X0258		; 01ed   02 02 58   ..X
;
X01f0:	cjne	a,#84h,X01fb	; 01f0   b4 84 08   4..
	jb	2fh.3,X0206	; 01f3   20 7b 10    {.
	setb	2fh.3		; 01f6   d2 7b      R{
	ljmp	X02a6		; 01f8   02 02 a6   ..&
;
X01fb:	cjne	a,#85h,X0206	; 01fb   b4 85 08   4..
	jb	2fh.4,X0206	; 01fe   20 7c 05    |.
	setb	2fh.4		; 0201   d2 7c      R|
	ljmp	X02a6		; 0203   02 02 a6   ..&
;
X0206:	ljmp	X02bf		; 0206   02 02 bf   ..?
;
X0209:	inc	2dh		; 0209   05 2d      .-
	mov	r5,2dh		; 020b   ad 2d      --
	cjne	r5,#0,X024d	; 020d   bd 00 3d   =.=
	cjne	r6,#1,X021a	; 0210   be 01 07   >..
	add	a,#2		; 0213   24 02      $.
	sjmp	X022a		; 0215   80 13      ..
;
X0217:	ljmp	X02b5		; 0217   02 02 b5   ..5
;
X021a:	cjne	r6,#2,X0221	; 021a   be 02 04   >..
	add	a,#0ah		; 021d   24 0a      $.
	sjmp	X022a		; 021f   80 09      ..
;
X0221:	cjne	r6,#4,X0228	; 0221   be 04 04   >..
	add	a,#data1	; 0224   24 12      $.
	sjmp	X022a		; 0226   80 02      ..
;
X0228:	add	a,#1ah		; 0228   24 1a      $.
X022a:	movc	a,@a+pc		; 022a   83         .
	sjmp	X0253		; 022b   80 26      .&
;
	div	ab		; 022d   84         .
	mov	34h,31h		; 022e   85 31 34   .14
	addc	a,@r1		; 0231   37         7
	jnb	p0.0,X0235	; 0232   30 80 00   0..
X0235:	nop			; 0235   00         .	; data truncated
;
	org	237h
;
	reti			; 0237   32         2
;
	addc	a,38h		; 0238   35 38      58
	orl	a,@r0		; 023a   46         F
	ajmp	page4		; 023b   81 00      ..
;
	org	23fh
;
	rlc	a		; 023f   33         3
	addc	a,@r0		; 0240   36         6
	addc	a,r1		; 0241   39         9
X0242:	orl	a,dpl		; 0242   45 82      E.
	nop			; 0244   00         .	; data truncated
;
	org	247h
;
	ajmp	X0242		; 0247   41 42      AB
;
	orl	44h,#83h	; 0249   43 44 83   CD.
	nop			; 024c   00         .
X024d:	ljmp	X02bf		; 024d   02 02 bf   ..?
;
X0250:	ljmp	X019c		; 0250   02 01 9c   ...
;
X0253:	setb	2fh.6		; 0253   d2 7e      R~
	ljmp	X02a2		; 0255   02 02 a2   .."
;
X0258:	push	dpl		; 0258   c0 82      @.
	mov	dpl,#8		; 025a   75 82 08   u..
	movx	a,@dptr		; 025d   e0         `
	pop	dpl		; 025e   d0 82      P.
	anl	a,#7		; 0260   54 07      T.
	cjne	a,#6,X02bf	; 0262   b4 06 5a   4.Z
	push	dpl		; 0265   c0 82      @.
	push	dph		; 0267   c0 83      @.
	push	psw		; 0269   c0 d0      @P
	mov	psw,#8		; 026b   75 d0 08   uP.
	lcall	X0112		; 026e   12 01 12   ...
	mov	a,#0feh		; 0271   74 fe      t~
X0273:	lcall	X00f4		; 0273   12 00 f4   ..t
	setb	p1.4		; 0276   d2 94      R.
	clr	p1.4		; 0278   c2 94      B.
	djnz	29h,X0273	; 027a   d5 29 f6   U)v
X027d:	jnb	tf0,X027d	; 027d   30 8d fd   0.}
	clr	tf0		; 0280   c2 8d      B.
	setb	p1.4		; 0282   d2 94      R.
	clr	p1.4		; 0284   c2 94      B.
	mov	th0,#0f0h	; 0286   75 8c f0   u.p
	mov	tl0,#0		; 0289   75 8a 00   u..
	inc	29h		; 028c   05 29      .)
	mov	a,29h		; 028e   e5 29      e)
	cjne	a,#0,X027d	; 0290   b4 00 ea   4.j
	lcall	X0112		; 0293   12 01 12   ...
	mov	a,#86h		; 0296   74 86      t.
	pop	psw		; 0298   d0 d0      PP
	pop	dph		; 029a   d0 83      P.
	pop	dpl		; 029c   d0 82      P.
	sjmp	X02a2		; 029e   80 02      ..
;
	mov	a,#80h		; 02a0   74 80      t.
X02a2:	mov	28h,a		; 02a2   f5 28      u(
	sjmp	X02bf		; 02a4   80 19      ..
;
X02a6:	mov	a,28h		; 02a6   e5 28      e(
	mov	@r1,a		; 02a8   f7         w
	inc	r1		; 02a9   09         .
	cjne	r1,#80h,X02af	; 02aa   b9 80 02   9..
	mov	r1,#74h		; 02ad   79 74      yt
X02af:	jb	2fh.3,X02bf	; 02af   20 7b 0d    {.
	jb	2fh.4,X02bf	; 02b2   20 7c 0a    |.
X02b5:	mov	a,r6		; 02b5   ee         n
	rl	a		; 02b6   23         #
	mov	2ch,a		; 02b7   f5 2c      u,
	cjne	r6,#10h,X0250	; 02b9   be 10 94   >..
	mov	2ch,#1		; 02bc   75 2c 01   u,.
X02bf:	pop	dph		; 02bf   d0 83      P.
	pop	dpl		; 02c1   d0 82      P.
	pop	b		; 02c3   d0 f0      Pp
	pop	acc		; 02c5   d0 e0      P`
	pop	psw		; 02c7   d0 d0      PP
	reti			; 02c9   32         2
;
X02ca:	push	psw		; 02ca   c0 d0      @P
	push	acc		; 02cc   c0 e0      @`
	push	b		; 02ce   c0 f0      @p
	push	dpl		; 02d0   c0 82      @.
	push	dph		; 02d2   c0 83      @.
	mov	psw,#8		; 02d4   75 d0 08   uP.
	jnb	ti,X02e0	; 02d7   30 99 06   0..
	clr	ti		; 02da   c2 99      B.
	setb	2fh.7		; 02dc   d2 7f      R.
	sjmp	X02eb		; 02de   80 0b      ..
;
X02e0:	clr	ri		; 02e0   c2 98      B.
	mov	a,sbuf		; 02e2   e5 99      e.
	mov	@r1,a		; 02e4   f7         w
	inc	r1		; 02e5   09         .
	cjne	r1,#74h,X02eb	; 02e6   b9 74 02   9t.
	mov	r1,#30h		; 02e9   79 30      y0
X02eb:	pop	dph		; 02eb   d0 83      P.
	pop	dpl		; 02ed   d0 82      P.
	pop	b		; 02ef   d0 f0      Pp
	pop	acc		; 02f1   d0 e0      P`
	pop	psw		; 02f3   d0 d0      PP
	reti			; 02f5   32         2
;
	org	300h
;
page3:	mov	r7,a		; 0300   ff         .	; data truncated
;
	org	400h
;
page4:	mov	r7,a		; 0400   ff         .	; data truncated
;
	org	500h
;
page5:	mov	r7,a		; 0500   ff         .	; data truncated
;
	org	800h
;
	inc	r5		; 0800   0d         .
;
;	SFR Equates
;
newsfr:	equ	94h
;
;	SFR bit Equates
;
port2_2:	equ	0a2h
;
;	Memory bit Equates
;
bitflag:	equ	12h
;
;	Symbol Equates
;
;  These are symbols from the control
;  file that are referenced in the code.
;
data1:	equ	12h
;
;	Miscellaneous Equates
;
;  These are addresses referenced in the code but
;  which are in the middle of a multibyte instruction
;  or are addresses outside the initialized space.
;
X2000:	equ	2000h
X4000:	equ	4000h
;
	end
;