2008-07-16 06:55:19 +02:00
|
|
|
diff16 'tp-recode.asm',0,$
|
|
|
|
|
2006-12-30 18:44:05 +01:00
|
|
|
recode:
|
|
|
|
|
|
|
|
.866.1251:
|
|
|
|
mov edi,table.866.1251
|
|
|
|
jmp .main
|
|
|
|
.1251.866:
|
|
|
|
mov edi,table.1251.866
|
|
|
|
jmp .main
|
|
|
|
.866.koi:
|
|
|
|
mov edi,table.866.koi
|
|
|
|
jmp .main
|
|
|
|
.koi.866:
|
|
|
|
mov edi,table.koi.866
|
|
|
|
jmp .main
|
|
|
|
.1251.koi:
|
|
|
|
mov edi,table.1251.koi
|
|
|
|
jmp .main
|
|
|
|
.koi.1251:
|
|
|
|
mov edi,table.koi.1251
|
|
|
|
|
|
|
|
.main:
|
2007-01-28 00:36:07 +01:00
|
|
|
mov ecx,[cur_editor.Lines.Count]
|
|
|
|
mov esi,[cur_editor.Lines]
|
2006-12-30 18:44:05 +01:00
|
|
|
jecxz .exit
|
|
|
|
xor eax,eax
|
|
|
|
.lp0: dec ecx
|
|
|
|
js .exit
|
2009-01-29 12:02:16 +01:00
|
|
|
mov edx,[esi+EDITOR_LINE_DATA.Size]
|
|
|
|
add esi,sizeof.EDITOR_LINE_DATA
|
2006-12-30 18:44:05 +01:00
|
|
|
@@: dec edx
|
|
|
|
js .lp0
|
|
|
|
lodsb
|
2007-01-03 19:22:05 +01:00
|
|
|
add al,-$80
|
2006-12-30 18:44:05 +01:00
|
|
|
js @b
|
|
|
|
mov al,[edi+eax]
|
|
|
|
mov [esi-1],al
|
|
|
|
jmp @b
|
|
|
|
.exit:
|
|
|
|
ret
|
2008-07-16 06:55:19 +02:00
|
|
|
|