home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
c
/
lux80.jar
< prev
next >
Wrap
Text File
|
2020-01-01
|
172KB
|
6,010 lines
This file, LUX80.JAR, is a "join archive". It contains the following
files for Luxor ABC80 Kermit:
kerm.asm
kerm.doc
kerm.hex
kerm.inf
kerm.txt
kerm1.asm
kerm2.asm
kerm3.asm
kerm4.asm
kerm5.asm
kerm6.asm
kerm7.asm
kermasm.inf
kermdump.bas
kermdump.inf
kermquit.bas
See kerm.doc for English-language documentation. All other commentary is
in Swedish, written in the 7-bit Swedish National Replacement Character
Set (Swedish ASCII). You can view the correct Swedish characters by using
a Swedish terminal, the Swedish NRC on a DEC VT200, 300, or 400 terminal,
or SET TERMINAL CHARACTER SET SWEDISH in MS-DOS Kermit 3.0 on an IBM PC or
compatible.
Each file begins with a line having the filename enclosed in triple angle
brackets, for example <<< kerm.doc >>>. All the lines up to the next
<<< filename >>> line are the contents of the file. You can break up this
"jar" file into its consituent files using a text editor, or with a program
like the following one, which is written in the C language. If you call this
program "unjoin" and you have a "jar" file called foo.jar, then you would
break up the jar file by typing "unjoin < foo.jar".
---(cut here)---------------------------
/* unjoin -- Split a "jar file" up into its original component files. */
/* The jar file is read from standard input. */
/*
/* This program can be used on UNIX systems, and with Microsoft C */
/*
/* Authors: F. da Cruz, C. Gianone, Columbia University, 1988 */
#include <stdio.h>
int files = 0;
FILE *fd;
char *name;
#define BUFLEN 1000
char buf[BUFLEN];
char msg[100];
main() {
while(1) {
if (gets(buf) == NULL) doexit(0);
if (chkhdr()) {
if (files > 0) fclose(fd);
if ((fd = fopen(name,"w")) == NULL) {
sprintf(msg,"Fatal - Can't create %s",name);
perror(msg);
doexit(1);
} else files++;
} else {
if (files == 0) {
fprintf(stderr,"Fatal - not a joined file!\n");
doexit(1);
} else {
fprintf(fd,"%s\n",buf);
}
}
}
}
chkhdr() { /* Look for "<<< filename >>>" */
int i;
if (buf[0] != '<') return(0);
if (buf[1] != '<') return(0);
if (buf[2] != '<') return(0);
if (buf[3] != ' ') return(0);
for (i = 4; (buf[i] != '\0') && (i < BUFLEN); i++) ;
if (buf[i-1] != '>') return(0);
if (buf[i-2] != '>') return(0);
if (buf[i-3] != '>') return(0);
if (buf[i-4] != ' ') return(0);
buf[i-4] = '\0';
name = buf+4;
return;
}
doexit(x) int x; { /* Exit from program */
if (files > 0) fclose(fd);
fprintf(stderr,
"Done, unjoined %d file%c\n",files,(files == 1) ? ' ' : 's');
exit(x);
}
---(cut here)---------------------------
The ".hex" files listed above are binary files encoded in hexadecimal: 2 hex
characters represent one 8-bit binary byte. Line breaks should be ignored.
Here is a C program to translate a hex file back into a binary file:
---(cut here)---------------------------
/* UNHEX.C - Program to translate a hex file from standard input
* into an 8-bit binary file on standard output.
* Usage: unhex < foo.hex > foo.exe
* Christine M. Gianone, CUCCA, October 1986.
* Modified Aug 89 to work right with Microsoft C on the PC.
*/
#include <stdio.h> /* Include this for EOF symbol */
#ifdef MSDOS
#include <fcntl.h> /* For MS-DOS setmode() symbol */
#endif
unsigned char a, b; /* High and low hex nibbles */
unsigned int c; /* Character to translate them into */
unsigned char decode(); /* Function to decode them */
/* Main program reads each hex digit pair and outputs the 8-bit byte. */
main() {
#ifdef MSDOS
setmode(fileno(stdout),O_BINARY); /* To avoid DOS text-mode conversions */
#endif
while ((c = getchar()) != EOF) { /* Read first hex digit */
a = c; /* Convert to character */
if (a == '\n') { /* Ignore line terminators */
continue;
}
if (a == '\r') {
fprintf(stderr,"Illegal Carriage Return\n");
exit(1);
}
if ((c = getchar()) == EOF) { /* Read second hex digit */
fprintf(stderr,"File ends prematurely\n");
exit(1);
}
b = c; /* Convert to character */
putchar( ((decode(a) * 16) & 0xF0) + (decode(b) & 0xF) );
}
exit(0); /* Done */
}
unsigned char
decode(x) char x; { /* Function to decode a hex character */
if (x >= '0' && x <= '9') /* 0-9 is offset by hex 30 */
return (x - 0x30);
else if (x >= 'A' && x <= 'F') /* A-F offset by hex 37 */
return(x - 0x37);
else { /* Otherwise, an illegal hex digit */
fprintf(stderr,"\nInput is not in legal hex format\n");
exit(1);
}
}
---(cut here)---------------------------
<<< kerm.asm >>>
; KERM.ASM
; Anders Franz`n <5258>
; Stockholm 1987-08-24
TITLE Kerm
OBJ 2
SAVE DR1:KERM.BAC
PGM EQU 193:0 Adress f|r pgm
STACK EQU 249:0 SP f|r KERM
SPACE EQU 34:74 Space i ROM
BUFF1 EQU 244:0 Terminaldata
BUFF2 EQU 250:0 Tangenttryck
BUFF3 EQU 249:0 Mottagen packet
BUFF4 EQU 249:128 Packet att s{nda
BUFF5 EQU 247:0 Data i packet
BUFF6 EQU 251:0 Kommando Kermit
BUFF7 EQU 251:50 Radbuffer filer
BUFFTED EQU 254:64
INCLUDE KERM1
INCLUDE KERM2
INCLUDE KERM3
INCLUDE KERM4
INCLUDE KERM5
INCLUDE KERM6
INCLUDE KERM7
SLUT END START
<<< kerm.doc >>>
Luxor ABC80 KERMIT
Program: Anders Franz`n
ABC-Club "ABC-Klubben", Stockholm, Sweden, a computer club.
The name is in english the ABC-Club.
The ABC-Club was founded 1979 as a user group in Sweden for
the Luxor ABC 8 bits microcomputers.
Today, Nokia has taken over Luxor and Nokia sells IBM
compatible PC:s. The club has today a lot of members that
use PC:s and other modern computers. The aim of the ABC-Club
is today to be a user group for the old Luxor ABC computer
users and PC users in Sweden.
Language: All routines in assembler Zilog Z80
Documentation: Anders Franz`n
Version: 1.0
Date: Sept 24, 1987
KERM ABC80 Kermit Capabilities At A Glance:
Local operation: Yes
Remote operation: No
Transfers text files: Yes
Transfers binary files: Yes
Wildcard send: Yes
^X/^Y interruption: Yes
Filename collision avoidance: Yes
Can time out: Yes
8th-bit prefixing: Yes
Repeat count prefixing: Yes
Alternate block checks: Yes
Terminal emulation: No
Communication settings: Yes
Transmit BREAK: No
IBM mainframe communication: No
Transaction logging: No
Session logging: No
Raw transmit: Yes
Act as server: No
Talk to server: No
Advanced server functions: No
Advanced commands for servers: No
Local file management: No
Command/init files: No
Command macros: No
Attribute packets: No
Extended-length packets: No
Sliding windows: No
KERM is a program that implements the Kermit file transfer protocol
for the Luxor ABC80. The computer use the Zilog Z80 processor and
has a proprietary operating system called ABC-DOS. The computer had
a big market share in Sweden before the age of the IBM PC. They were
also sold in the other nordic countries and to a lesser extent in the
rest of Europe.
Program Invocation
The KERM.BAC is the main program. Start the program with the BASIC
command "RUN KERM". All the text in the program is in english.
Terminal Emulation
The characters you type are sent out the port, and characters that
arrive at the port are displayed on your screen.
Installation of KERM
If you already have Kermit on your ABC80, you can use it to obtain new
versions of KERM by Kermit file transfer.
If you do not have Kermit and there is no one from whom you can borrow a
floppy disk to copy Kermit from, then try to download it on a IBM PC or IBM AT.
The IBM PC/AT program ABCDISK or WABC can format a diskette for ABC80
on an IBM PC or IBM AT with 5.25 " diskettes and copy files from PCDOS/
MSDOS to the ABC-diskette. ABCDISK and WABC are commercial software that
is sold in Sweden.
Program Organization
The program is:
KERM.BAC Main program
Sources:
KERM.ASM
KERM1.ASM
KERM2.ASM
KERM3.ASM
KERM4.ASM
KERM5.ASM
KERM6.ASM
KERM7.ASM
Documentation:
KERM.DOC This text
KERM.INF Short infofile in swedish
KERM.TXT Big documentation in swedish
KERMASM.INF Info about the sources in swedish
Utility programs:
KERMDUMP.BAS Source for a program that dumps the session on file
KERMDUMP.INF Info in swedish
KERMQUIT.BAS Source for a sample program for exits back to Kermit
<<< kerm.hex >>>
23212F62696E2F73680A2320546869732069732061207368656C6C206172636869766520
287368617220332E3234290A23206D6164652030372F30372F313939302032323A303620
55544320627920626B406B756C6C6D61722E73650A2320536F7572636520646972656374
6F7279202F7573722F626B2F6162632F6B657238302F757064617465730A230A23206578
697374696E672066696C65732077696C6C204E4F54206265206F7665727772697474656E
0A230A232054686973207368617220636F6E7461696E733A0A23206C656E67746820206D
6F6465202020202020206E616D650A23202D2D2D2D2D2D202D2D2D2D2D2D2D2D2D2D202D
2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D
2D2D2D2D2D0A2320203132313434202D72772D722D2D722D2D206B65726D2E6261630A23
0A696620746F75636820323E2631207C20666772657020275B2D616D635D27203E202F64
65762F6E756C6C0A207468656E20544F5543483D746F7563680A20656C736520544F5543
483D747275650A66690A23203D3D3D3D3D3D3D3D3D3D3D3D3D206B65726D2E626163203D
3D3D3D3D3D3D3D3D3D3D3D3D3D0A6966207465737420582224312220213D2058222D6322
202D61202D6620276B65726D2E626163273B207468656E0A096563686F202246696C6520
616C7265616479206578697374733A20736B697070696E6720276B65726D2E6261632722
0A656C73650A6563686F202278202D2065787472616374696E67206B65726D2E62616320
2842696E61727929220A7365642027732F5E582F2F27203C3C2027534841525F454F4627
207C2075756465636F64652026260A58626567696E20363030206B65726D2E6261630A58
4D4042354460283A242A524C4B2A524C4B2A524C4B2A524C4B2A524C4B2A524C4B2A524C
4B2A524C4B2A524C4B2A524C4B2A50543B39302226412224400A584D3427294F39572941
3B32604E2B42584E28226040325435323330543F3940222641222440353731473F373941
282260512B436040282260402E233C4D0A584D2C23444D2C43302D28263C604148304128
2625562824254E392635523C5221263C46254E3E46214E282350552C4334582F4054273A
6022264122242D0A584D264644604148304128242955395639493E2260402C3344592C22
54502C3254502E3054393A4022264122244032425840355635533D2655413B42605C0A58
4D2D3360572D23582D27564C604148304128244D413B42214B3F2729412826554F3D2221
4B3937294D3A3730403C565D4D2331414C60283A24283221450A584D3A4221413B47395B
3B4631453C422132313521342330605E2121252A284B482D6030606060213D4D60283A24
2832212D3A36594E3932214D3A3659530A584D3D2260512D444C2D255658604148304128
24394C393741533A5645563832214B3C474D563C5054453B50222641224C4B2A524C4B2A
524C4B2A524C4B0A584D2A524C4B2A524C4B2A524C4B2A524C4B2A524C4B2A524C4B2A52
4C2D214760604148302D283724604148312B3937294D3A37304039475152282425220A58
4D305340502B42212B383658403A57515238372C2D26472860414831543A36514C3C5625
4D3B36254E3C52214D39363040352435242B4054263C5022260A584D4160553E3D602227
2A29232B48215F4B603D575F223E4C2E5B5044212330234D4C605855223C453239372D54
3B5729452822604028226040525054600A584D4E582F2B60225321553D342E2823582158
304745593D574157345B5C2322603733422D3E285538435B3B212E23222354234F445D28
2E2F2D602F53410A584D543C47374E5B482D60602460606023593D30222725383A31525A
602B5A5027515F50474B603D5C60223C472B2330225B405C4F5F564F27292C50235C0A58
4D5830582722345829593058562237582E2750453E28553B41553F352E223354405E5F27
4524315C602634584337422D36285E5650334050405D2E252E0A584D5B34285D282E4329
5F51433D3D515B3D3F41473D3D515F3D5250213E502D545525233F285737582C57373C35
5737583757373C365737583E57373C380A584D5737583F57373C39533947502E2D472D48
4E5C582F2D555E263F59392A60535E334240415F44372A573E4323435E473D3F413B3D4F
413C40283D555E0A584D255353462F5D55572552484B58522C422A5E2F29573758362F3D
565E255243462F2D565E255C2A2F5A3D555E275F59262A60475E312240255F454B220A58
4D3E5E544A2C3E2C43284327435330234E50574F4D2E44573E2F3C405E23332B545F3248
5158535824243448424E4054606060606037473860415242300A584D525A603F5A50273D
5F50474B234E5C29603054605B3B602E2D304729325635523B3260402822604028226040
282C4C2D602B4E235250604C503D37350A584D2342605E2B2E2429593E373D583D552E5F
6050402554584337422D36285E5650334050405D605B592F3223435330235B583D272955
5B4E5A2330603F0A584D573C4C60374C233D2D313057522D555E232D5557253D555E255D
5557254D555E274D5557262D555E275D5557263C56395C234339533A2B4F2E23533D0A58
4D3F41475E3632402C5F445848283F5925524D574850585F4957375836573B5837282227
3D3F413C5C59435F3D3D513C4A2A5E2C4328424F43523D555E0A584D2543573D4F413C48
5943533D4F413F22435E473D3F415F5E314240295F443048213F593A50474F4D2A432743
28522851585C54605B4C2D5B5B33492D0A584D574357282F4054525D2F544A2C3E2C5E21
21252A284B482D60606060602F455760283C354149272B48604F4B603F275F223E4C2157
506029523C4C2D0A584D602B4E23525F5F3A5C3C4729602F4C5A302F5A4728604C41402F
5C313D4D58212550234D4C2324605E322728555E374D3C553F212C3023215B372C470A58
4D5F4C565B545A5C52415E2C41363C253D352338402450255F215E5650283D4F28373530
5628212C213F503F4D4C2226395E51253950302428602E56500A584D243D4F2860324060
5B3B604A282F5831602C274D344360405732483C5F42483C5F475B5E60324034335D555E
605F5A2628603F3D3F40335E4432402E0A584D57304429262E3F2D3C604851602F472352
2D3C2E2130474B2E435C2D5F4F5F2A2F5057232F3055343937294D3A3659413B244C4031
322132282454400A584D323221342822604039465D522824252230534050282260403457
314F38564D483B56514D282324592E233C28602C24552822212B3135292D323F5E5A0A58
4D23306060606023593E60222725383A31525A602B5A5027515F50474B603D5C60223C47
2B2330225B405C4F5F564F27293430432135226040282223230A584D272C2723332C2723
602C2323605C2323214C605A413D464728224B515D3D38242C4137212C4143212C414F21
2C483739573224605E22262F574D55550A584D234D5554235C565B545E5553353C245160
2F4723522D3F4D3C5537215B374D37503C446060606060604D47286040215B365D602260
2D54413D602C260A584D262C373D3740233D3540273D285D54432E4D4021335038605B3B
235E2A22602233504721242E313E28553B4D345F2F5D523D54413D602C26262C373D0A58
4D3B40233D3940273D285D54432E4D4021335038605B3B235E2A22602B3A56285628212C
212950234D4C222F21242D4C4A5C5F574B3C522D52523E34410A584D584D23435B372C56
5F4E3441574D235D3D315B5D3D215F5D2D4058605F33382F6022275F4E40546060606060
5E37446041513626443C4E40225E4C210A584D5C3F5C295A50273F60604729525054604E
582F2B5F5D4B51523D3336542D4F30585D37292C532F2921606021443F555E284E395F2D
5C445E603140250A584D2F403038603A5F3D28382B4324335860533B4B30523E395F3B52
38605932243454302427602C542B602E272D302D272D30403F2923304827313529320A58
4D2823483E262F595E5241583850515038243D375D55334940262F5A4F5D3C5140262F27
243841434B543A3F4D344455245A5C472D294D272D225023290A584D553F372D294D2751
585C3631335C302B602C274153304C60523E3C422D2D282160603F4D30533B325930275F
60224D3F5750535E2A4240245F435C400A584D6030335E2B2260242F405557285F582D28
2E43472843473258374F5E2E4240273E232858544A3C4829375B46375E5924502D5F4637
5E5932502D5F360A584D2C235F305F404330335D5F4E5F5B482D60606060602F455A6028
3C354149272B48604F4B603F275F223E4C2157506029523C4C2D602B4E23525F5F3A0A58
4D5C3C47344A4D245A502D5C422D2D2826603E55232D4D2A47523126365F5C5521602D40
41483F5C31402F5C216050215E5B3B235E282240222F4348320A584D245226365F505828
5B3B605E2B41283323402F4D4C23582D244A3F292A433332595E4F475A5F582D2821215E
5F405457522E584A502E373F583E582D0A584D50233F293F4F582D52214B5E3823402259
455E5E28604B4555322C33533E4B31543E27293F4F585F2A2F274E2A4C234555322F2D5A
4D2731583D43450A584D55312F2D5A4D2731583C44606060606060606060234023355336
5B32543C4358593D3441365D28212450232D2250233158305A6053365B32533428270A58
4D2D5C442D22403D223932214D3B57294528272D5039362D4939464543595E582D2F3F43
39214027395A543842562D2B35264F5E5A23306060606023590A584D3E50222725383A31
525A602B5A5027515F50474B603D5C60223C472B2330225B405C4F5F564F272955275B32
245F59402E602B4637522E5E2A2F335E0A584D282240285F425048212F582D2822443B5B
352F3A54474028232C4D592A21573924605B2D30403C2660534B38603F58482A60282621
324B3854435B560A584D2434484253393B3A5637584352575C485E424C5C2A602F31262A
57312A4D4B3259504247525B442D522E4F296060606060234A25563A3F285732265A0A58
4D54534B22555F58402C21535E223240475F4048482C2F582C2A22435E233240275F4043
60573334605C2D545660602329283C2737525E5841302F5B3D0A584D3740603660214557
57333060573758605F4A236057333860602E553B4C4D2F352A4F2F5D593C5439503E2731
2E6058335B352E52545C5436503227210A584D555C4E4E52322B535F3A5C52425D5B4D36
5A282353363C22283C275F4E405460606060605E37506041513626443C4E40225E4C215C
3F5C295A50273F0A584D60604729525054604E582F2B5F5D4B51523D3132545D3F2B514C
4F562F402C52505D3F292E484F3E5B402B602E483739495C405A4E4D2E472823384A0A58
4D4D4D2D5C4D3260254B532A2B574C444B284B3B332834235E284B43335B354E5454512F
4D345B333353313B21283D5F5E214A605E282B584B28602C300A584D5E424C432853382D
3E23505D2C4B4B332A4B43333F422C424E2D2C5752306060606060606060606060222460
5D222A56555754524E2D3C41602F4B3B0A584D2E273C424E4D3D5D2C4B5337294230424F
4D3C5A503D3F4627232B21555C5436574C5538574C474D3C5C3B37283547215335573053
392C225A5C4F5E0A584D533C37335335533453354F36533E4F34283C273752543B222F3D
332B3542603C533D47345723533556534B466042603053355733572353352E485B3E0A58
4D495C303C5F5B482D60606060602F455D60283C354149272B48604F4B603F275F223E4C
2157506029523C4C2D602B4E23525F5F3A5C3C4734294D33360A584D57235335533A5F34
57294B3456534B4660424329283C273752593838504C552455422721555C4D4E51223333
53392C225A5C4E5E2435472153383F300A584D533747345B374F26555C47535B353C5250
2D3C414B4D3D5C5B343D5D5453445E335D2C595632265C55412424555D475B52334A5555
5A3C405E4F2C5E0A584D5F5D2C595453445A502D3F4D315358545453475B2F4C40525D5F
564F2C4F375D523F582A2860545A403D585D2860345E233C553A5533582A53354B350A58
4D523E553B4D4D3C41503D3F2B394240322E4B4337445F2B23552E55245F426050213C55
3B554C4E462E4B43374E5C413F2F232A585551485752324A5A0A584D55534A5C555B5728
3B5350524F2D3D5E59475C5752324A5A555D4C5852575C48314038324F4260295B3F5E5A
23306060606023593F40222725383A310A584D525A602B5A5027515F50474B603D5C6022
3C472B2330225B405C4F5F564F2729552F4B34325B5B372121605A21402F4D305B5B3733
5A5F33214358590A584D5450385A3F2D5B56402B444823534A25563A3C4826234A2A574F
3A604E3260302D572441364E2F2B57422721555C4F26542C4F2E523745572B222A5A0A58
4D55573F295F40544023345C5A403D585D3E326025533457352F40492F2E474B3E495747
2C364D372D3C4D3B2959475C52504D3F2D44502B4B525B585A0A584D504D3F5E28232121
5F403C48264F58282A215F5E223240565F404848304F582C2A22435E2332212157333821
602140574B5D2C262F482F33214140520A584D2A5D5455603F2B255533494F604D555760
3D5455602F2B21553140365337382226213157285D54546033494F604D565E6033602B57
333821602C54580A584D604C5633604E4F2B5F434A2B5743572C572D2B5F4E4054606060
60605E375C6041513626443C4E40225E4C215C3F5C295A50273F60604729525054600A58
4D4E582F2B5F5D4B51523D332E55334A2D574A3C5A504D3F285F404848232F584056224B
2455573C4C284C333752324B245553382D2B23382A2B2124600A584D5E3A3F4D34445524
5A5D5441404E2C314540432D4E4D6058224224605E322B2455534B22555C4452505D3C41
503D3F2B514C4F5E2E4C2B37523D54410A584D364E2F2D445E505F562A3C40243D544140
4E2C314460432D4E4D6058213A5C52434D5B292C4C2F37283C2737525C3B2B5F4C445A3F
4D585D502E34410A584D503D3F2B3743583353272B36283C2737525D5B415233495E5743
576059322721555C4D3E2F4127243C4D3841503D3F2B474E2729593D3725335D4C5A0A58
4D59402848224A5F3321435A235450385726225C2622434A24574A3C48262C4E592F3240
332F32402E2F374448214A3F42494D3838212A3F4A5F5B482D0A584D60606060602F4660
60283C354149272B48604F4B603F275F223E4C2157506029523C4C2D602B4E23525F5F3A
5C3C4734484D3A46554C4F59513C574B0A584D552C245A4D3D3E47282F374D305B333750
3D2741523043395A3C5422555D4C5A5D4143332E434A55555A3C485C343C41606060425B
3D385A4D2D3D2F0A584D5B342F565540585A5B34232B562340225259434D303C54225552
4A5255502460606044425B3D38505C302460602C4C39242D4A4F2C4B3737262B4B4B0A58
4D5A3C563E555D4C5A52505C505D5C563E555D4C5A52505C585D52264453422921555C56
3E555D4C5A52505C585A224A50555E553B303D3C39284427370A584D2C2E4826223C4C39
5B342D2A555C563E55524A505551246060214442303D3C505C302460602D4C5A52505C30
5843225053395B372E444B372A4B3B370A584D3D5250424D4D3D2F2E4B43374532272155
5F294F555E55245F446058235C4D46282F5E5A23306060606023594030222725383A3152
5A602B5A5027510A584D5F50474B603D5C60223C472B2330225B405C4F5F564F27292D47
3B3722534A55555A3C40213C5524554C4F462E48333E49574448604E395F5F4124480A58
4D224F583350405737525D3B23233D3F2B454C2C2D55524A5E55524C424F4D3F31583D44
285E5E552D465A5B374E3D39322957342260606060606060600A584D6060606060606060
60606060606060606060232D544D4441224D40212260232D2250232D30403C41602F4C21
2950234553323338583E3F5E2332434D0A584D603C4F3751312627562D372D2E5D2B3156
226026243E4338505348215532243256602432602C542B602E27235F2D442D22444D2534
4455293560542A0A584D21542D4F3B3655413B4630403B3735533D2221423931252E605E
55335E5F573D5934272D36502C405E5C553B605C5422602F5829532440235F40572A0A58
4D59302B5E262243475F40435F4E405460606060605E38286041513626443C4E40225E4C
215C3F5C295A50273F60604729525054604E582F2B5F5D4B510A584D523D312956224348
593D3725573E37552A47533E4F3260255330433926603C4A424D5A5D532523395C3D5741
503D27415F42605852312B5E382340220A584D59455D57285D54546033494F604D565E60
3D505460412252505E302240242D2C33552D2540342D2F33445925305532223124352C31
353125405431290A584D34483124353455304044353230352D2541343538323532263224
352C3428292B3234512C4154512F315841313534453442352925305435293544362A0A58
4D3454253631384D333134592443252D253528553332245D374345312531285D34363521
255F535342222D472858303B3F474E2B40563F47393F5E2B230A584D563A3F394F3E2A26
563D233A274D493056342B41533D4739533E3B332E4C273752545F22362D472D544D445A
503D3F2B5F5B482D60606060602F46230A584D60283C354149272B48604F4B603F275F22
3E4C2157506029523C4C2D602B4E23525F5F3A5C3C4734273D455728212B2B3F5C405A50
5D3F2D5F3D232D0A584D2F2E2851602F4723525D3C41303D44212350232D22506051602F
4723525D3C2D22403D34313430403946454C3B2635442330485A413D4647522C57390A58
4D56334A2E57445C5A433D5A512A60532D544D472D2F2E2851602F4723525D3F2D3F2D44
5A503D3F2B335C282B563C2F32563E5553355C274D3E5537210A584D5230232D364D245E
253D4B5D542C545C584C565B545C553C552C553B554C544D5A4C5524554C5559552C5522
215C44422E3D2B2D2F2E2B2D4E5D2F2D0A584D372D332D365D3B2D444E2F2D312D3B2D3E
3D332D30403F29593C545C584C5739563225605F473741533E3B39283D4F285335573052
31273B522C56270A584D542C472D2F2E2B236060234D3C553F215B374C475F43492C233F
5E5A23306060606023594160222725383A31525A602B5A5027515F50474B603D5C600A58
4D223C472B2330225B405C4F5F564F2729552F27395F4E3F2A3360572332405441415D40
266031602E5334282721402C5A5660275E2A2240222140345E0A584D5D41252A284C5636
5647585C282E332D30403F2953342827573225565742265A573E3441283D4C2660434B38
603F58482A60282660535B59243C3B3A0A584D53393B3A585C353E2855384333422D2628
5E374B5737586057322F56402F5B5E2A60435E5F5240245B3B2448235E395F3B5238602F
404431514D4B2D0A584D315D243822324C5E22312726564C5636564E27215857585C2A21
33455132252A28402422602C542B602C2741242A4F2D30403C38465E272D30403F290A58
4D5130275F5F522F45525758436052435A2A5E2F35495F4A54564E37255A59252F51604C
604B5C27415D3C372D225023215C3E274D3129252F5D604C600A584D583C275F4E405460
606060605E38346041513626443C4E40225E4C215C3F5C295A50273F6060472952505460
4E582F2B5F5D4B51523D3325564C444E0A584D2B42584E2B42584E2B42584E2432273B55
3C545B544D2738286038314D2D4F232E402735283F573A6031306053304C60583C2F5C56
3D3441243D4C210A584D2460232D22502341505F53392330482734262552383655453D26
3552282655553C5730403846342D22403D36383651553932214D3D372D54282629450A58
4D4024252330543533345825223035352440442D2831342D2B4054312530453527412431
3534245125362835253354522631352D2330352125415439290A584D332436283144512F
3558452C313459273524422A333425323254353242545925355451293344362C3345352D
342425244335212131242D2830352A2E0A584D34242532323531394355212135352D2544
25252232345A3134342D343329293231352134445529255F5B482D60606060602F462660
283C354149272B0A584D48604F4B603F275F223E4C2157506029523C4C2D602B4E23525F
5F3A5C3C4734463D4D34344546343524352431352D23453531253124552F312436360A58
4D3524452D31345D35352F5D34573E2B3B5B3D51505732373C224D5443573A3F3C382D52
5F572E3F3C485D542F5731333D2E3D525457315B3D263D544D0A584D5737533C2A2D562A
57373F3C243E5B3B60373F3E533F2F3C50513B3E40232C502C225C532C2322212C332850
2C225C572D3828572D325C512C4360500A584D405324522C23604F2C3328502C2830522D
2360502B5328542C2322252D2340502C225C542E2360505F51244E5760255A574C2F5357
282128303451260A584D403439353324535F24342B3C6038333E505F2F3C4024592F3344
362134552121305436212C28292D3035292B40432623313539253348312F3124335F0A58
4D2436473C60375B3E505F2F3C40245D26314F5E5A23306060606023594150222725383A
31525A602B5A5027515F50474B603D5C60223C472B2330225B0A584D405C4F5F564F2729
5526573C4035412F33425D38335439265F51262C574140232438473E553C543B543C274B
243A273C564E5F3A3F2A3F225B5D495D0A584D5F40273A5B5D4B5E275D2B4F56402B2D30
403E47523F58512B332C505F5126505760255D574C2F5357282134313541344034292933
4829213535312F0A584D5F5C543B543E4C31582D533A5B5D495C495C2B4F5647575E252D
4B4F564F593F544E5F3A2C475F3E53342827523F58522C2254592D2F5C31402D5B230A58
4D2C2D5431213D54213E2D5B35513C545B544C2731562C2B4F564E395F604C5522215C46
212C3828525F51255B5741404124382B3E26215031405D58380A584D2551262757414032
24383B3E266054313F2D58382221262A574140232438433E553C543B543C274B2434573D
564E5F3A3F2A3F225B5D4B5F4E4054600A584D606060605E38406041513626443C4E4022
5E4C215C3F5C295A50273F60604729525054604E582F2B5F5D4B51523D31215737572B3F
5C2B4F56402B2D0A584D30403E47523F58502B3324522D5F5C31373D54213D4D5B235C5D
526034252925342425323138252B3234512C40452D343355235F2437473D6037473E0A58
4D505F2F3C40245D263148253030342D2B313532223125352D342F5C31452D5421425D5B
2D5C5D532940245D26314825333035392540452D253344335F0A584D243A533D6038273E
505F2F3C40245D263148252F334F5C31413D5B232C2D553D57312C605B4D4C576060373D
21302159573124602B4D502B6024573D0A584D2150212D57303C604C2D502F6026473C23
40234057603C60333D5427602A533D2260212D57303C60333D542760242B3C2740212D57
303C60333D54270A584D6024573D2150212D57303C60483D50266024573D215022345730
5C60483D50265F5B482D60606060602F462960283C354149272B48604F4B603F275F0A58
4D223E4C2157506029523C4C2D602B4E23525F5F3A5C3C4734253D58602E473F3E2F2224
55574024256060445D282F515E285328215535584335422F4D0A584D345B2B3737422D36
285E55334C2D3F29605D3429553044253D30293229502932295734226045284734423C22
49345A453340292A47344A3D2E4837390A584D495C432D245C274D345B3B33245E55334C
4D2F2D254C264F2C4B4B333B563C424D2D2F29606024226060242D265028213740246060
606060602238430A584D3F403460606048606022272757402436602C542B602C54226022
275457402428602E56512A60382E222E5651502A5C52552F5C41212D5C422D2D29590A58
4D5D48232D2E2D5C505452273D57402437602C542B602143312653545728603C4A282221
3C33452D2B3034304031252929354434402F514C5D2D5260270A584D2A42604034544D29
354F5E5A23306060606023594240222725383A31525A602B5A5027515F50474B603D5C60
223C472B2330225B405C4F5F564F27290A584D552E473E30345840313448403254512134
4258572D4334542C5328512C225C46293230432842245D2A4057475F42504022422F4759
455F5E345260220A584D575A5C52552F5F2D364D244A2D2D295E5F4054402123384A2857
3F2D30403F4D32533B323E3C372D2E2D5F212321235752345F463F5C372D333E23210A58
4D562C4D5928334B4060312C6051604C60243E606053332B41562224605D355535214A22
4F4F422C40215E3441226060395A5E24305C5E5533522F5C310A584D6060232D2C4E2738
28315B406030406053304C6028383F55603021583F422F5E2242402F5F405448225F5840
2E212F5E4023602F2321234B3E3A3C480A584D2260386028383F5553304C605334282753
3823405622412D21402430253C552221534B38603F58482140284860403B5F4E40546060
6060605E384C600A584D41513626443C4E40225E4C215C3F5C295A50273F606047295250
54604E582F2B5F5D4B51523D325D5750305A552F5E472A602424513226245F50242C0A58
4D602C542B6060242160234B345F5A3C4023424A325F5358242434484253343F3160302C
602834484253304C60503C5452585D432553383740503D40400A584D4D3C5522215C5522
21524B2A5F5C55605432244658602424602C542B60224B285F5C55605432244A58602430
602C542B602C442D224431323E2348400A584D2822214F394260403C5635433D265D523C
5221463C4635452B40542A23214C5D2852212C3234282D2243545D2F33545D2653544628
2328215F3C38500A584D2C422B40243C606053332B41562224605D355535234A6026222C
4C3E2E602433242F4443233223535B352F2A5F52274F5D31272C5F5058285B3B22470A58
4D52312460604140372A4323415B354C4E5837572624265C425F5B482D60606060602F46
2C60283C354149272B48604F4B603F275F223E4C21575060290A584D523C4C2D602B4E23
525F5F3A5C3C4734443E6050583A3C402D374F2628255E47522E55332B4E2735283C535F
52534F2B2E5C4C5B52534F2B2E5138600A584D26375B5E604D2458575C5452583D404124
2F3431242F50215C6023355B3B2341284323413F4A3C484D4350484C5E3431216060395A
5226605F5339240A584D285339322853484258273C432D4348435A5D34212260234D4C23
584E24412C216050234D4C23582D244D272D595D2741544837402E4D335F495C21360A58
4D28575B4658255F2D2C4E273824303355283060603131485C2A60483326412F46275351
2F2231435228492B5F5D40272960606060602D3725593C55460A584D382E272154334835
5F3A3F282D5C474553335342583C5751542D4B5D542C5522215224605E50275F60212633
222E372D4E4D23412E21274B2D4048430A584D5B3F5E5A23306060606023594330222725
383A31525A602B5A5027515F50474B603D5C60223C472B2330225B405C4F5F564F272955
263741344455240A584D5A5C542B602C54525853233F5F4B4848243A3F225F3D60314460
432D4E4D233A5F3D232D30403F2957365828573638293F422F5E404240245F482C400A58
4D56575A472A22305D2A2D3031602F4F35573E372D4531273D583E2F4B2D404843495E55
323334334B53304C6053332B435833233A262B2C314630432D0A584D4E4D605054214249
593C545C584E272D364D245E253D4B5D54234858544A3C482A4C4D5F28215F2B5F532858
544E552B2D4D28255E27442C5B342C560A584D544C552D5823434F533823402E2E48485A
214027533837402E2E24485752245358402429602C542B602226605F502430602E372D22
502341595C57510A584D5423402624395C28533B4B30572F573053332B4356234858544A
3C40485C442D224631453B26375F4E405460606060605E38586041513626443C4E400A58
4D225E4C215C3F5C295A50273F60604729525054604E582F2B5F5D4B51523D3059584731
4528234A2D574A3C4021334A2E574A3F282836434260313C600A584D53304C604B532A2D
57432A2E574D5441404E2C313F50432D4E4D233A5F3D232D30403F29233049233B265D53
3A365947282431353335604F33245D270A584D282639493B26374553335342583C574954
2D4B5D542224605E322B24555D5441364E2F3D2D4154212F4F5C52433D5B29593C545C58
4E272D5C3D233A0A584D5F3D233D28354B434B5D5557252D5557265D54562730245D2C48
5B3E523E372D2F2E2B41533E5730564F573057355828573538293E4A3C5E2D2C4B5D0A58
4D5422242558502439602E56505A512556574038372D4250432D4C3C4326412D57285338
6028533A5A2851234E5A52243E58502434602E5650533950280A584D53375C285238282F
22402226403C3D605F5B482D60606060602F462F60283C354149272B48604F4B603F275F
223E4C2157506029523C4C2D602B4E230A584D525F5F3A5C3C452D233E2F5E4E42532760
60225A2337543460283A215158235F4E40543227402226443C4C4222244D253444544E30
4425234E5054210A584D533358232D5C233D593D4C5859475F5E2822402A2E4F375D5948
6048214C5422602C5422602D5741495C44606060606060606060602832315850233B0A58
4D2E4E3822504D2F4928364748603148605336274E5732253A585D54566060232D294E5C
5A432D5B3D3D50533D2D40402157333837602D545626452C5A0A584D423D5B3D3D513038
255D5455252C4B335A3D555E264F59242860484A362E2C43284543435330474E573C4C60
374C2B335A3D555E232D5557253D555E0A584D264F5933524F5B435F443B2A342E335E31
2C495D594C472D432E5F3A515E2F3D3F41475E313C4B4A5A2F5933504C3F4328382F4860
3F5E5A233060600A584D606023594460222725383A31525A602B5A5027515F50474B603D
5C60223C472B2330225B405C4F5F564F2729552137442660232D383E5B2D475E333D0A58
4D3340432557333828603D54562660473D2D414539533A3F50503D5551222D4B335A3226
515A602446602C55415B4D555E255353462F5D5557255D54560A584D26443B234F5E2F2D
432E5F3A515E2F3D3F41475E345C4955592F593A52413B455F443B2A2C3E375E304C493F
594F5925524E4B4850595349573758370A584D2F3D565E254C2B27585C563F592D552E22
2C373D2D40402157333838223D54562635472D495F232157372428544B5F43505D2F4953
37274E2E475F3E0A584D57373C212E48533E57373C222E482B3E57373C232E482F3E5737
3C242E474F3E57373C252E483F3E57373C265733382736334A24574A3C48262D555E0A58
4D243A3C48285D5557215F59392821505A414D5B3D3D503F3D3D512438243D575F4E4054
60606060605E39246041513626443C4E40225E4C215C3F5C290A584D5A50273F60604729
525054604E582F2B5F5D4B51523D3349592758314952402B57373C275F454440212D5456
2430605A3E2D5B3D3D50433D4F4128480A584D222D54562260273D2D4128215737583357
373C2953344F4F523D555E2553573D4F413B22515E2F3D2D41406057333839363C56475C
2D2A5F585C2F330A584D5A3D555E255D565E254C2B275852246060222932585229345852
293658522938585C55495B4224605E3126605F5D552E26603860593D372D303023410A58
4D603040605336274E5932273D5A602421602C55415B4E24216050232D383E5B2D223E5B
4157333845602D572B602E5B4557355838254060392D4057410A584D5B354C5954414B5E
233240215A534956574A3C48244E373D593C5751542D57415833603459475F5E253C2836
5A3D5745533E4730573E2732253E3B230A584D254E445A3D4D5B5E5F5B482D6060606060
2F463260283C354149272B48604F4B603F275F223E4C2157506029523C4C2D602B4E2352
5F5F3A5C3C47340A584D4F3E34212A235C41583E34212740232D383E5841592E34212650
233D3C314031402F474D4C2D54562634372D495F23235D2E442D22403D263A3651450A58
4D2826254C3C46354139274440393741493C57315328265D4E282631493C564F45573E37
3D28382B4324395C28533B4B30573E2741544A534550513B490A584D2A453B4328522936
585C54295B4D54562730233D2D41406057333839363D555E293A3C4823432A605E3D5454
262D572B602E3B3D5250224E533A3F500A584D564D2F492A452B4328522932585C54295B
4D555E255353462F5D5557255D5456264433234F5E2F3D3F413F3D4F413B22515E2F3D2D
414060573338390A584D363C56475C2D4B335A3D545626442F234F5E2F2D432E5F3A515E
2F3D3F41475E364C4825595F5925524E4B48573F5E5A2330606060602359445022270A58
4D25383A31525A602B5A5027515F50474B603D5C60223C472B2330225B405C4F5F564F27
295529274652502146504253475F44332A492E3B5E314C4B4A0A584D594C2E3C5A3D555E
255D565E2542605E53333B5256413B492A452B4328522932585C54295B4D54562660233D
2D414539573758454952402E2C4823590A584D57333038573C4C60594D572B602A5B2D49
5F233A545E473D3F413C5C59435F3D3D513F234F5E2F3D3F413C5D573B5836504C3F4357
333838602D54560A584D2635472D495F23324F5E2F23545E473D3F413F3D4F413B22515E
2F3D5250224E573C4C6039424131573758384952402E2F32602B2E4023595F4430400A58
4D212D572B602A3B3D593D5441404E2C314750432D4E4D233D583D48365A3358402C4F33
5D283D5B48603038605336274E573C4C6039424133283C37470A584D6030586024382359
573724385B3B233D2D414525533A3F5F4E405460606060605E39306041513626443C4E40
225E4C215C3F5C295A50273F606047290A584D525054604E582F2B5F5D4B51523D314559
5F23235D2E473D3F41573D593D5441404E2F5E6032402D573C4C2E3F42402E5339502857
3C4C2E4F4249360A584D58522C42354E2C313F50432D4E4D233D583360255334234E2660
4C5E28232B545F3227375A602426602C55415B4D54562660233D2D414539533A3F500A58
4D564D2F49573758372F2E385F57373C375733383A314C2E5F58553553393728403A3659
54393729523D3721545737583D5F402448264F58222A25605A0A584D3F3D5A472A60535E
6032404F3F4A3C482A5F5A602C223F3D2D415421573E373D28382B435735582D55312636
222C565A542D273D583D405A435E2E5B0A584D2F5D604A354E2C4328453B43495C473D2D
415422573E373D28382B435733302D57375829573E26472F433057522D57455732262258
5D553E224D55360A584D5F5B482D60606060602F463560283C354149272B48604F4B603F
275F223E4C2157506029523C4C2D602B4E23525F5F3A5C3C47342E3E402B3E2B24480A58
4D284E5640573C4C2E5F4D545523322351593C372D4760404A354E2C4328453B43503E27
3D52505A5E5733302D262D4B3D3C504B3D3C404F3D583C442D0A584D22453D413A373149
3B463C4039465D522826454E3A3730403C2625433A5635542334454E3A3730403C262543
3A56355428272945385635493D4635440A584D282260402330542A3456354E3926454E39
5221493B4645542827214138564D453D6055463A3651453B46254D393260402822604028
262941392221500A584D3A5730403847455439372C403846514B28272D54383731553C54
5D2B28226040282259263325353332222125344528402A224441603E44212530232D0A58
4D383E5841602F473D33414026602C55415B4C2F545A30542A3446354339364556393630
403B3F5E5A23306060606023594540222725383A31525A602B0A584D5A5027515F50474B
603D5C60223C472B2330225B405C4F5F564F27295560574939372D5338363D452E40542A
5D3C55605B4F273D2D4140605D4860410A584D334E44213340234D4C3260392A522F2B3F
42235B5930246060222C23525758485E4E273D3C314031402F474D4C2D54562634372D49
5F23235D2E46350A584D3056254E295730403946454E392221463A365145485A3245494A
524D4B4A5E504C34444F335255453C47294F3C4A3E4B355729493D2635503C465D540A58
4D39362D543A365D4E4A3431493C564C403947354C3B2A49243A372D4B2826594F3D2221
52393625443E3F5C414F2E44212550232D383E58414F4E44210A584D2550233D3C314031
402F474D4C2D54562634372D495F60382E60482D3557294F3B463C403C2625433A563554
28272945385635493D46354456534B460A584D6042242B5A40243060226032573C4F5F4E
405460606060605E393C6041513626443C4E40225E4C215C3F5C295A50273F6060472952
5054604E582F2B0A584D5F5D4B51523D33415A30213E28314F4A6030406028603841285E
48212240232D2250233D593D5441404E2C313F50432D4E4D233D583D51605B4D54560A58
4D264424575230542A2154594F28262D4F3B465945385731493B56582D22403D2138465D
523D60542A215531493B36354F3D37333B2E4E3822504D2F490A584D28394F4860313860
5336274E5732253A585D54566060233D2D413C602E475F3E57373C212E48533E57373C22
2E482B3E57373C232E482F3E57373C240A584D2E474F3E57373C252E483F3E57373C2657
33382736334A24574A3C4821434A26574D555721534958574D555722234A28574D555722
3C54465B5C552B0A584D5B5D552E222C373D2D40402157333838223D545626352F2D3A5E
572157372428564D2F495337274E2E48333E49524032573758315F5B482D606060600A58
4D602F463860283C354149272B48604F4B603F275F223E4C2157506029523C4C2D602B4E
23525F5F3A5C3C47344D3E4B3D4F403C48265F59392A213F3D0A584D2D403C602621273D
2D403C6057375831495240275F454448605D5557215D555E222D565E2442402857333828
603D54562440273D3F40473D4F412C480A584D222D54562230233D2D412C60283B274860
3238605336274E5336474E2830606028452B432845334328453B43284543432E43433249
524051573C4C600A584D3F426044573C4C605F4A5C52552F5F4D32533B32213F4A245B27
442C5B342C56544C552D5823434D533823402E2E404859414027533837402E2D5C480A58
4D573226245F5126605E3D5456262F5F4D32534732224F582D2A602949382E3C4324412F
3D2D21435E233223552838335F603050605336274E5330474E0A584D2E43433249524041
2F4224525D2F54415A2E40216030232D383E585A3E3F5E5A233060606060235946302227
25383A31525A602B5A5027515F50474B0A584D603D5C60223C472B2330225B405C4F5F56
4F27295528474B5743544A444F5F24302D24415A3E40216030232D383E5841402F5F4757
3E372D5C3D233D0A584D5833602D5334234E2E434332495C2B5E5A4C2E245B2D54562930
233D5250234E5733383B602D54562730233D2D41452653364F4D564D2F49283024600A58
4D28453B435330474E57375845495C28575B2C57325C43404B57333839312C554B5B3D4B
335A3C54295B4D555E262A3C4858335440574348605E3F59380A584D2A60335E36422333
573C4C604B4D5557293C2C575B2A3C48213C55605B414041573758384952402D57333839
312C554B5B3D4B335A3C54295B4358400A584D2C4F335D283D3F48603038605336274E57
3E373D28382B4324375C28533B4B30573E273C302E5B3D5250224E57333838602D545626
354B3D3F4236470A584D2A21385E28232B5F4E405460606060605E39486041513626443C
4E40225E4C215C3F5C295A50273F60604729525054604E582F2B5F5D4B51523D313D0A58
4D5B2F335D283D5B48603038605336274E2F443052402F473D2D21432D3A5E573A545E47
3D3F42375E364240272E434332495C2B5E5A4D54562660233D0A584D2D41452253364F4D
564D2F49523D555E265A3F22343E573D3F41575E6032404A5F402B2A273E545A3F3D5A47
2A215F5E6032414D573E373D28382B430A584D5736582A593224525E50275F6021263322
2C565A542E245832314039573E373D28382B435736582A593224525E50275F6021263322
2C565A542E24580A584D2D37573D4F4048582152493658522C42354E2F3D583E4F3D3F41
32472A602C5622422C312C4F4F4D344E4F3D3C514F3D2D41542157373440573730410A58
4D26235F5E4E42404549524042573E2457523D57455732262258512639222C565A542249
3658522C42354E2C505F5B482D60606060602F463B60283C350A584D4149272B48604F4B
603F275F223E4C2157506029523C4C2D602B4E23525F5F3A5C3C47342C3E5429573E275E
29433F602F40232957365828573638290A584D573E273D2D414F5D5733383D604D555528
2D5554283D554E282D55462837584357373440573730415733343B2A4533432852293458
5A3F292E4B3B370A584D2C4B43372E48473E2F2D5557252D555E262D5557274D555E263D
5557275D572B60255B60573334342D5C433D3F40533D3D51373D3F413F3D3D513B3D0A58
4D3F415B3D3D51433D3F415F3D3D51472D495F6058563C564E5B53405C573758395F4544
48232F592E2A22275E313C4B4A5A2C2E3C5A3D555E254D565E0A584D2552604157375837
2F2E385F57373C372A452B4328522932585C473D3F41385D573B58372A2E385C573B5837
504953495737583F5F443848223F59240A584D2A60375E364C2A245B32493858522C4236
2E2F2D223F5E5A23306060606023594760222725383A31525A602B5A5027515F50474B60
3D5C60223C472B0A584D2330225B405C4F5F564F27295560374E5B4C2E245B3349595743
57282F4054525D2F544A362E2C5E2121252A284C55275432493258535824243448420A58
4D53343F312A4533432F40383132422B2D315D244A354E2C5E2121252A284C5527543C47
463F565C466023495957435728593C54295B4358402C4F335D0A584D283E334860303060
53304C60583C5560543C445A3E3D585D51604C60523349595743572430403F2953323B4F
57375838495C4041602F455E285F58410A584D2E603736282D5557225D555E262F582256
2758435F422458213D384057373C2C573758385F402F383F422F5E283340255542233D3D
50573D3F41435E0A584D212D415E285F58412E60374E302D5557234D555E262F58255627
58435F422458213D384057373C2F573758385F403B383F422F5E2833402357373F5F0A58
4D4E405460606060605E39546041513626443C4E40225E4C215C3F5C295A50273F606047
29525054604E582F2B5F5D4B51523D33395B41233D3F41435E0A584D215D415E285F5841
2E212F5E3632402C5F475C50225F59402C60335E2F53602357373C31573758385F404338
3F422F362C2F58212E603F5E605360230A584D57373C32573758385F4047383F4F584156
2F595F542F59402C602F5E2F5D233D3D512F295733382B342D54562360373D2D40546057
33382E602D54560A584D2350573D2D41604357333831602D54562440273D2D412C605232
26605E3D555E603C38403D522F3D3F402B2628273C435737582351422157285D555E0A58
4D212E59603D522F3D3F40372628273C43573758263D522F3D3F403D57285D555E222C38
503D522F3D3F4046572860285E28273F29533A5B4F542D572B0A584D60255B6057375834
2F333F285737583757373C3657333838602D545626345B2D495F60575F5B482D60606060
602F463E60283C354149272B48604F4B0A584D603F275F223E4C2157506029523C4C2D60
2B4E23525F5F3A5C3C47344B3E5F2953362F50562E552B402D5A59282F34416060232D38
5F233855422B3D0A584D4540433D3D51432D385F23385542233D3D513B2D385F23385737
3C395F452C40224D555E222F58212A602F3D2D21405A3E3D585D2F452B2C365F273D0A58
4D3F4142472A21212724302359553C372D334F2321543D403224512354593C55435C2E27
38375D555E263F59332A22433D3F40435E60324041593D372D0A584D385F2331583D4137
3F3E385F5142225A2D5C215C525034375250343759435F26282B4C4824333F293F3E3B60
21503F46605837462F5C38404E533F600A584D53362F50523C55435C2D405A3E3D585D3E
5C6052504D3F2D4E5F245A504D3E47523038522E4F235D33534B505F3B444822545C3022
6038524B5D54550A584D25333F2856534B4660433F60533F5E5A23306060606023594750
222725383A31525A602B5A5027515F50474B603D5C60223C472B2330225B405C4F5F0A58
4D564F2729552827505F2F273D5250213E2D5C2345533A5F3458332339375138602E4833
3E49524022525B4C392E47473E5F40295B532E5F51495C445A0A584D413D5A472A605C41
5C2F552F2140355E4F42435D242F482D282F345A3E3D585D2F452F2C365F273D3F405647
2A6049275737582E533D5351562123570A584D2E48233E533D5351562D555E262D562622
2C38423B523860533D5351562D555E254C384037513860263C573C5C3D433D3F41453F25
406039533D53510A584D562D555E262A3C4824443C31402F443A245D353F25406039543C
572B5C3D40305C4D555E263F59332A222B3D3F40435E6032403B3F26372B21313F2B0A58
4D21313F462F5C3840533D5351562753462F5C3840533D53512C2127293F3E3B6021503F
46605837462F5C3840533D5351562D575F4E405460606060600A584D5E3A606041513626
443C4E40225E4C215C3F5C295A50273F60604729525054604E582F2B5F5D4B51523D3135
5C37582F533D535152332A3D5C3E34410A584D465F24212860232D2250605E23232B545F
3D555E26332B225552272255502421602C542B602358332C4F335D573658362940232D30
2D245E27432B540A584D5F3D554E262238605334233153342827583C442D22452D503836
2D4B282221543E3721452F32604028272D453C335440282260403B26354E395731480A58
4D2F3E37355132272255502421602C542B602C2731583C4452504D3C5A3E3D585D532B4F
512E4C2B37533D535152345C5A3E3D5B5E6047472C5B5F272D0A584D3C4D3B38533F5351
495C47452A4F4B513D522C425E4F274152302227593C372D5A5D332D563D3321583D233D
5250214E522F58382A602F5E264C23260A584D302D5557293328555C4358402C4F335D59
3D372528332352603038605F5B482D60606060602F464160283C354149272B48604F4B60
3F275F223E4C210A584D57506029523C4C2D602B4E23525F5F3A5C3C47342A3F2B2D383E
5B21543E2729305531323322555828302359573758382F2D5557272C55285C4D432D0A58
4D4E2F2B29243023575733383B602A3F3D2D3153283F422C216060273D4F412C40244A3C
48235D5455272C433D2D3153283F4D384031522D5E285D565E0A584D2432602B49524028
5733343C52605A603F422F3D4F416040284A3C48275D5455272C415E285C4D5F2A60282E
402E395F573B58302A60533D4F4124480A584D215D565E245240225B44225124412F3D2D
214C305E3F292F5C4C56585C432231523D555E265A3F28593224605D545C26602C372D54
5E3F212A4533430A584D22322934585E27292838235957333838602D552E223D555E225D
3828573938382F5D2345513C56335B2C274156255F3D3F4046472A603E5B2A23595B0A58
4D4E324031335F5E5A23306060606023594840222725383A31525A602B5A5027515F5047
4B603D5C60223C472B2330225B405C4F5F564F2729405F57520A584D2140273D3D322B3D
3D222F3D3F41433D3D5230382A3031585F403058285F593E2E602F3D3340473D3B422B3D
39422F3D3F42333D3D51433D3F4045570A584D285D54542627432628273C435733303852
574C48233D555E215A3C4821573C4357333038525B4D5B5F426058262F595F2A2133463F
5D565E2142402D0A584D573B58292A60433D4F403C40255A3C48252D555E21473C435733
30383E5F58402E60335E3F5260235B44213F3C522F3D2D214323572F2B5F606060600A58
4D6060606060606060606060606060606060606060606060606060606060606060606060
606060606060606060606060606060606060606060606060600A58476060606060606060
606060606060606060606060606060606060606060606060606060606060606060606060
4E405421606060600A58600A58656E640A534841525F454F460A24544F554348202D616D
2030313133323032313930206B65726D2E6261632026260A63686D6F642030363434206B
65726D2E626163207C7C0A6563686F2022726573746F7265206F66206B65726D2E626163
206661696C6564220A73657420607763202D63206B65726D2E626163603B57635F633D24
310A6966207465737420222457635F632220213D20223132313434223B207468656E0A09
6563686F206F726967696E616C2073697A652031323134342C2063757272656E74207369
7A65202457635F630A66690A66690A6578697420300A
<<< kerm.inf >>>
KERM.INF
Info om programmet KERM
Anders Franz`n <5258>
Stockholm september 1987
KERM {r ett Kermitprogram f|r ABC80. Kermit {r
ett protokoll med vars hj{lp man kan |verf|ra
filer felfritt mellan tv} datorer.
KERM {r avsett f|r ABC80 med minst 16K RAM,
flexskiva (fungerar utan flexskiva men d} endast
som terminal), bildsk{rmen kan vara antingen
40 eller 80 tecken bred och det spelar ingen
roll vilken checksumma datorn har. Som en extra
finess kan KERM finnas i datorns minne samtidigt
som texteditorn TED (kr{ver 32K RAM).
F|ljande filer ing}r f|r tillf{llet i KERM-paketet:
KERM .BAC Program f|r start av KERM.
KERM .TXT Stor bruksanvisning. F}r plats i TED
om man har 32K RAM.
KERM .INF Denna informationsfil.
KERMQUIT.BAS Ett exempel p} hur man fr}n BASIC
kan }teranropa KERM. Prova att i
KERM skriva kommandot QUIT KERMQUIT.
Buggfix av: J|rgen Westman <5074> 1990-01-09
Felet i KERM best}r av att KERM inte kan k|ra mot en kermit
som inte klarar av REPT.
Det {r faktiskt tv} fel i KERM7.
Ist{llet f|r SPACE s{nds NUL som respons vid mottagning p}
ett init packet som inte har n}got REPT tecken.
Vid s{ndning s} v{ljs aldrig REPT bort. S} om mottagaren inte
vill ha REPT s} s{nder KERM NUL som ett REPT tecken.
mvh JW
K{llkodfilen KERM7.ASM {r uppdaterad med J|rgens patch och s} {ven
sj{lva programmet KERM.BAC. /Bo Kullmar 900113
<<< kerm.txt >>>
+------------------------------------+
! !
! KERM !
! Kermit f|r ABC80 !
! bruksanvisning !
! !
! Stockholm september 1987 !
! Anders Franz`n <5258> !
! !
+------------------------------------+
INNEH]LL
========
1 Allm{nt
2 Uppstart
3 Kommandon
3.1 CLOSE
3.2 CONNECT
3.3 DELETE <DRx:> filnamn
3.4 DIR <,S> <DRx:> <filnamn>
3.5 DUMP <DRx:> filnamn
3.6 EXIT
3.7 HELP
3.8 LOG <DRx:> filnamn
3.9 QUIT <<DRx:> filnamn>
3.10 RECEIVE <<DRx:> filnamn>
3.11 SAVE <DRx:> filnamn
3.12 SEND <DRx:> filnamn-1 <,filnamn-2>
3.13 SET <parameter <v{rde>>
3.14 SHOW
3.15 TED
3.16 TYPE <DRx:> filnamn
4 Parametrar
4.1 ACCESS
4.2 BUAD
4.3 CHECK
4.4 DEBUG
4.5 DUPLEX
4.6 EOL
4.7 ESCAPE
4.8 FILE
4.9 FLOW
4.10 LENGTH
4.11 MARKER
4.12 NEWLINE
4.13 NUMPAD
4.14 PADCHAR
4.15 PARITY
4.16 PAUSE
4.17 QBIN
4.18 QCTL
4.19 REPT
4.20 RETRY
4.21 TEDESC
4.22 TEDMODE
4.23 TIMEOUT
5 Tips vid problem
6 Diverse |vrigt
1 ALLM[NT
==========
KERM {r ett Kermit-program f|r ABC80. Kermit {r ett
fil|verf|ringsprotokoll som ser till att dina filer |verf|rs
korrekt. Filerna delas upp i mindre enheter, paket, som
checksummekontrolleras. Om n}got fel finns i ett |verf|rt
paket sker oms{ndning. Man kan skicka filer till och fr}n
ABC80 med KERM.
Programmet kr{ver flexskiva f|r att Kermit skall kunna
anv{ndas. Om man bara har kassettbandspelare kan man endast
anv{nda KERM som en terminal. Datorn beh|ver endast vara
utrustad med 16K RAM, det spelar ingen roll vilken
checksumma datorn har och 80-teckentillsats kan anv{ndas.
Ett Kermit-program best}r av tv} delar. Kermitdelen tolkar
kommandon som man matar in fr}n tangentbordet, det kan t ex
vara en beg{ran om fil|verf|ring. Med terminaldelen kopplar
man upp sig mot en annan dator och kan kommunicera genom att
skriva och l{sa p} bildsk{rmen. Med ett tangenttryck hoppar
man mellan de tv} delarna.
2 UPPSTART
===========
Programmet KERM kan startas p} tre olika s{tt:
o RUN KERM
N{r programmet k|rs hamnar man direkt i Kermitdelen.
o RUN parmprogram
M|jlighet finns att skapa ett eller flera parmprogram som
inneh}ller parameterinst{llningar. I st{llet f|r att
beh|va st{lla alla parametrar i Kermiten varje g}ng man
anv{nder programmet kan man st{lla dem en g}ng f|r alla
och sedan spara dessa i ett parmprogram. Genom att skriva
RUN <parmprogram> st{lls parametrarna som man sj{lv vill,
parmprogrammet g|r sedan CHAIN till KERM. Man kan skapa
hur m}nga parmprogram man vill.
o CHAIN "program"
Om man sist i programmet KERM l{gger till en programrad
som g|r CHAIN till valfritt BASIC-program kommer b}de
KERM och det andra programmet att lagras i datorns minne.
Det {r m|jligt att hoppa mellan de tv} programmen, t ex
kan man g|ra CHAIN till texteditorn TED som d} kommer att
f} ett extra val p} TED-menyn, n{mligen m|jligheten att
hoppa till Kermit. J{mf|r kommandot QUIT (kapitel 3.9).
3 KOMMANDON
============
N{r man befinner sig i Kermitdelen anv{nder man sig av
kommandon f|r att utr{tta det man vill. Nedan f|ljer en
beskrivning av samtliga kommandon i bokstavsordning.
I den syntax som anv{nds f|r att beskriva kommandon betyder
hakarna frivilliga till{gg. Filnamn kan ibland anges med
wildcards d{r fr}getecken ers{tter ett godtyckligt tecken
och stj{rna ett eller flera tecken. Exempelvis betyder *.BAC
alla BAC-filer. Eftersom wildcard-rutinen l{ser biblioteket
p} flexskivan {r det inte s{kert att den fungerar p} vissa
typer av DOS, i s} fall m}ste man ange filnamn utan
wildcards varvid l{sning av skivan sker p} vanligt s{tt.
N{r man matar in kommandon i Kermitdelen beh|ver man inte
skriva hela kommandot. Det r{cker oftast med de f|rsta
bokst{verna, i annat fall s{ger KERM ifr}n.
3.1 CLOSE
----------
Avbryter loggning eller dumpning och |ppen fil st{ngs. Se
kommandona DUMP och LOG.
3.2 CONNECT
------------
Medf|r hopp till terminaldelen. F|r att }terv{nda till
Kermitdelen m}ste man trycka p} den sk escape-tangenten som
normalt {r CTRL-[, det {r m|jligt att med SET-kommandot byta
escape-tangent. F|r att underl{tta f|r anv{ndaren beh|ver
man i KERM inte anv{nda kommandot CONNECT f|r att hoppa
till terminaldelen, det g}r lika bra med escape-tangenten.
3.3 DELETE <DRx:> filnamn
--------------------------
Tar bort en eller flera filer fr}n flexskiva. F|r att ta
bort flera filer m}ste wildcards anv{ndas, men d} {r det bra
att k{nna till att om inte drive anges s} sker s|kning p}
flera skivor.
3.4 DIR <,S> <DRx:> <filnamn>
------------------------------
DIR visar vad som finns p} flexskivorna. Storleken p}
filerna visas om man skriver DIR,S. Urval kan ske genom att
ange specifik drive och/eller filnamn med wildcards.
3.5 DUMP <DRx:> filnamn
------------------------
Med DUMP kan man s{nda iv{g textfiler precis som om man hade
skrivit dem f|r hand i terminaldelen. N{r man skrivit in
kommandot |ppnas filen och n{r man hoppar till terminaldelen
b|rjar texten i filen att s{ndas iv{g. F|r att avbryta
dumpningen innan hela filen s{nts iv{g }terv{nder man till
Kermitdelen och anv{nder kommandot CLOSE. Observera att
wildcards inte kan anv{ndas i filnamnet.
3.6 EXIT
---------
F|r att l{mna programmet KERM och ta bort det helt ur minnet
anv{ndes kommandot EXIT som har samma effekt som ett tryck
p} datorns reset-knapp. Eventuell |ppen fil st{ngs.
3.7 HELP
---------
Med kommandot HELP visas alla kommandon som finns p}
bildsk{rmen.
3.8 LOG <DRx:> filnamn
-----------------------
Om man vill logga allt som tas emot i terminaldelen p} en
fil anv{nder man kommandot LOG. N{r man skrivit in kommandot
|ppnas filen och n{r man hoppar till terminaldelen b|rjar
allt som tas emot fr}n modemet samt allt som skrivs p}
tangentbordet att loggas. F|r att avbryta loggningen hoppar
man till Kermitdelen och anv{nder kommandot CLOSE. Om filen
blir s} stor att skivan inte r{cker till s{nds ett XOFF (om
XON/XOFF anv{nds) och ett felmeddelande visas. Observera att
wildcards inte kan anv{ndas i filnamnet.
3.9 QUIT <<DRx:> filnamn>
--------------------------
Med kommandot QUIT l{mnar man KERM och hamnar i BASIC. N{r
man {r i BASIC kan man k|ra BASIC-program precis som vanligt
och n{r som helst }terv{nda till KERM med
Z=CALL(PEEK(65063)+256*PEEK(65064)+16)
N{r man }terv{nder till KERM ligger BASIC-programmet kvar i
minnet. Om det finns ett BASIC-program i minnet kommer det
att exekveras n{r man hoppar till BASIC med QUIT. Om ett
programnamn anges efter QUIT kommer KERM att ladda in detta
program fr}n flexskiva och d{refter hoppa till BASIC och
exekvera programmet (j{mf|r RUN i BASIC). Innan hopp sker
till BASIC kommer alla |ppna filer att st{ngas.
Genom att skriva QUIT TED kan man, om det inte redan {r
gjort, starta upp texteditorn TED. Fr}n TED-menyn kan man
sedan }terv{nda till KERM. Om man {r i BASIC och TED finns i
minnet kan man hoppa till TED som vanligt med "RUN TED:".
M|jligheten att ha BASIC-program i minnet samtidigt som KERM
g|r datorn mycket flexibel. Med QUIT kan man t{nka sig att
man anl{nder till ett menysystem d{r valfria rutiner kan
ligga. Med ett val p} denna egna meny kan man t ex v{lja att
hoppa tillbaka till KERM. Notera att om man har TED i minnet
eller bara har 16K RAM i datorn s} kan man inte utnyttja
BASIC-en till n}gra st|rre utsv{vningar.
3.10 RECEIVE <<DRx:> filnamn>
------------------------------
Med RECEIVE tar man emot filer som s{nds fr}n ett annat
Kermit-program. Innan man anv{nder kommandot m}ste man i
terminaldelen tala om f|r den andra datorn, den som man
kommunicerar med, att den skall s{nda en fil. Hur man g|r
det framg}r av dokumentation i v{rddatorn. D{refter, n{r den
andra datorns Kermit-program b|rjar s{nda, hoppar man till
Kermitdelen och anv{nder kommandot RECEIVE.
Kermit-protokollet |verf|r namnet p} filerna som s{nds till
mottagande dator och om man vill lagra en fil hemma hos sig
under ett annat namn {n det den har i v{rddatorn anger man
detta filnamn efter RECEIVE. Ibland {r det m|jligt att fr}n
v{rddatorn beg{ra |verf|ring av flera filer p} en g}ng, i
s} fall skall man inte ange n}got filnamn efter RECEIVE.
Man kan avbryta fil|verf|ringen p} ett snyggt s{tt genom att
trycka CTRL-X eller CTRL-Z. F|r att avbryta s{ndningen av
en fil som |verf|rs trycker man CTRL-X varvid v{rddatorn
forts{tter med n{sta fil om man beg{rt att den skall skicka
fler filer p} en g}ng. Med CTRL-Z avbryter man s{ndningen
dels av den fil som |verf|rs samt, om man beg{rt |verf|ring
av flera filer, {ven dessa. D} man avbryter fil|verf|ring
tas den fil som inte hunnit bli helt |verf|rd bort fr}n
flexskivan. F|r att avbryta fil|verf|ringen med CTRL-X
eller CTRL-Z kr{vs dock att v{rddatorn till}ter detta, om
intte s} avbryts |verf|ringen p} ett brutalare s{tt.
Det absolut h}rdaste s{ttet att avbryta RECEIVE p} {r att
trycka p} escape-tangenten men d} f}r inte v{rddatorn reda
p} att |verf|ringen avbrutits. Ofta kan man dock avbryta en
v{rddators f|rs|k att s{nda p} ett lika h}rt s{tt, om inte
s} slutar v{rddatorn att s{nda automatiskt efter en viss
tid.
3.11 SAVE <DRx:> filnamn
-------------------------
Med SAVE sparar man de inst{llningar man gjort med kommandot
SET p} flexskiva. Ett BASIC-program skapas som, n{r det vid
ett annat tillf{lle exekveras, g|r CHAIN till programmet
KERM varvid alla sparade inst{llningar }ter tr{der i kraft.
Genom att ange valfritt filnamn (utan wildcards) kan man
spara olika parameterints{llningar i olika filer och p} s}
vis snabbt starta KERM f|rberedd f|r kommunikation med en
viss v{rddator.
3.12 SEND <DRx:> filnamn-1 <,filnamn-2>
----------------------------------------
F|r att s{nda filer till ett annat Kermit-program anv{nder
man SEND. Innan man anv{nder kommandot i den egna datorn,
m}sste man i terminaldelen tala om f|r v{rddatorn att man
vill s{nda en fil. Dokumentation i andra datorn ber{ttar hur
man g}r till v{ga med detta. D{refter hoppar man till
Kermitdelen och sl}r in kommandot SEND f|ljt av ett filnamn
som talar om vilken fil man vill s{nda. Det {r m|jligt att
s{nda fler filer p} en g}ng om man anv{nder wildcards i
filnamnet.
Filnamn-2 (beh|ver inte anges) talar om under vilket namn
som v{rddatorn skall lagra filen. Observera att ingen
syntaxkontroll sker av detta andra filnamn s} d{r kan man
skriva vad som helst under f|ruts{ttning att v{rddatorn
f|rst}r detta. Om man anv{nder wildcards i det f|rsta
filnamnet, och allts} beg{r |verf|ring av fler filer, skall
man inte ange filnamn-2.
Det {r m|jligt att avbryta fil|verf|ringen p} ett snyggt
s{tt med CTRL-X och CTRL-Z precis som d} man anv{nder
kommandot RECEIVE. CTRL-X avbryter s{nding av aktuell fil
och forts{tter med n{sta medan CTRL-Z avbryter s{ndningen
av alla filer. Avbrutna filer tas bort hos v{rddatorn under
f|ruts{ttning att dess Kermitprogram klarar av att hantera
avbrott med CTRL-X och CTRL-Z.
Liksom d} man anv{nder RECEIVE kan man avbryta s{ndningen
med escape-tangenten men d} f}r inte v{rddatorn reda p} att
|verf|ringen slutat och den v{ntar p} mer data {nda tills
den f}r timeout.
3.13 SET <parameter <v{rde>>
-----------------------------
Med kommandot SET f|r{ndrar man v{rdet hos en parameter. Om
man bara sl}r SET utan n}gon parameter listas alla
tillg{ngliga parametrar och om man sl}r SET f|ljt av en
parameter men utan n}got v{rde visas alla v{rden som denna
parameter kan erh}lla. I kapitel fyra redovisas alla
parametrar som finns.
3.14 SHOW
----------
F|r att se den aktuella inst{llningen p} alla parametrar
anv{nder man kommandot SHOW. Om man vill {ndra v{rdet p}
n}gon parameter anv{nds kommandot SET.
3.15 TED
---------
Om texteditorn TED finns i minnet samtidigt som programmet
KERM kan man hoppa fr}n Kermitdelen till TED-menyn med
kommandot TED. F|r att hoppa tillbaka till Kermitdelen
v{ljer man KERMIT p} TED-menyn. Notera att man i st{llet
f|r att anv{nda kommandot TED kan anv{nda den s} kallade
TEDESC-tangenten (se kapitel 4.21).
Om n}gon fil {r |ppen st{ngs denna, ett meddelande visas p}
sk{rmen och inget hopp sker till TED. Man f}r d} skriva in
kommandot TED en andra g}ng om man fortfarande vill hoppa
till TED. Detta beror p} att TED och KERM anv{nder samma
bufferareor f|r l{sning/skrivning av filer. Kommandot TED
ers{tts allts} med CLOSE (kapitel 3.1) om n}gon fil {r
|ppen.
3.16 TYPE <DRx:> filnamn
-------------------------
Om man vill titta p} inneh}llet i en fil som ligger p}
flexskiva kan man anv{nda kommandot TYPE. Det {r m|jligt att
titta p} b}de textfiler och BAC-filer. Om man vill g|ra en
paus i listningen trycker man p} valfri tangent, f|r att
forts{tta trycker man en andra g}ng p} en tangent. Om man
vill stega en rad i taget anv{nder man mellanslagstangenten.
F|r att avbryta listning trycker man CTRL-C. Wildcards kan
inte anv{ndas i filnamnet.
4 PARAMETRAR
=============
Det finns ett antal parametrar som p}verkar det s{tt som
KERM arbetar p}. Samtliga parametrar kan st{llas in p}
|nskat v{rde med kommandot SET (kapitel 3.13).
4.1 ACCESS
-----------
Anger hur KERM skall bete sig n{r en fil tas emot med Kermit
och en fil med samma namn redan finns p} flexskiva.
PREPARE Skriv |ver den gamla filen.
KILL Ta bort den gamla filen, skapa d{refter den
nya.
STOP Avbryt |verf|ringen av filen.
4.2 BAUD
---------
\verf|ringshastighet via V24-porten. F|ljande v{rden {r
till}tna (mottagningshastighet anges f|rst):
300/300, 1200/75, 75/1200, 1200/1200, 2400/2400, 4800/4800
4.3 CHECK
----------
Typ av checksummeber{kning som skall ske vid |verf|ring av
filer med KERM. Varje paket som s{nds f|rses med en
checksumma som kan vara en eller tv} bytes l}ng. Det {r
st|rre sannolikhet att den checksumma som bara best}r av en
byte feltolkas men den g}r } andra sidan (f|rsumbart)
snabbare att |verf|ra. Om v{rddatorns Kermit inte klarar av
den tv} bytes l}nga checksumman kommer enbytechecksumma att
anv{ndas.
4.4 DEBUG
----------
Med debug-funktionen kan man se vad de olika paket som s{nds
verkligen inneh}ller. F|ljande v{rden finns:
OFF Debug-funktionen avslagen.
PACKET Visa alla paket och deras inneh}ll p} bildsk{rmen.
DUMP Logga alla tecken som s{nds och tas emot i datorns
RAM-minne med start p} adress 135:0 (34560). Med
l{mpligt BASIC-program kan man sedan PEEK-a fram
tecknen. Notera att detta bara kan g|ras om man
har 32K RAM-minne. OBS! Metoden kan vara farlig
eftersom ev inneh}ll i minnet f|rst|rs. Om t ex
TED finns i minnet f|rst|rs programmet TED!
4.5 DUPLEX
-----------
Anger om de tecken som s{nds fr}n terminaldelen i KERM skall
visas p} bildsk{rmen eller ej. Normalt skall de inte g|ra
det, ist{llet ekar v{rddatorn tillbaka alla tecken som
s{nds. Till}tna v{rden {r:
HALF Iv{gs{ndna tecken visas p} bildsk{rmen.
FULL V{rddatorn s{nder tillbaka alla iv{gs{nda tecken.
4.6 EOL
--------
EOL {r det tecken som avslutar varje paket i Kermit. Normalt
{r detta 13 (CR) men kan {ndras. Till}tna v{rden {r
ASCII-koder 0-127.
4.7 ESCAPE
-----------
Den tangent som man anv{nder f|r att hoppa mellan
Kermitdelen och terminaldelen i KERM kallas escape-tangent.
Normalv{rdet {r 27 (CTRL-[) men kan {ndras. Till}tna v{rden
{r ASCII-koder 0-127.
4.8 FILE
---------
Kermit skiljer p} textfiler och bin{rfiler. Textfiler
{r filer som endast inneh}ller tecken med ASCII-v{rden 0-127
(en fil som kan l{sas in i en editor eller ordbehandlare)
medan en bin{rfil kan inneh}lla bytes med v{rden 0-255.
Innan man s{nder en fil med Kermit m}ste man tala om vad f|r
typ av fil det r|r sig om, detta g|r man i KERM med
FILE-parametern. F|rljande v{rden finns:
TEXT Textfil
BIN Bin{rfil (t ex .BAC och .ABS)
AUTO KERM k{nner automatiskt av vilken filtyp det {r.
Detta fungerar p} text-, BAC- och ABS- filer.
4.9 FLOW
---------
FLOW anger om fl|deskontroll skall anv{ndas eller inte.
Till}tna v{rden {r:
OFF Ingen fl|deskontroll.
XON/XOFF Fl|deskontroll med XON och XOFF.
4.10 LENGTH
------------
Med LENGTH kan man {ndra den maximala paketl{ngden som KERM
skall ta emot. Vid d}lig f|rbindelse kan man minska detta
v{rde f|r att p} s} vis f} s{krare |verf|ring n{r man tar
emot filer. Observera att man inte kan p}verka den
maximala paketl{ngd som KERM skall anv{nda n{r filer s{nds,
det beror p} att denna maxl{ngd best{ms av den andra datorns
Kermit. Till}tna v{rden p} LENGTH {r 20-94.
4.11 MARKER
------------
MARKER {r det tecken som inleder varje paket i Kermit.
Normalt {r detta 1 (CTRL-A) men kan {ndras. Till}tna v{rden
{r ASCII-koder 0-127.
4.12 NEWLINE
-------------
Med NEWLINE kan man, n{r man befinner sig i terminaldelen,
f} mottaget LF att tolkas som CRLF samt att CRLF s{nds n{r
man trycker p} RETURN. Detta anv{nds vid kommunikation med
vissa v{rddatorer. Till}tna v{rden {r ON och OFF.
4.13 NUMPAD
------------
Somliga v{rddatorer kr{ver att ett paket ska f|reg}s av ett
antal PAD-tecken. Antalet PAD-tecken anges med parametern
NUMPAD. Normalt {r NUMPAD satt till noll, till}tna v{rden {r
0-127.
4.14 PADCHAR
-------------
Anger vilket PAD-tecken som skall f|reg} ett paket. Normalt
anv{nds ej n}gra PAD-tecken, se parametern NUMPAD. Till}tna
v{rden {r ASCII-koder 0-127.
4.15 PARITY
------------
PARITY anger den paritet som skall anv{ndas vid |verf|ringen
b}de i Kermitdelen och i terminaldelen. F|ljande v{rden
finns:
NONE Paritetsbiten anv{nds inte. Detta {r att
rekommendera vid |verf|ring av bin{rfiler med
Kermit (under f|ruts{ttning att v{rddatorn klarar
PARITY NONE). Paritetsbiten kan anv{ndas f|r data
och |verf|ringen g}r d{rf|r 50% snabbare.
SPACE Paritetsbiten s{tts alltid till noll.
MARK Paritetsbiten s{tts alltid till ett.
EVEN Antalet ettor i varje byte som s{nds {r alltid
j{mt.
ODD Antalet nollor i varje byte som s{nds {r alltid
udda.
4.16 PAUSE
-----------
Om v{rddatorn har sv}rt att h}lla samma h|ga tempo i
|verf|ringen som KERM kan man med hj{lp av parametern PAUSE
f} en paus innan KERM s{nder iv{g ett paket. Pausens l{ngd
anges i tiondels sekunder och till}tna v{rden {r 0-127. Ett
v{rde p} 10 medf|r allts} en sekunds paus.
4.17 QBIN
----------
Om man inte anv{nder PARITY NONE kan inte paritetsbiten i en
byte anv{ndas f|r att f|ra |ver data. Om man skall s{nda
bin{rfiler tvingas man d} i Kermit att dela upp en byte som
{r st|rre {n 127 i tv} bytes. Man kan s{ga att man placerar
ett shifttecken f|re den byte som skall s{ndas liksom man p}
ett tangentbord anv{nder shifttangenten f|r att f} flera
funktioner p} en tangent. Det tecken som skall vara
"shifttecken" kallas QBIN. Normalt {r detta 38 (&) men kan
{ndras, till}tna v{rden {r ASCII-koder 0-127.
4.18 QCTL
----------
Kontrolltecken som ing}r i en fil som man s{nder m}ste
"prefixas" med ett tecken f|re (j{mf|r QBIN!). Det tecken
som placeras f|re kontrolltecken kallas QBIN. Till}tna
v{rden {r ASCII-koder 0-127, normalv{rde 34 (#).
4.19 REPT
----------
Om det i en fil som |verf|rs med Kermit f|rekommer fler {n
tre tecken i f|ljd som {r exakt lika s} packas dessa ihop
till tre bytes. Det tecken som inleder denna trio kallas
REPT och {r normalt 126 (~). Tiil}tna v{rden {r ASCII-koder
0-127.
4.20 RETRY
-----------
Om ett paket inte |verf|rs korrekt till}ter Kermit att ett
antal omf|rs|k g|rs. Antalet omf|rs|k s{tts med parametern
RETRY (normalt fem). Till}tna v{rden {r 1-30.
4.21 TEDESC
------------
Om texteditorn TED finns i minnet samtidigt som KERM kan man
med en tangenttryckning l{mna antingen terminaldelen eller
Kermit-delen f|r att hoppa till TED. N{r man p} TED-menyn
v{ljer att }terg} kommer man att hoppa till terminaldelen
eller Kermit-delen beroende p} varifr}n man utgick. Den
tangent som skall anv{ndas f|r att hoppa till TED kan v{ljas
med parametern TEDESC. Om ingen TEDESC |nskas kan v{rdet
s{ttas till samma som ESCAPE. Till}tna v{rden {r ASCII-koder
0-127. Notera att ett tryck p} TEDESC-tangenten {r detsamma
som att anv{nda kommandot TED om man befinner sig i
Kermit-delen.
4.22 TEDMODE
-------------
Om man har texteditorn TED i minnet samtidigt som KERM kan
man, n{r man {r i terminaldelen, logga konversationen i TED
eller s{nda iv{g text som finns i TED. Parametern TEDMODE
kan f} f|ljande v{rden:
OFF Varken s{nd eller logga.
SEND S{nd iv{g texten som finns i TED. S{ndningen b|rjar
inte f|rr{n man hoppat till terminaldelen.
SAVE Sparar konversationen i terminaldelen i TED.
4.23 TIMEOUT
-------------
N{r filer s{nds med Kermit }ker paket fram och tillbaka. Om
ett paket inte anl{nder ligger KERM och v{ntar ett visst
antal sekunder innan timeout sker. Om antalet omf|rs|k (se
parametern RETRY) fortfarande {r st|rre {n noll l{gger sig
KERM }ter i v{nteloop. N{r alla omf|rs|k gjorts avbryts
fil|verf|ringen. Timeout-tiden, som anges i sekunder, kan
st{llas. KERM's normalv{rde {r 10 sekunder vilket {r lagom
f|r att hinna skriva och l{sa p} flexskiva. Till}tna v{rden
{r 1-30 sekunder.
5 TIPS VID PROBLEM
===================
Data|verf|ring {r en komplicerad process och kan misslyckas
av olika anledningar. H{r f|ljer n}gra tips:
Om telef|rbindelsen {r d}lig kan man prova att minska den
maximala paketl{ngden, p} s} vis |kar sannolikheten att man
f}r |ver ett paket till den andra sidan. Checksummetyp tv}
b|r anv{ndas. Maximala antalet omf|rs|k som ska g|ras kan
|kas. Anv{nd s} l}g hastighet som m|jligt, helst 300/300
baud.
F}r man TIMEOUT pga att v{rddatorn v{grar acceptera mottagna
paket skall man |ka PAUSE-parameterns v{rde. Det {r vanligt
att v{rddatorn f|rs|ker rensa sin mottagningsbuffer
samtidigt som KERM b|rjar s{nda, en liten paus f|re varje
paket som s{nds ger v{rddatorn tid att f|rbereda sig f|r
mottagning. KERM {r mycket snabb, ofta alltf|r snabb!
Har man problem med att |verf|ra bin{rfiler anv{nder man
troligen felaktig paritet. Se till att KERM anv{nder samma
paritet som v{rddatorn. F|r att kunna anv{nda paritet NONE
kr{vs att v{rddatorn klarar av detta.
En l}ngsam flexskiveenhet kan medf|ra att v{rddatorn ofta
r}kar ut f|r TIMEOUT. \ka d} v{rdet p} parametern TIMEOUT.
6 DIVERSE \VRIGT
=================
Under mottagning och s{ndning av filer med Kermit visas
information om |verf|ringen p} bildsk{rmen. Det som visas {r
filnamn, antal oms{ndningar (hur m}nga paket som inte
|verf|rts korrekt och d{rf|r m}ste s{ndas om), antalet
|verf|rda paket, antalet bytes data, antal block i filen
(blocksiffran {r tyv{rr ej exakt) samt status. F|ljande kan
}terfinnas i statusf{ltet:
(nn) Filstorlek vid SEND, endast om wildcards anges.
ERR nn Ett fel har intr{ffat, se ABC80's fellista.
CTRL-X KERM-anv{ndaren har tryckt CTRL-X.
CTRL-Z KERM-anv{ndaren har tryckt CTRL-Z.
FLUSH \verf|ringen avbruten med CTRL-X eller CTRL-Z,
filen borttagen om kommandot var RECEIVE.
OK \verf|ringen av denna fil klar, filen st{ngd.
Terminaldelen i KERM lagrar alla inkomna tecken i en buffer
innan de skrivs ut p} bildsk{rmen. Om 64 eller fler tecken
lagras i bufferten s{nds ett XOFF (om XON/XOFF anv{nds) och
f|rst n{r det finns 32 eller f{rre tecken i bufferten s{nds
ett XON. Detta ger |kad performance d} man anv{nder LOG f|r
att spara data p} fil.
Om man har TED i minnet samtidigt som KERM kommer TED's
LIB-rutin att bytas ut n{r man fr}n TED-menyn hoppar till
KERM f|rsta g}ngen. Detta g|rs f|r att spara RAM-minne och
kan ses p} texten som talar om hur mycket utrymme som finns
p} skivorna, den kommer att vara p} engelska.
Programmet KERM s{nker stacken och lagrar sin maskinkod
mellan den s{nkta stacken och DOS-buffertarna. Allt utrymme
ovanf|r stacken f}r anses som upptaget eftersom KERM
anv{nder stora areor f|r buffertar av olika slag. Om man
l{mnar KERM med kommandot QUIT kommer stackpekaren att
beh}lla det s{nkta v{rdet. Det betyder att programmet KERM
finns kvar intakt i minnet och kan }teranv{ndas med
Z=CALL(PEEK(65063)+256*PEEK(65064)+16)
Om man vill ta bort programmet KERM ur minnet utan att
trycka p} reset kan man g|ra QUIT till ett BASIC-program som
}terst{ller stackpekaren till normalv{rde. Om programmet
d{refter g|r CHAIN "" {r KERM borttaget och datorn fungerar
som om KERM aldrig anv{nts. Man kan {ven g|ra QUIT till ett
parmprogram (se kommando SAVE, kapitel 3.11) f|r att p} s}
vis starta upp KERM med andra parametrar.
<<< kerm1.asm >>>
; KERM1.ASM
; Anders Franz`n <5258>
; Stockholm 1987-09-20
ORG 251:0
START LD A,(254:64)
AND A
JRNZ ST1 Inga parametrar
LD HL,255:128
LD DE,PARMAREA
LD BC,PARMLEN
LDIR
ST1 LD SP,STACK
LD HL,KERMIT
PUSH HL
LD (KERMSP),SP
LD SP,PGM
LD (254:39),SP S{nk stack
CALL INIT Init av terminal
XOR A
LD (FIL+5),A Fil ej |ppen!!
LD HL,TERMBILD
LD E,L
LD D,H
LD (HL),32
INC DE
LD BC,24*80-1
LDIR
LD HL,KERMBILD
LD E,L
LD D,H
LD (HL),32
INC DE
LD BC,24*80-1
LDIR
LD HL,TXT1
LD DE,TERMBILD
LD BC,TXT2-TXT1
LDIR
LD DE,KERMBILD
LD BC,TXT3-TXT2
LDIR
LD HL,(254:32) HEAP
LD DE,PGM
SBC HL,DE
JRNC ST4 Program f|rst|rt
LD IX,(254:28) BOFA
LD HL,(254:28)
ST2 LD A,(HL)
CP 1
JRZ ST4 Slut p} program
LD C,A
LD A,(IX+3)
CP 134
JRNZ ST3
LD A,(IX+4)
CP 145
JRZ ST5 CHAIN 'program'
ST3 ADD IX,BC
ADD HL,BC
JR ST2
ST4 CALL 10:112 NEW
LD SP,STACK
JP KERMIT
ST5 LD C,5
ADD HL,BC
EX DE,HL DE --> uttryck
LD A,(13:63)
CP 255
JPZ 13:63 CHAIN
JP 13:61
TXT1 DM "Terminal"
TXT2 DM "K E R M I T"
DM " for ABC80"
DM " Stockholm 1987"
TXT3
ORG PGM
DEFM "5 KERMIT "
JP TEDFIX Retur fr}n TED
JP TEDFIX1 Retur fr}n BASIC
R[KNA JP 192:0
TILLBUFF JP 192:3
SPARRAD JP 192:6
TEDFIX LD A,(TEDFLG)
AND A
JRNZ TEDFIX1 Retur till KERM
POP AF
PUSH AF
SUB 4
LD (R[KNA+2),A
LD (TILLBUFF+2),A
LD (SPARRAD+2),A
LD (TEDFLG),A TED i minnet!
LD IX,248:0 TED's LIB-rutin
LD HL,TEDLIB
LD (IX+14),L Ny LIB-rutin
LD (IX+15),H f|r TED!
CALL INIT Init av terminal
LD (TEDSP),SP
LD SP,STACK
JP KERMIT
TEDFIX1 LD (TEDSP),SP
LD SP,(KERMSP)
RET
TEDSP DW 0
KERMSP DW 0
TERMBILD DS 24*80
DW 0:2
KERMBILD DS 24*80
DW 0:2
VISABILD LD IX,3:116
LD B,24
VB1 PUSH BC
LD E,(IX+0)
LD D,(IX+1)
INC IX
INC IX
LD A,(1:216) 40 eller 80
LD C,A
LD B,0
LDIR
CP 40
JRNZ VB2
LD C,A
ADD HL,BC
VB2 POP BC
DJNZ VB1
LD E,(HL)
INC HL
LD D,(HL)
LD (253:243),DE Mark|r
RET
SPARBILD LD IX,3:116
LD B,24
SB1 PUSH BC
LD L,(IX+0)
LD H,(IX+1)
INC IX
INC IX
LD A,(1:216) 40 eller 80
LD C,A
LD B,0
LDIR
CP 40
JRNZ SB2
LD L,E
LD H,D
LD (HL),32
INC DE
LD BC,39
LDIR
INC HL
SB2 POP BC
DJNZ SB1
LD HL,(253:243) Mark|r
EX DE,HL
LD (HL),E
INC HL
LD (HL),D
RET
;Filhantering, tar hand om ev fel
FILCONTR PUSH HL
LD HL,FILC3
EX (SP),HL
LD (254:54),SP RUN-timestack
PUSH HL
LD HL,FILC2
LD (IY+30),L ONERRORGOTO
LD (IY+31),H
LD (IY+14),0 RUN-mode
LD (IY+15),0 NOTRACE
LD HL,FILC1
EX (SP),HL
PUSH DE
RET
FILC1 INC SP
INC SP
RET
FILC2 DB 4,0,1,145 BASIC-return
FILC3 LD A,(IY+34) Errcode
AND 127
SCF
RET
PREPARE LD A,1
JR OPEN1
PREPBAC LD A,4
JR OPEN1
OPEN XOR A
OPEN1 LD IX,FIL
LD DE,0:62
CALL FILCONTR
RET
ERROR AND 127
LD L,A
LD H,0
PUSH HL
LD HL,ERROR1
LD BC,ERROR2-ERROR1
CALL 0:11
POP HL
CALL SKRIVTAL
CALL 7:66
RET
ERROR1 DM 13,10,7,"ERR "
ERROR2
;Omvandla str{ng i buffert till tal DE
G\RTAL LD A,(24:30)
CP 126
JPZ 24:30
JP 24:28
;Omvandla tal till str{ng i buffert
SKRIVTA1 LD DE,253:213 Tempbuffer
PUSH DE
LD A,(24:96) Kolla checksumma
CP 175
PUSH AF
CALLZ 24:96 \vers{tt till
POP AF ASCII
CALLNZ 24:98
EX DE,HL
POP DE
AND A Ber{kna l{ngd
SBC HL,DE p} str{ngen
LD C,L
LD B,H
EX DE,HL
RET
;Skriv ut talet HL
SKRIVTAL CALL SKRIVTA1
CALL 0:11 Skriv ut str{ng
RET
;Skriver talet HL som max kan best}
;av x tecken. X lagras i A innan anrop
;varefter talet skrivs ut h|gerst{llt.
SKRTAL PUSH DE Spara utfyllnad
PUSH AF
CALL SKRIVTA1
POP AF
EX (SP),HL
PUSH BC
SUB C
LD C,A
CALLNZ 0:11 Skriv utfyllnad
POP BC
POP HL
CALL 0:11
RET
;Kollar om wildcard finns. Fixar
;i ordning filnamn.
DRIVEFIX RST 32
LD (WILDSTR),HL
LD BC,7:0
LD (WILDANT),BC
PUSH HL
LD BC,0:255
DEC HL
DF1 LD E,A Spara f|reg tkn
RST 24
INC C R{kna antal tkn
CP "*"
JRZ DF2
CP "?"
JRNZ DF3
DF2 INC B R{kna wildcards
DF3 CP ","
JRNZ DF4
LD A,13
LD (HL),A Byt "," till CR
INC HL Filnamn-2
DF4 CP 13
JRNZ DF1
RST 32
LD (FILPEK),HL Spara fil-2
POP HL
LD A,E Sista tecknet
CP ":"
JRZ DF5 Endast enhet!
LD A,B
LD (WILDFLG),A
AND A
JRZ DF6 Inga wildcards!
DF5 LD A,(HL)
AND 95
XOR "D"
RETNZ
RST 24
AND 95
XOR "R"
RETNZ
RST 24
SUB 48
CCF
RETNC
CP 8
RETNC
LD C,A Spara drive-nr
RST 24
XOR ":"
RETNZ
RST 24
LD (WILDSTR),HL Skippa enhet
LD B,1 En drive
LD (WILDANT),BC
AND A
RET
DF6 LD DE,255:150 BC=l{ngd
CALL 0:65 Fixa filnamn
RETC Fel!
LD HL,255:150+11
LD DE,255:128
LD BC,3
LD A,(HL)
LDIR
CP 32
JRZ DF7 Enhet saknas
LD A,":"
DF7 LD (DE),A
INC DE
LD HL,255:150
LD C,8
LDIR
LD A,"."
LD (DE),A
INC DE
LD C,3
LDIR
LD A,13
LD (DE),A
AND A
RET
;J{mf|r str{ng med wildcard, om str{ng
;passar s{tts carry. Rekursiv rutin.
;DE! str{ng
WILDCARD LD HL,(WILDSTR)
WC1 RST 32
EX DE,HL
RST 32
EX DE,HL
CP 13
JRNZ WC2
LD A,(HL)
CP 13
SCF
RETZ
XOR "*"
RETNZ
PUSH HL
RST 24
POP HL
XOR 13
RETNZ
SCF
RET
WC2 LD A,(HL)
CP 13
RETZ
LD A,(DE)
CP 96
JRC WC3
AND 95
WC3 CP (HL)
JRNZ WC5
WC4 PUSH HL
PUSH DE
INC HL
INC DE
CALL WC1
POP DE
POP HL
RET
WC5 LD A,(HL)
CP "?"
JRZ WC4
XOR "*"
RETNZ
PUSH HL
PUSH DE
INC HL
CALL WC1
POP DE
POP HL
RETC
PUSH HL
PUSH DE
INC DE
CALL WC1
POP DE
POP HL
RET
WILDSTR DW 0 Pekar p} wildcard
WILDANT DW 0 C=n{sta drive B=antal
WILDFLG DB 0 Finns wildcards?
FILPEK DW 0 Peka p} ev filnamn-2
;Leta efter ord i tabell
STRSCAN LD C,0
PUSH DE
CALL STR
POP DE
RETZ Hittat
RETM Finns ej
PUSH HL
PUSH DE
LD HL,STRSC1
LD BC,STRSC2-STRSC1
CALL 0:11
POP DE
POP HL
LD C,128
CALL STR
CALL 7:66
SCF
RET
STRSC1 DM 13,10,7,"Be more specific"
STRSC2
;Leta i tabell
;IN HL! text
; DE! tabell
; C 0=leta 128=skriv alla ounika
;UT Z funnen
; M ej hittad
; P ej unikt
; A ev kod
; HL ev n{sta ord
STR RST 32
XOR 13
DEC A
RETM Tom textrad
EXX
LD B,1 CRLF f|re f|rsta
EXX
EX DE,HL HL! tabell
STR1 LD B,(HL) Spara tabellkod
LD (STR8),HL Spara tabellord
PUSH DE Spara text
STR2 LD A,(DE) Tecken i text
INC DE
CP 96
JRC STR3
AND 95 G|r versal
STR3 INC HL
CP (HL) J{mf|r tkn
JRZ STR2 Lika
CP 32
JRZ STR4
CP ","
JRZ STR4
CP 13
JRNZ STR6 Textord ej slut
STR4 DEC DE Peka p} tkn
LD (STR9),DE Spara n{sta ord
LD A,B
EX AF Spara kod & NC!
INC C R{kna tr{ffar
BIT 7,C
JRZ STR6 Skriv ej ounika
EXX
DJNZ STR5
CALL 7:66
LD B,3 Tre ord/rad
LD A,(1:216)
CP 40
JRZ STR5
LD B,5
STR5 LD HL,(STR8)
LD A,-10 Rak v{nsterkant
LD DE,SPACE Avskiljare
CALL SKRIVTAB Skriv tabellord
EXX
STR6 LD A,(HL)
INC HL
BIT 7,A
JRZ STR6 Leta tabordslut
DEC HL
INC A
JRZ STR7 Slut p} tabell
POP DE Peka p} text
JR STR1
STR7 POP DE Text
LD HL,(STR9) N{sta ord
RST 32
EX AF ]terst{ll kod
AND A Clear carry
RES 7,C
DEC C
RETZ Hittad (NC)
EX DE,HL HL! text
RET
STR8 DW 0
STR9 DW 0
;Spara tecken i TED
TEDSPAR LD A,(TEDFLG)
AND A
RETZ TED ej i minnet
LD IX,TEDKOL
LD A,(SLASK)
CP 32
JRNC TS2
CP 9
JRZ TS3
CP 10
JRZ TS5
CP 12
JRZ TS4
CP 13
JRZ TS1
CP 8
RETNZ
DEC (IX+0)
RETP
TS1 LD (IX+0),0
RET
TS2 LD HL,FLAGG
SET 5,(HL) Data i buffer
LD HL,BUFFTED
LD E,(IX+0)
LD D,0
ADD HL,DE
LD (HL),A Spara tecken
TS3 INC (IX+0) \ka kolumn
LD A,(IX+0)
CP 160
RETNZ Rad ej full
TS4 LD (IX+0),0
TS5 LD DE,(TEDINRAD)
PUSH DE
LD HL,(253:243)
PUSH HL Spara mark|r
CALL SPARRAD
POP HL
POP DE
JRC TS6
INC DE
LD (TEDINRAD),DE
CALL TILLBUFF
LD HL,FLAGG
RES 5,(HL) Buffer t|md
RET
TS6 LD (253:243),HL
XOR A
LD (TEDSAVE),A
LD DE,(3:162)
CALL 2:103 Blanka rad 23
LD HL,FLAGG
SET 0,(HL) L{mna terminal
SET 6,(HL) TED full
LD A,3
LD (FELKOD),A
RET
TEDSEND LD A,(TEDSAVE)
XOR 2
RETNZ
LD A,(TEDFLG)
AND A
RETZ TED ej i minnet
LD A,(TEDKOL)
AND A
JRNZ TSE4 TED-buff ej tom
LD HL,(TEDANRAD)
LD A,H
OR L
JRNZ TSE1 Fler rader kvar
XOR A
LD (TEDSAVE),A
RET
TSE1 DEC HL
LD (TEDANRAD),HL
LD HL,BUFFTED
LD (TEDUTPOS),HL
LD DE,(TEDUTRAD)
INC DE
LD (TEDUTRAD),DE
CALL TILLBUFF
LD HL,BUFFTED+159
LD B,160
LD A,32
TSE2 CP (HL)
DEC HL
JRNZ TSE3
DJNZ TSE2
DEC HL
TSE3 INC HL
INC HL
LD (HL),13
LD A,B
INC A R{kna med CR
TSE4 DEC A
LD (TEDKOL),A
LD HL,(TEDUTPOS)
LD A,(HL)
INC HL
LD (TEDUTPOS),HL
SCF Flagga
RET
TEDINRAD DW 0
TEDUTRAD DW 0
TEDANRAD DW 0
TEDUTPOS DW 0
TEDKOL DB 0
<<< kerm2.asm >>>
; KERM2.ASM
; Anders Franz`n <5258>
; Stockholm 1987-09-13
BAUD75 EQU 2:117
BAUD300 EQU 9:213
BAUD1200 EQU 39:82
BAUD2400 EQU 78:165
BAUD4800 EQU 157:74
; Flaggor
; 0 L{mna terminal
; 1 Hoppa till TED
; 2 XOFF mottaget
; 3 XOFF s{nt
; 4 Inbuff full
; 5 Data i TED-buff
; 6 TED full
; 7 Fel p} DUMP/LOG-fil
INIT LD HL,BUFF1
LD (INBUFF),HL
LD A,L Rensa mottagar-
LD (INPOS),A buffert
INIT1 LD HL,BUFF2
INP 56 Undvik
LD (HL),A dubbeltryck!
LD (UTBUFF),HL
LD A,L Rensa tangent-
LD (UTPOS),A buffert
LD H,36
LD (TIMER),HL
LD A,(FLAGG)
AND 00011100B
LD (FLAGG),A
CALL FIXBAUD
CALL FIXTED
RET
TERMINAL LD (RETUR),SP
LD HL,TERMBILD
CALL VISABILD
CALL 2:147
EX DE,HL
SET 7,(HL) T{nd mark|r
CALL INIT1 T|m tangentbuff
CALL INTON Sl} p} interrupt
CALL XON Ev s{nd XON
TERM1 CALL TAN Polla tangenter
LD HL,FLAGG
BIT 0,(HL)
JPNZ EXIT Avsluta!
BIT 2,(HL)
JRNZ TERM2 XOFF mottaget
CALL CHECKTAN Kolla om tangent
CALLC TKNUT Behandla tangent
INP 58
AND 2 B{rv}g?
JRNZ TERM2 Nej, hoppa
CALL TEDSEND S{nda fr}n TED?
CALLC TKNUT Behandla tkn
LD A,(DMP)
AND A
CALLNZ DISK Ev tkn fr}n fil
CALLC TKNUT Behandla tkn
TERM2 CALL MOTTAG L{s inputbuffer
CALLC TKNIN Behandla tkn
INP 58
AND 2 B{rv}g?
JRZ TERM1 Ja, hoppa
LD HL,FLAGG
RES 2,(HL) Inget XOFF
JR TERM1
; L{mna terminalrutinen
EXIT CALL XOFF S{nd XOFF
LD HL,FLAGG
BIT 5,(HL)
CALLNZ TS5 Spar i TED
CALL 2:147
EX DE,HL
RES 7,(HL) Sl{ck mark|r
LD DE,TERMBILD
CALL SPARBILD
CALL INTOFF Sl} av interrupt
LD SP,(RETUR)
RET
;Sl} p} interrupt
INTON DI St{ng interrupt
LD A,I
LD (IREG),A Spara register
LD HL,VEKTOR Interruptvektor
LD A,H H|g byte till
LD I,A CPU:ns I-reg
LD A,L L}g byte till
OUT 57 PIO:ns port A
LD A,4FH Programmera PIO
OUT 57 f|r inputmode
EXX
LD HL,S1
LD DE,R1
EXX
EI Sl} p} interrupt
RET
;Sl} av interrupt
INTOFF LD A,(BITAR) H}ller byte p}
AND A att s{ndas?
JRNZ INTOFF Ja, v{nta
DI
LD A,255
OUT 57 PIO i bitmode
OUT 57 Alla bitar in
LD A,(IREG)
LD I,A ]terst{ll I-reg
LD A,52 L}g byte till
OUT 57 PIO:ns port A
EI Sl} p} interrupt
LD A,200 L}ng tid timer
LD (253:247),A tangentbordet
XOR A
LD (253:245),A Ingen tangent
RET
;Behandla intkn
TKNIN CP 10
JRNZ TKNIN2
LD A,(NEWLINE)
DEC A
JRNZ TKNIN1
LD A,13
CALL SKRIV
TKNIN1 LD A,10
TKNIN2 CALL SKRIV
RET
;Kolla om tkn mottaget
MOTTAG LD DE,(INBUFF)
LD HL,FLAGG
BIT 4,(HL)
JRZ MOT2 Buffer ej full
LD A,(INPOS)
SUB E
JPP MOT1
NEG
MOT1 CP 32
JRNC MOT2 Buffer ej t|md
CALL XON
RES 4,(HL) Ingen panik!
MOT2 LD A,(INPOS)
CP E Mottaget tkn?
RETZ Nej, retur
LD E,A
INC A Detta tkn
LD (INPOS),A behandlat
LD A,(DE) Tag mottaget tkn
SCF
RET
;Polla tangentbordet
CHECKTAN LD HL,(UTBUFF)
LD A,(UTPOS)
CP L Tangent i buff?
RETZ Nej, retur
LD L,A
INC A
LD (UTPOS),A
LD A,(HL)
AND 127
SCF
RET
;Polla tangentbordet
TAN LD HL,(UTBUFF)
INP 56 L{s tangentbord
BIT 7,A Tangent nere?
JRZ TAN4 Nej, hoppa
LD B,18 L}ng tid
CP (HL) Repetering?
JRNZ TAN1 Nej, hoppa
LD BC,(TIMER)
INC B
DJNZ TAN4
LD B,3
TAN1 LD (TIMER),BC
LD C,A
XOR A
OUT 6
LD A,57
OUT 6 Klick
LD A,(ESCAPE)
OR 128
CP C
JRZ TAN2 ESCAPE
LD A,(TEDFLG)
AND A
JRZ TAN3 TED ej i minnet
LD A,(TEDESC)
OR 128
CP C
JRNZ TAN3 Ej TED-escape
SCF
TAN2 LD (HL),C
LD HL,KERMAREA
SET 3,(HL)
LD HL,FLAGG
SET 0,(HL)
RETNC
SET 1,(HL)
RET
TAN3 LD A,C
LD (HL),A
INC L
LD (UTBUFF),HL
TAN4 LD (HL),A Spara nul{get
RET
;Behandla uttkn
TKNUT CP 13
JRNZ TKNUT1 Ej CR
LD C,A
LD A,(NEWLINE)
DEC A
LD A,C
JRNZ TKNUT1
CALL TKNUT1 Tolka <RETURN>
LD A,10 som CRLF
TKNUT1 LD C,A
LD A,(DUPLEX)
AND A Halv duplex?
LD A,C
CALLZ SKRIV Ja, till sk{rm
CALL S[ND S{nd tangenten
RET
;Skriver tkn p} sk{rm
SKRIV AND 127
LD (SLASK),A Spara tkn
CALL 2:147
EX DE,HL
RES 7,(HL) Sl{ck mark|r
LD A,(SLASK)
CP 32
JRNC SKR5
CP 7
JRZ SKR1
CP 8
JRZ SKR2
CP 9
JRZ SKR6
CP 10
JRZ SKR7
CP 12
JRZ SKR3
CP 13
JRNZ SKR9
LD (IX+1),0
JR SKR8
SKR1 XOR A
OUT 6
LD A,131
OUT 6 Pling!
JR SKR9
SKR2 DEC HL
DEC (IX+1) Minska kolumn
JPP SKR9
LD A,(2:111) 39 eller 79
LD (IX+1),A
DEC (IX+0) F|reg}ende rad
JPP SKR8
JR SKR7
SKR3 CALL 2:118
JR SKR8
SKR5 LD (HL),A Skriv p} sk{rm
SKR6 INC HL
INC (IX+1) \ka kolumn
LD A,(2:111) 39 eller 79
CP (IX+1)
JRNC SKR9 Raden ej slut
LD (IX+1),0
SKR7 CALL 2:56 Ny rad ev scroll
SKR8 CALL 2:147
EX DE,HL
SKR9 SET 7,(HL) T{nd mark|r
LD A,(TEDSAVE)
DEC A
CALLZ TEDSPAR Spara text i TED
LD A,(LOG)
AND A
LD A,(SLASK)
RETZ Ingen loggning
CP 10
JRZ SKR10 Rad ska loggas
CP 32
RETC
LD HL,(LOGBUFF)
LD (HL),A
INC L
LD (LOGBUFF),HL
RET
SKR10 LD HL,(LOGBUFF)
LD (HL),13
INC L
LD (HL),10
INC L
LD DE,BUFF3
AND A
SBC HL,DE
LD C,L
LD B,H
EX DE,HL
LD IX,FIL
LD DE,8:150
CALL FILCONTR Skriv rad
JRC SKR12
LD HL,BUFF3
LD (LOGBUFF),HL
LD A,(SLASK) ]terst{ll
RET
SKR12 LD (FELKOD),A
LD HL,FLAGG
SET 0,(HL) L{mna terminal
SET 7,(HL) Fel p} LOG-fil
LD A,(SLASK) ]terst{ll
RET
;S{nder tkn fr}n fil
DISK LD IX,KERMAREA
CALL GETFIL H{mta ett tkn
CCF
RETC Retur om OK
AND A
JRNZ DISK1 Annat fel {n EOF
LD IX,FIL
LD DE,8:144
CALL FILCONTR Close
JRC DISK1
XOR A
LD (DMP),A
RET
DISK1 LD (FELKOD),A
LD HL,FLAGG
SET 0,(HL) L{mna terminal
SET 7,(HL) Fel p} DUMP-fil
RET
;S{nd XOFF om XON {r s{nt
XOFF LD A,(FLOW)
DEC A
RETNZ XOFF anv{nds ej
PUSH HL
LD HL,FLAGG
BIT 3,(HL) XOFF s{nt?
LD A,19
CALLZ S[ND Nej, s{nd XOFF
LD HL,FLAGG
SET 3,(HL)
POP HL
RET
;S{nd XON om XOFF {r s{nt
XON LD A,(FLOW)
DEC A
RETNZ XON anv{nds ej
PUSH HL
LD HL,FLAGG
BIT 3,(HL) XOFF s{nt?
LD A,17
CALLNZ S[ND Ja, s{nd XON
LD HL,FLAGG
RES 3,(HL)
POP HL
RET
;S{nd iv{g tecknet A
S[ND PUSH HL Spara register
PUSH DE
PUSH BC
LD C,A Byte att s{nda
INP 58
AND 2 Finns b{rv}g?
JRZ S[ND1 Ja, hoppa
XOR A
OUT 6
LD A,131 Pling i
OUT 6 h|gtalaren
SCF
JR S[ND7 S{nd inget!
S[ND1 LD B,10 Tio bitar
LD A,(PARITET)
AND A
JRZ S[ND5 S{nd byte "r}"
RES 7,C
DEC A
JRZ S[ND5 Alltid noll
DEC A
JRZ S[ND4 Alltid ett
DEC A
LD A,C
JRZ S[ND3 J{mn paritet
AND A
JPPO S[ND5 Hoppa om udda
JR S[ND4
S[ND3 AND A
JPPE S[ND5 Hoppa om j{mn
S[ND4 SET 7,C
S[ND5 PUSH BC
CALL TAN Polla tangenter
POP BC
LD A,(BITAR) P}g}r s{ndning?
AND A
JRNZ S[ND5 Ja, v{nta
LD (BYTE),BC Spara B och C
S[ND7 POP BC ]terst{ll
POP DE register
POP HL
RET Klart !
;S{nd och ta emot data
TERMINT EX AF
EXX
JP (HL) Hoppa
S1 CALL REC
INP 58
OR 16+8 RTS + ettbit
OUT 58
LD A,(BITAR)
AND A Startbit (NC)
JRZ S1 Inget att s{nda
LD B,A
LD HL,0
LD (S5+7),HL
LD A,(BYTE)
LD C,A Byte att s{nda
S3 LD (S5+16),BC
LD C,58
IN B,(C)
SET 3,B TxD=1
JRC S4 Hoppa om ettbit
RES 3,B TxD=0
S4 OUT (C),B Skicka iv{g bit
S5 CALL REC
LD HL,(BAUDSEND)
LD BC,0
ADD HL,BC
LD (S5+7),HL
JRNC S5
LD BC,0
RR C
DJNZ S3
XOR A
LD (BITAR),A
JR S1
REC EX DE,HL
JP (HL)
R1 CALL END V{nta 128 us
INP 58 L{s V24-porten
RRC A Linjen l}g?
JRNC R1 Ja, b|rja om
R2 CALL END V{nta 128 us
INP 58 L{s V24-porten
RRC A Startbit?
JRC R2 Nej, inte {nnu
LD HL,206:164 19% av bittid
LD (R5+7),HL
R3 CALL END
INP 58 L{s V24-porten
RRC A St|rning?
JRC R2 Ja, b|rja om
LD HL,(BAUDREC)
LD DE,(R5+7)
ADD HL,DE Har halva bit-
LD (R5+7),HL tiden g}tt?
JRNC R3 Nej, v{nta...
LD B,9
R4 RR C Spara bit i C
LD (R5+16),BC
R5 CALL END V{nta 128 us
LD HL,(BAUDREC)
LD DE,0
ADD HL,DE Har n{sta bit
LD (R5+7),HL kommit in nu?
JRNC R5 Nej, v{nta
LD BC,0
INP 58 L{s V24-porten
RRC A Biten till carry
DJNZ R4 Upprepa om fler
JRNC R1 Ej stoppbit
CALL END
LD A,(R5+16)
LD HL,(INBUFF)
LD (HL),A Spara tkn
INC L
LD (INBUFF),HL
LD C,A
LD A,(INPOS)
SUB L
LD HL,FLAGG
JPP R6
NEG
R6 CP 64
JRC R7 Buffer ej full
BIT 4,(HL)
JRNZ R7 Redan noterat
LD A,(BITAR)
AND A
JRNZ R7 Tkn s{nds tyv{rr
CALL XOFF S{nd XOFF
SET 4,(HL) Notera buff full
R7 LD A,(PARITET)
AND A
LD A,C
JRZ R8 Paritet NONE
AND 127 Ev paritet bort
R8 CP 17
JRZ R9 XON
CP 19
JPNZ R2 Ej XOFF
SET 2,(HL) Flagga XOFF
JP R2
R9 RES 2,(HL) Sl{ck flagga
JP R2 f|r XOFF
END LD HL,(TIMER)
DEC HL
LD (TIMER),HL
POP DE Adress i "s{nd"
POP HL Adress i "rec"
EXX ]terst{ll
EX AF registren
EI Sl} p} interrupt
RETI Interrupt klart
ORG $/2*2+2 J{mn adress!
VEKTOR DW TERMINT Interruptvektor
BAUDREC DW BAUD1200 Mottagningsfart
BAUDSEND DW BAUD75 S{ndningsfart
BYTE DB 0 Byte att s{nda
BITAR DB 0 Antal bitar
INBUFF DW 0 Mottaget data
INPOS DW 0 Sista position
UTBUFF DW 0 Tangentdata
UTPOS DW 0 Sista position
TIMER DW 0 Repetition
IREG DB 0 V{rde p} I-reg
FLAGG DB 0
SLASK DB 0
FELKOD DB 0 Felkod LOG/DUMP
LOGBUFF DW 0
RETUR DW 0
<<< kerm3.asm >>>
; KERM3.ASM
; Anders Franz`n <5258>
; Stockholm 1987-09-20
KERMIT CALL KERMV
KERM1 LD HL,KERM4
LD BC,KERM5-KERM4
CALL 0:11 Skriv promt
KERM2 CALL 7:66
LD HL,BUFF6
LD BC,39
PUSH HL
CALL GETLINE
POP HL
RST 32
CP 13
JRZ KERM2 Tom rad
LD BC,KERM1
PUSH BC Returadress
LD DE,CMDTAB
PUSH DE
CALL STRSCAN
POP DE
RETC Ambigious
JRNZ KERM3
LD DE,CMDJTB
JP 1:58 Utnyttja ROM!
KERM3 PUSH DE
LD HL,KERM5
LD BC,KERM6-KERM5
CALL 0:11
POP HL
JP HELP1
KERM4 DM 13,10,"KERMIT"
KERM5 DM 13,10,7,"Command must be"
KERM6
GETLINE LD DE,3:78
LD (253:251),DE
PUSH IX
LD B,C
GETL2 CALL 3:91
JRNZ GETL2
GETL3 CALL 3:91
GETL4 CALL 0:2
CP 9
CALLZ 3:72
CP 13
JPZ 2:229
CP 24
JRZ GETL2
CP 8
JRZ GETL3
PUSH HL
PUSH DE
PUSH BC
PUSH IX
PUSH AF
LD HL,(ESCAPE)
CP L
JRNZ GETL5
CALL CONNECT
JR GETL6
GETL5 LD HL,(TEDESC)
CP L
CALLZ TED
GETL6 POP AF
POP IX
POP BC
POP DE
POP HL
CP 32
JRC GETL4
LD (DE),A
CP 96
JRC GETL7
AND 95
GETL7 LD (HL),A
INC HL
INC (IX+1)
LD A,(2:111)
CP (IX+1)
CALLC 2:52
DJNZ GETL4
JP 2:228
CMDTAB DM 128,"CLOSE"
DM 129,"CONNECT"
DM 130,"DELETE"
DM 131,"DIR"
DM 132,"DUMP"
DM 130,"ERASE"
DM 133,"EXIT"
DM 134,"HELP"
DM 130,"KILL"
DM 135,"LOG"
DM 136,"QUIT"
DM 137,"RECEIVE"
DM 138,"SAVE"
DM 139,"SEND"
DM 140,"SET"
DM 141,"SHOW"
DM 142,"TED" Rensa tabell om
DM 143,"TYPE"
DM 255 TED saknas
CMDJTB DW CLOSE 128
DW CONNECT 129
DW DELETE 130
DW DIRH 131
DW DUMP 132
DW BASIC 133
DW HELP 134
DW LOGG 135
DW QUIT 136
DW KERMREC 137
DW SAVE 138
DW KERMSEND 139
DW SET 140
DW SHOW 141
DW TED 142
DW TYPE 143
CONNECT CALL KERMS
CON1 CALL TERMINAL
LD A,(FLAGG)
BIT 1,A
JPNZ TED1 TED-escape
CALL KERMV
LD A,(FLAGG)
BIT 6,A
JRNZ CON2 TED full
BIT 7,A
RETZ LOG/DUMP-FIL ok
LD A,(FELKOD)
CALL ERROR
CALL CLOSE
LD SP,STACK
JP KERM1
CON2 LD HL,CON3
LD BC,CON4-CON3
CALL 0:11
LD SP,STACK
JP KERM1
CON3 DB 13,10,7
DM "TED filled",13,10
CON4
TED LD A,(TEDFLG)
AND A
RETZ TED ej i minnet!
CALL KERMS
TED1 LD A,(DMP)
LD C,A
LD A,(LOG)
OR C
JRZ TED2 Ingen fil |ppen
CALL KERMV
CALL CLOSE St{ng fil
LD SP,STACK
JP KERM1 Stanna i KERM
TED2 CALL TED3 Anropa TED
LD A,(FLAGG)
BIT 1,A
JPNZ CON1 TED-escape
JP KERMV
TED3 LD (KERMSP),SP
LD SP,(TEDSP)
RET Till TED
TEDFLG DB 0
KERMSEND CALL DRIVEFIX Fixa filnamn
LD A,21
JPC ERROR
CALL CLOSE
CALL INIT Rensa buffertar
CALL INTON Sl} p} interrupt
CALL XON
CALL SEND
CALL XOFF
CALL INTOFF Sl} av interrupt
CALL 7:66
RET
KERMREC LD (FILPEK),HL Ev filnamn
CALL CLOSE
CALL INIT Rensa buffertar
CALL INTON Sl} p} interrupt
CALL XON
CALL RECEIVE
CALL XOFF
CALL INTOFF Sl} av interrupt
CALL 7:66
RET
QUIT PUSH HL Spara ev pgm
CALL CLOSE
CALL KERMS
LD HL,254:64 Inga parametrar
LD (HL),L om QUIT KERM
POP HL
CALL BASIC1 Anropa BASIC
KERMV LD HL,KERMBILD
CALL VISABILD
RET
KERMS LD DE,KERMBILD
CALL SPARBILD
RET
BASIC CALL CLOSE
JP 0:0
BASIC1 LD (KERMSP),SP
LD SP,(254:39)
LD A,(13:76)
CP 231
JPZ 13:76 RUN i BASIC
JP 13:74
;Visar vilka kommandon som finns
HELP LD HL,CMDTAB
HELP1 LD B,1
HELP2 DJNZ HELP3
CALL 7:66
LD B,3
LD A,(1:216)
CP 40
JRZ HELP3
LD B,5
HELP3 LD A,-10
LD DE,SPACE
CALL SKRIVTAB
LD A,(HL)
INC A
JRNZ HELP2
CALL 7:66
RET
;Visa parametrar
SHOW CALL 7:66
LD IX,PARMAREA
LD HL,SHOWTAB
PUSH HL
LD HL,SETTAB
SHOW1 LD B,2 Antal/rad
LD A,(1:216)
CP 40
JRZ SHOW2
LD B,3
SHOW2 LD A,-7 Rak v{nsterkant
LD DE,PUNKTER
CALL SKRIVTAB
EX (SP),HL
PUSH BC
LD E,(HL)
INC HL
LD D,(HL)
INC HL
LD C,(HL)
INC HL
LD B,(HL)
INC HL
PUSH HL
EX DE,HL
LD A,(IX)
INC IX
OR 128
CP 254
JRZ SHOW3
CP 255
JRZ SHOW3
CPIR
JRZ SHOW4
SHOW3 AND 127
LD L,A
LD H,0
LD A,9
LD DE,PUNKTER
CALL SKRTAL
JR SHOW5
SHOW4 DEC HL
LD A,9
LD DE,PUNKTER
CALL SKRIVTAB
SHOW5 POP HL
POP BC
EX (SP),HL
LD A,(HL)
INC A
JRZ SHOW6
PUSH HL
PUSH BC
LD HL,SPACE
LD BC,2
CALL 0:11
POP BC
POP HL
DJNZ SHOW2
CALL 7:66
JR SHOW1
SHOW6 POP HL
CALL 7:66
RET
;IN DE Typ av delare
; A L{ngd f{lt >0 rak h|gerkant
; <0 rak v{nsterkant
SKRIVTAB PUSH BC
LD BC,-1
INC HL Skippa highbyte
PUSH HL
SKRIVT1 BIT 7,(HL)
INC HL
INC BC R{kna l{ngd ord
JRZ SKRIVT1
DEC HL
EX (SP),HL Spara n{sta ord
PUSH DE Spara avskiljare
AND A
JPM SKRIVT2 Rak v{nsterkant
PUSH HL
PUSH BC
EX DE,HL
SUB C
LD C,A
CALLNZ 0:11 Skriv avskiljare
XOR A
POP BC L{ngd p} ord
POP HL Pekar p} ord
SKRIVT2 PUSH AF
PUSH BC
CALL 0:11 Skriv ord
POP BC
POP AF
POP HL Avskiljare
NEG
SUB C
LD C,A
CALLP 0:11 Skriv avskiljare
POP HL N{sta ord
POP BC
RET
PUNKTER DM ".........."
;[ndra parametrar
SET LD DE,SETTAB
PUSH DE
CALL STRSCAN
POP DE
RETC Ambigious
JRNZ SET1
LD DE,SETJTB
JP 1:58 Utnyttja ROM!
SET1 PUSH DE
LD HL,SETF1
LD BC,SETF2-SETF1
CALL 0:11 Felmeddelande
POP HL
JP HELP1
SET2 PUSH DE
LD HL,SETF2
LD BC,SETF3-SETF2
CALL 0:11 Felmeddelande
POP HL
JP HELP1
SETF1 DM 13,10,7,"Parameter must be"
SETF2 DM 13,10,7,"Value must be"
SETF3
SETTAB DM 128,"ACCESS"
DM 129,"BAUD"
DM 130,"CHECK"
DM 131,"DEBUG"
DM 132,"DUPLEX"
DM 133,"EOL"
DM 134,"ESCAPE"
DM 135,"FILE"
DM 136,"FLOW"
DM 137,"LENGTH"
DM 138,"MARKER"
DM 139,"NEWLINE"
DM 140,"NUMPAD"
DM 141,"PADCHAR"
DM 142,"PARITY"
DM 143,"PAUSE"
DM 144,"QBIN"
DM 145,"QCTL"
DM 146,"REPT"
DM 147,"RETRY"
DM 148,"TEDESC"
DM 149,"TEDMODE"
DM 150,"TIMEOUT"
DM 255
SETJTB DW [ACC 128
DW [BAUD 129
DW [CHECK 130
DW [DEBUG 131
DW [DUPL 132
DW [EOL 133
DW [ESCAPE 134
DW [FILE 135
DW [FLOW 136
DW [LENGTH 137
DW [MARKER 138
DW [NEWL 139
DW [NUMPAD 140
DW [PADCHAR 141
DW [PAR 142
DW [PAUSE 143
DW [QBIN 144
DW [QCTL 145
DW [REPT 146
DW [RETRY 147
DW [TEDESC 148
DW [TED 149
DW [TIME 150
[BAUD LD DE,PBAUD
LD BC,BAUD
CALL [TAB
JP FIXBAUD
PBAUD DM 128,"300/300"
DM 129,"1200/75"
DM 130,"75/1200"
DM 131,"1200/1200"
DM 132,"2400/2400"
DM 133,"4800/4800"
DM 255
PBAUDS
[DUPL LD DE,PDUPL
LD BC,DUPLEX
JP [TAB
PDUPL DM 128,"HALF"
DM 129,"FULL"
DM 255
PDUPLS
[PAR LD DE,PPAR
LD BC,PARITET
JP [TAB
PPAR DM 128,"NONE"
DM 129,"SPACE",129,"0"
DM 130,"MARK",130,"1"
DM 131,"EVEN"
DM 132,"ODD"
DM 255
PPARS
[FLOW LD DE,PFLOW
LD BC,FLOW
JP [TAB
PFLOW DM 128,"OFF"
DM 129,"XON/XOFF"
DM 255
PFLOWS
[TIME LD DE,TIME
JR [TAL
[RETRY LD DE,RETRY
[TAL PUSH DE
CALL G\RTAL
POP BC
EX DE,HL
LD DE,PTAL
JPC SET2
LD A,H
AND A
JPNZ SET2
LD A,L
CP 1
JPC SET2
CP 31
JPNC SET2
LD (BC),A
CALL 7:66
AND A
RET
PTAL DM 254,"1-30"
DM 255
PTALS
[FILE LD DE,PFILE
LD BC,FILE
JP [TAB
PFILE DM 128,"TEXT"
DM 129,"BIN"
DM 130,"AUTO"
DM 255
PFILES
[LENGTH CALL G\RTAL
EX DE,HL
LD DE,PLENGTH
JPC SET2
LD A,H
AND A
JPNZ SET2
LD A,L
CP 20
JPC SET2
CP 95
JPNC SET2
LD (LENGTH),A
CALL 7:66
RET
PLENGTH DM 254,"20-94"
DM 255
PLENGTHS
[MARKER LD DE,MARKER
JP [TKN
[CHECK LD DE,PCHECK
LD BC,CHECK
[TAB PUSH DE
PUSH BC
CALL STRSCAN
POP BC
POP DE
RETC Ambigious
JPNZ SET2
AND 127
LD (BC),A
CALL 7:66
RET
PCHECK DM 129,"1"
DM 130,"2"
DM 255
PCHECKS
[EOL LD DE,EOL
JR [TKN
[NUMPAD LD DE,NUMPAD
JR [TKN
[PADCHAR LD DE,PADCHAR
JR [TKN
[QCTL LD DE,QCTL
JR [TKN
[QBIN LD DE,QBIN
JR [TKN
[ESCAPE LD DE,ESCAPE
JR [TKN
[TEDESC LD DE,TEDESC
JR [TKN
[REPT LD DE,REPT
[TKN PUSH DE Spara variabel
CALL G\RTAL
POP BC
EX DE,HL
LD DE,PTKN
JPC SET2
LD A,H
AND A
JPNZ SET2
LD A,L
BIT 7,A
JPNZ SET2
LD (BC),A
CALL 7:66
AND A
RET
PTKN DM 254,"0-127"
DM 255
PTKNS
[ACC LD DE,PACC
LD BC,ACCESS
JP [TAB
PACC DM 128,"PREPARE"
DM 129,"KILL"
DM 130,"STOP"
DM 255
PACCS
[DEBUG LD DE,PDEBUG
LD BC,DEBUG
JP [TAB
PDEBUG DM 128,"OFF"
DM 129,"PACKET"
DM 130,"DUMP"
DM 255
PDEBUGS
[TED LD DE,PTED
LD BC,TEDSAVE
CALL [TAB
RET
PTED DM 128,"OFF"
DM 129,"SAVE"
DM 130,"SEND"
DM 255
PTEDS
[NEWL LD DE,PNEWL
LD BC,NEWLINE
JP [TAB
PNEWL DM 128,"OFF"
DM 129,"ON"
DM 255
PNEWLS
[PAUSE LD DE,PAUSE
JP [TKN
SHOWTAB DW PACC,PACCS-PACC 128
DW PBAUD,PBAUDS-PBAUD 129
DW PCHECK,PCHECKS-PCHECK 130
DW PDEBUG,PDEBUGS-PDEBUG 131
DW PDUPL,PDUPLS-PDUPL 132
DW PTKN,PTKNS-PTKN eol 133
DW PTKN,PTKNS-PTKN escape 134
DW PFILE,PFILES-PFILE 135
DW PFLOW,PFLOWS-PFLOW 136
DW PLENGTH,PLENGTHS-PLENGTH 137
DW PTKN,PTKNS-PTKN marker 138
DW PNEWL,PNEWLS-PNEWL 139
DW PTKN,PTKNS-PTKN numpad 140
DW PTKN,PTKNS-PTKN padchar 141
DW PPAR,PPARS-PPAR 142
DW PTKN,PTKNS-PTKN pause 143
DW PTKN,PTKNS-PTKN qbin 144
DW PTKN,PTKNS-PTKN qctl 145
DW PTKN,PTKNS-PTKN rept 146
DW PTAL,PTALS-PTAL retry 147
DW PTKN,PTKNS-PTKN TEDesc 148
DW PTED,PTEDS-PTED 149
DW PTAL,PTALS-PTAL time 150
FIXBAUD LD A,(BAUD)
INC A
LD HL,FIXBAUD2-5
LD BC,5
FIXBAUD1 ADD HL,BC
DEC A
JRNZ FIXBAUD1
LD A,(HL) Kort tid f|r
INC HL tangentrepeet
LD (TAN1-1),A
LD E,(HL)
INC HL
LD D,(HL)
INC HL
LD (BAUDSEND),DE
LD E,(HL)
INC HL
LD D,(HL)
INC HL
LD (BAUDREC),DE
RET
FIXBAUD2 DB 3
DW BAUD300,BAUD300
DB 5
DW BAUD75,BAUD1200
DB 2
DW BAUD1200,BAUD75
DB 2
DW BAUD1200,BAUD1200
DB 2
DW BAUD2400,BAUD2400
DB 2
DW BAUD4800,BAUD4800
FIXTED LD A,(TEDFLG)
AND A
RETZ TED ej i minnet
CALL R[KNA Ant rader i TED
LD (TEDANRAD),DE
INC DE
LD (TEDINRAD),DE
CALL TILLBUFF
XOR A
LD (TEDKOL),A
LD L,A
LD H,A
LD (TEDUTRAD),HL
RET
PARMAREA
ACCESS DB 0 Kolla om fil finns
BAUD DB 1 Baud
CHECK DB 2 Checksummetyp
DEBUG DB 0 Debug-mode
DUPLEX DB 1 Duplex
EOL DB 13 End of packet
ESCAPE DB 27 Esccape-tkn terminal
FILE DB 2 Filtyp
FLOW DB 1 Flow controll
LENGTH DB 94 Packetl{ngd
MARKER DB 1 Start of packet
NEWLINE DB 0 Tolka <RETURN> som CRLF
NUMPAD DB 0 Antal PAD-tkn
PADCHAR DB 0 PAD-tecken
PARITET DB 0 Paritet
PAUSE DB 0 Paus innan packet s{nds
QBIN DB "&"
QCTL DB "#"
REPT DB "~"
RETRY DB 5 Antal omf|rs|k
TEDESC DB 0 Hopp-till-TED-tangent
TEDSAVE DB 0 Spara/s{nda text i TED
TIME DB 10 Timeout
PARMLEN EQU $-PARMAREA
LOG DB 0 Logga p} disk
DMP DB 0 S{nd iv{g fil
<<< kerm4.asm >>>
; KERM4.ASM
; Anders Franz`n <5258>
; Stockholm 1987-09-13
;Ny LIB-rutin f|r TED
TEDLIB LD HL,TL4
LD BC,TL5-TL4
CALL 0:11
TL1 CALL 0:2
LD HL,TL6
LD BC,8
CPIR
JRZ TL2 Siffra 0-7
LD C,8
CPIR
RETNZ Ej shift+siffra
XOR A Visa filstorlek
TL2 LD (255:212),A
LD HL,TL7
LD (WILDSTR),HL
LD A,C \nskad drive
OR 128 Flagga TED-lib
CALL DIR
JRNC TEDLIB
LD HL,TL5
LD BC,TL6-TL5
CALL 0:11
JR TL1
TL4 DB 27,61,32+23,32+0,7
DM "* \NSKAD DRIVE ?"
TL5 DB 27,61,32+23,32+0,7
DM "* SKIVAN EJ KLAR."
TL6 DM "76543210"
DM '/&%$#"!='
TL7 DB "*",13
;Huvudrutin f|r LIB
DIRH RST 32
CP ","
JRNZ DIRH1
INC HL
RST 32
AND 95
CP "S"
JRNZ DIRH1
RST 24
XOR A Filstorlek visas
DIRH1 LD (255:212),A Spara flagga
CALL DRIVEFIX
LD HL,(WILDSTR)
LD A,(HL)
CP 13
JRNZ DIRH2 Argument finns
LD (HL),"*" Default alla
INC HL
LD (HL),A
DIRH2 CALL 7:66
LD BC,(WILDANT)
DIRH3 LD A,C
PUSH BC
CALL DIR
POP BC
INC C
DJNZ DIRH3
RET
DIR LD C,A
AND 127
PUSH BC
CALL LIBINIT
POP BC
RETC
BIT 7,C
LD HL,DIR19
LD BC,DIR20-DIR19
CALLNZ 0:11 Skriv om TED-lib
LD DE,0:32*7 Sp}r 0 sektor 7
CALL LIBL[S L{s sektor
RETC Felkod >0
LD HL,245:0 Inl{st sektor
LD E,L
LD D,L DE <-- noll
LD B,160 Antal bytes
XOR A
DIR1 CP (HL) Unders|k byte
INC HL
JRNZ DIR5 Ej noll
PUSH HL
LD HL,8
ADD HL,DE \ka antalet
EX DE,HL sektorer med 8
POP HL
DIR5 DJNZ DIR1 Upprepa
LD (255:200),DE Ant sektorer
LD DE,0:32*0 Sp}r 0 sektor 0
CALL LIBL[S L{s sektor
RETC Felkod > 0
LD HL,DIR15
LD BC,DIR17-DIR15
CALL 0:11 Skriv "DRx:"
LD HL,245:135
LD BC,120:0 Max 120 tecken
DIR6 LD A,(HL)
INC HL
CP 10 Volymnamn slut ?
JRZ DIR7 Ja, hoppa
CP 13
JRZ DIR7 Ja, hoppa
CP 32 Finns volymnamn?
JRC DIR8 Nej, hoppa
CP 128
JRNC DIR8 Nej, hoppa
INC C \ka r{knare
DJNZ DIR6 Upprepa om fler
DIR7 LD A,C
AND A Fanns volymnamn?
JRZ DIR8 Nej, hoppa
LD B,0 BC=l{ngd p} text
LD HL,245:135
CALL 0:11 Skriv volymnamn
DIR8 CALL 7:66
CALL FIRSTFIL
RETC
JRZ DIR14
LD B,1
DIR9 DJNZ DIR11
CALL 7:66
LD A,(1:216)
CP 40
LD B,2
JRZ DIR10
LD B,4
DIR10 LD A,(255:212)
AND A
JRZ DIR11 Storlek visas
INC B
DIR11 PUSH BC
LD HL,255:132
LD BC,12
CALL 0:11 Skriv filnamn
LD BC,1
LD A,(255:212) Ska filstorlek
AND A visas ?
JRNZ DIR12 Nej
LD HL,(255:146)
LD A,4
LD DE,SPACE
CALL SKRTAL
LD BC,3
DIR12 LD HL,SPACE
CALL 0:11 Skriv space
POP BC
CALL PAUS
RETC CTRL-C
PUSH BC
CALL NEXTFIL
POP BC
RETC
JRNZ DIR9
DIR14 CALL 7:66
CALL 7:66
LD HL,(255:202) Lediga sekt
CALL SKRIVTAL
LD HL,DIR17
LD BC,DIR18-DIR17
CALL 0:11
LD HL,(255:200) Ant sektorer
CALL SKRIVTAL
LD HL,DIR18
LD BC,DIR19-DIR18
CALL 0:11
RET
DIR15 DM 13,10,"DR"
DIR16 DM "x: "
DIR17 DM " of "
DIR18 DM " sectors free."
DM 13,10
DIR19 DB 12,27,61,32+3,32+0
DM "LIB",13,10
DM "====="
DB 27,61,32+6,32+0
DIR20
LIBINIT LD (253:1),A Selektera drive
ADD 48
LD (DIR16),A
LD DE,0:32*6 Sp}r 0 sektor 6
CALL LIBL[S L{s sektor
RETC Felkod > 0
LD HL,245:0 Inl{st sektor
LD E,L
LD D,L DE <-- noll
LD C,160 Antal byte
LIB1 LD B,8 ]tta bitar
LIB2 RR (HL) Testa bit
JRC LIB3 Upptagen
INC DE \ka r{knare
LIB3 DJNZ LIB2 Repetera
INC HL N{sta byte
DEC C Slut ?
JRNZ LIB1 Nej, upprepa
LD (255:202),DE Lediga sekt
LD HL,245:239 Kopiera vilka
LD DE,255:204 sektorer i
LD C,8 biblioteket
LDIR som {r anv{nda
AND A
RET
FIRSTFIL LD DE,2:0 Sp}r 2 sektor 0
JR NX2
NEXTFIL LD HL,(DRFIL)
LD DE,(DRSEKT)
LD A,L
ADD 16 N{sta fil i
LD L,A biblioteket
LD (DRFIL),HL
AND A Sektor slut ?
JRNZ NX3 Nej, kolla fil
NX1 LD A,E
ADD 32 N{sta sektor
LD E,A p} sp}r tv}
AND A Sektorer slut ?
RETZ Ja, retur!
NX2 LD (DRSEKT),DE
PUSH DE Spara sektor-nr
LD HL,255:204
SRL E Dela E med 32
SRL E
SRL E
SRL E
SRL E
LD D,0
ADD HL,DE Sl} i tabell
LD A,(HL) [r sektorn
CP 2 anv{nd ?
POP DE
JRC NX1 Nej, tag n{sta
CALL LIBL[S L{s sektor
RETC Felkod > 0
LD HL,245:16 Biblioteket
LD DE,252:16 Kassettbuffer 2
LD BC,240
PUSH DE
LDIR
POP HL Filbeskrivning
LD (DRFIL),HL
NX3 LD A,(HL)
AND A Finns fil ?
JRZ NEXTFIL Nej, hoppa
INC A
JRZ NEXTFIL
PUSH HL
LD DE,4
ADD HL,DE Peka p} filnamn
EX DE,HL
LD HL,255:128
LD (HL),"D"
INC HL
LD (HL),"R"
INC HL
LD A,(DIR16)
LD (HL),A
INC HL
LD (HL),":"
INC HL
EX DE,HL
PUSH DE
LD BC,8
LDIR Spara filnamn
LD A,"."
LD (DE),A
INC DE
LD BC,3
LDIR Spara extension
LD A,13
LD (DE),A
POP DE
CALL WILDCARD Kolla filnamn
POP HL
JPNC NEXTFIL Passar ej
LD A,(255:212) Ska filstorlek
AND A visas ?
RETNZ Nej, retur
LD D,(HL) Sp}r segmrecord
INC HL
LD A,(HL)
AND 224 Ta bort status
LD E,A Sektor*32
CALL LIBL[S L{s segmrecord
RETC Felkod > 0
LD DE,245:4 Segmbeskrivning
LD HL,0 R{knare f|r
LD B,L filstorleken
NX4 LD A,(DE)
INC A Fler segment ?
JRZ NX5 Nej, hoppa
INC DE Skippa sp}radr
LD A,(DE)
INC DE
AND 31 Maska fram antal
INC A sektorer i segm
LD C,A
ADD HL,BC \ka r{knare
JR NX4 N{sta segment
NX5 LD (255:146),HL
OR 1
RET
DRSEKT DW 0
DRFIL DW 0
; LIBL[S l{ser en sektor p} skivan.
LIBL[S PUSH DE
PUSH BC
PUSH HL
CALL 96:102 L{s sektor
POP HL
POP BC
POP DE
LD A,(253:21)
AND A Felkod > 0 ?
RETZ
SCF
RET
TYPE PUSH HL
CALL CLOSE
POP HL
CALL OPEN
JPC ERROR
CALL 7:66
TYP1 LD HL,BUFF6
LD BC,255
LD DE,8:147
PUSH HL
CALL FILCONTR L{s in en rad
POP HL
JRC TYP3 EOF, BAC el ERR
EX DE,HL
LD (HL),10
INC HL
SBC HL,DE
LD C,L
LD B,H
EX DE,HL
CALL 0:11
CALL PAUS
JRNC TYP1 Ej CTRL-C
TYP3 CP 186
JRZ TYP4 Kanske BAC-fil
AND A
JPNZ ERROR Ej EOF
LD DE,8:144
CALL FILCONTR Close
JPC ERROR
CALL 7:66
RET
TYP4 LD L,(IX+8)
LD H,(IX+9)
LD A,(HL)
INC HL
CP 130
JRZ TYP5
CP 131
JRNZ TYP3 Ej BAC-fil
TYP5 LD A,(HL)
AND A
JRZ TYP6 Forts n{sta blk
DEC A
JRZ TYP3 Slut p} pgm
LD DE,BUFF6
PUSH DE
PUSH IX
CALL 17:149 \vers{tt BAC-rad
POP IX
EX (SP),HL
EX DE,HL
LD (HL),10 LF sist i rad
INC HL
AND A
SBC HL,DE
LD C,L
LD B,H
EX DE,HL
CALL 0:11
CALL PAUS
POP HL N{sta rad
JRNC TYP5
JR TYP3
TYP6 LD DE,8:153
CALL FILCONTR L{s n{sta block
JRNC TYP5
JR TYP3
DELETE PUSH HL
CALL CLOSE
POP HL
CALL DRIVEFIX
LD A,21
JPC ERROR
DEL1 LD A,(WILDFLG)
AND A
JRZ DEL4 Ej wildcard
BIT 7,A
JRNZ DEL3 Drive initierad
SET 7,A
LD (WILDFLG),A
DEL2 LD BC,(WILDANT)
DEC B
RETM Slut p} drivear
LD A,C Drivenummer
INC C
LD (WILDANT),BC
CALL LIBINIT
JRC DEL2
CALL FIRSTFIL
JRC DEL2
JRZ DEL2 Drive tom
JR DEL4
DEL3 CALL NEXTFIL
JRC DEL2
JRZ DEL2 N{sta drive
DEL4 LD HL,DEL6
LD BC,DEL7-DEL6
CALL 0:11
LD HL,255:128 Filnamn
LD BC,16
PUSH HL
CALL 0:11
POP HL
RST 32
CALL OPEN
JRC DEL5
LD DE,8:159
CALL FILCONTR Delete fil
DEL5 CALLC ERROR
CALL PAUS
RETC CTRL-C
LD A,(WILDFLG)
AND A
JRNZ DEL1
RET
DEL6 DM 13,10,"delete "
DEL7
CLOSE LD A,(LOG)
AND A
JRNZ CL1
LD A,(DMP)
AND A
RETZ
CL1 LD HL,CL2
LD BC,CL3-CL2
CALL 0:11
XOR A
LD (LOG),A
LD (DMP),A
LD IX,FIL
LD DE,8:127
CALL FILCONTR Close
JPC ERROR
CALL 7:66
RET
CL2 DB 13,10
DM "Closing DUMP/LOG file"
CL3
LOGG PUSH HL
CALL CLOSE
POP HL
CALL PREPARE
JPC ERROR
LD HL,BUFF3
LD (LOGBUFF),HL
LD IX,KERMAREA
LD (IX+29),1 Textfil
LD A,255
LD (LOG),A
RET
DUMP PUSH HL
CALL CLOSE
POP HL
CALL OPEN
JPC ERROR
LD IX,KERMAREA
XOR A
LD (IX+20),A Kommando DUMP
LD (IX+27),A Inget data l{st
LD (IX+29),1 Textfil
DEC A
LD (DMP),A
RET
SAVE PUSH HL
CALL CLOSE
POP HL
CALL PREPBAC
JPC ERROR
LD E,(IX+8)
LD D,(IX+9)
LD A,D
AND A
LD A,52
JPZ ERROR Buffer saknas
LD HL,SAV2
LD BC,SAV3-SAV2
LDIR
EX DE,HL
LD DE,PARMAREA
LD B,PARMLEN
SAV1 LD (HL),","
INC HL
LD (HL),199
INC HL
LD A,(DE)
INC DE
LD (HL),A
INC HL
LD (HL),0
INC HL
LD (HL),186
INC HL
DJNZ SAV1
EX DE,HL
LD HL,SAV3
LD BC,SAV8-SAV3
LDIR
CALL 8:156 Skriv block
CALL 8:127 St{ng filen
RET
SAV2 DB 130 BASIC-pgm
DB 5*1+10
DB 10,0,134,129
DB 199,64,254,186
DB ",",199,0,0,186
DB 13
DB 5*PARMLEN+10
DB 20,0,134,129
DB 199,128,255,186
SAV3 DB 13
SAV4 DB SAV7-SAV4
DB 30,0,134,145 CHAIN
DB 203,34,SAV6-SAV5 str{ng
SAV5 DB "KERM.BAC"
SAV6 DB 187,13
SAV7 DB 1 Slut p} pgm
SAV8
PAUS CALL 3:62
SCF
RETNZ CTRL-C
PUSH IX
INP 56
AND 127
CP 32
JRZ PAUS1 Tangentbroms
LD A,(253:245)
AND 128
JRZ PAUS2 Tangent ej nere
CALL 0:2
PAUS1 CALL 0:2
PAUS2 POP IX
AND A
RET
<<< kerm5.asm >>>
; KERM5.ASM
; Anders Franz`n <5258>
; Stockholm 1987-09-24
PACKNR DW 0
ANTBYTES DW 0
ANTBUF DW 0
NAKNR DW 0
KERMAREA DS 40
FIL DS 15
DB 0
;Ta emot en fil som s{nds med Kermit
RECEIVE INP 58
AND 2
JPNZ TIMEOUT Ingen b{rv}g
LD HL,KTXT1
LD BC,KTXT2-KTXT1
CALL WRITE
LD IX,KERMAREA
LD (IX+0),0 Inga flaggor
CALL RDEFAULT
LD A,(TIME)
LD (IX+12),A Default maxtid
LD (IX+8),1 Start CH-typ
LD (IX+23),0 Packetr{knare
LD (IX+26),"S"
RE1 LD A,(RETRY)
LD (IX+20),A Max ant f|rs|k
JR RE3
RE2 DEC (IX+20)
JPZ TIMEOUT F|r m}nga f|rs|k
LD A,(IX+26)
CP "D"
JRNZ RE3 V{ntar ej data
LD HL,(NAKNR) R{kna antalet
INC HL felaktiga paket
LD (NAKNR),HL
CALL SKRIVFIL
RE3 BIT 3,(IX+0)
JPNZ TIMEOUT ESCAPE
LD A,(IX+12)
LD (IX+21),A S{tt tid kvar
LD A,(IX+26)
CP "S"
JPZ RINIT Kermitparametrar
CP "F"
JPZ RFIL Filhuvud
CP "D"
JPZ RDATA Data i fil
RET Klart
;V{nta p} Kermitparametrar
RINIT CALL GPACK Ta emot packet
JPC RE2 Fel, f|rs|k igen
LD A,(IX+25)
CP "E"
JPZ RERROR Avbryt!
CP "S"
JPNZ RE2 Fel packettyp
LD HL,KTXT2
LD BC,KTXT3-KTXT2
CALL WRITE
CALL RFIX
LD C,(IX+8)
PUSH BC
LD (IX+8),1 CH-typ 1
LD (IX+24),9
LD (IX+25),"Y"
CALL SPACK Positivt svar
POP BC
LD (IX+8),C
JPC TIMEOUT Time out
LD HL,KTXT4
LD BC,KTXT5-KTXT4
CALL WRITE Filrubrik
LD A,(IX+23)
INC A
AND 63
LD (IX+23),A
LD (IX+26),"F"
JP RE1
;V{nta p} filhuvud
RFIL CALL GPACK Ta emot packet
JPC RE2 Fel, f|rs|k igen
LD A,(IX+25)
CP "S"
JPZ RFIL1 Oms{ndning
CP "Z"
JPZ RFIL5 Oms{ndning
CP "F"
JPZ RFIL6 Filnamn
CP "B"
JPZ RBREAK Break
CP "E"
JPZ RERROR
JP FELPACK
;Behandla oms{ndning parametrar
RFIL1 LD A,(IX+23)
DEC A
CP (IX+22)
JPNZ RE2 Ej oms{ndning
CALL RFIX
LD C,(IX+8)
PUSH BC
LD (IX+8),1 CH-typ 1
LD (IX+24),9
LD (IX+25),"Y"
CALL SPACK Positivt svar
POP BC
LD (IX+8),C
JPNC RE1
JP TIMEOUT
;Fixa parametrar att s{nda
RFIX CALL RPARM
LD A,(LENGTH)
LD (IX+1),A
LD A,(TIME)
LD (IX+2),A
LD A,(NUMPAD)
LD (IX+3),A
LD A,(PADCHAR)
LD (IX+4),A
LD A,(EOL)
LD (IX+5),A
LD A,(QCTL)
LD (IX+6),A
LD (IX+7),"Y" Vi klarar av
LD A,(PARITET) ev QBIN
AND A
JRZ RFIX1 Paritet NONE
LD A,(IX+17)
AND A S{ndare klarar
JRZ RFIX2 ej av QBIN
LD (IX+7),A
CP "Y" S{ndare beg{r
JRNZ RFIX2 QBIN
LD A,(QBIN)
LD (IX+7),A
LD (IX+17),A
JR RFIX2 Vi beg{r QBIN
RFIX1 LD A,(IX+17)
AND A S{ndare klarar
JRZ RFIX2 ej av QBIN
LD (IX+7),A
CP "Y" S{ndare beg{r
JRNZ RFIX2 QBIN
LD (IX+17),0 Ingen vill ha
RFIX2 LD A,(CHECK)
LD (IX+8),A
CP (IX+18)
JRZ RFIX3 B}da har samma
LD (IX+8),1
LD (IX+18),1
RFIX3 LD A,(IX+19)
LD (IX+9),A
CALL SPARM
RET
;Behandla oms{ndning EOF
RFIL5 LD A,(IX+23)
DEC A
CP (IX+22)
JPNZ RE2 Ej oms{ndning
LD (IX+24),0 Inget data
LD (IX+25),"Y"
CALL SPACK Positivt svar
JPNC RE1
JP TIMEOUT
;Filnamn
RFIL6 LD A,(IX+23)
CP (IX+22)
JPNZ RE2 Fel packetnr
LD HL,0
LD (PACKNR),HL
LD (ANTBYTES),HL
LD (ANTBUF),HL
LD (NAKNR),HL
CALL CRLF Ny rad
LD HL,BUFF3 Peka p} data
LD DE,255:128
LD C,(IX+24) L{ngd filnamn
LD B,0
PUSH HL
PUSH DE
CALL 0:65 Fixa filnamn
POP HL
LD BC,8
CALL WRITE
PUSH HL
LD HL,KTXT6
LD BC,1
CALL WRITE "."
POP HL
LD BC,3
CALL WRITE Extension
CALL SKRIVFIL
POP HL
LD (IX+37),0 Ej CTRL-XZ {nnu
SET 5,(IX+0) Till}t CTRL-XZ
PUSH HL
LD E,(IX+24) L{ngd data
LD D,0
ADD HL,DE
LD (HL),13 Slut p} filnamn
POP HL Pekar p} filnamn
LD DE,(FILPEK)
LD A,(DE)
CP 13
JRZ RFIL7
EX DE,HL Lokalt filnamn
RFIL7 LD A,(ACCESS)
AND A Strunta i om
JRZ RFIL8 filen finns
PUSH HL
PUSH IX
CALL OPEN
POP IX
POP HL Pekar p} filnamn
JRNC RFIL9 Filen finns!
AND 127
CP 21
JPNZ FELFIL Annat fel
RFIL8 PUSH IX
CALL PREPARE
POP IX
JPNC RFIL13 Det gick bra
JP FELFIL
RFIL9 LD A,(ACCESS)
CP 1
JRZ RFIL12 Kill
LD HL,RFIL10
LD BC,RFIL12-RFIL10
CALL WRITE
LD HL,RFIL11
LD BC,RFIL12-RFIL11
LD (IX+24),C
LD DE,BUFF4
LDIR
LD (IX+25),"E"
CALL SPACK Error!
JP AVBRYT
RFIL10 DM 13,10,7
RFIL11 DM "File already "
DM "exists on disk"
RFIL12 PUSH HL
PUSH IX
LD IX,FIL
LD DE,8:159
CALL FILCONTR Kill
POP IX
POP HL Pekar p} filnamn
JPNC RFIL8 Forts{tt...
JP FELFIL
RFIL13 LD HL,(ANTBUF)
INC HL
LD (ANTBUF),HL
CALL SKRIVFIL
LD (IX+29),0 Filtyp ok{nd
LD (IX+24),0
LD (IX+25),"Y"
LD A,(IX+37)
AND A
JRZ RFIL14 Ej CTRL-XZ
LD (BUFF4),A S{nd tkn i ACK!
INC (IX+24) L{ngd ett
SET 4,(IX+0) V{nta p} Z-pack
RES 5,(IX+0) F|rbjud CTRL-XZ
RFIL14 CALL SPACK Positivt svar
JPC TIMEOUT
LD HL,(PACKNR)
INC HL
LD (PACKNR),HL
CALL SKRIVFIL
LD A,(IX+23)
INC A
AND 63
LD (IX+23),A
LD (IX+26),"D"
JP RE1
;Break
RBREAK LD A,(IX+23)
CP (IX+22)
JPNZ RE2 Fel packetnr
LD (IX+24),0
LD (IX+25),"Y"
CALL SPACK Positivt svar
JPC TIMEOUT
LD (IX+26),"C"
JP RE1
RDATA CALL GPACK Ta emot packet
JPC RE2 Fel, f|rs|k igen
LD A,(IX+25)
CP "Z"
JPZ REOF EOF
CP "E"
JPZ RERROR
BIT 4,(IX+0) S{ndaren klarar
JPNZ REOF1 inte av CTRL-XZ
CP "D"
JPZ RDATA1 Data
CP "F"
JPZ RDATA3 Oms{ndning
JP FELPACK
;Data i fil
RDATA1 LD A,(IX+23)
CP (IX+22)
JRNZ RDATA3 Fel packetnr
CALL UNPACK Packa upp data
JPC FELFIL Fel vid skrivn
LD HL,(PACKNR)
INC HL
LD (PACKNR),HL
CALL SKRIVFIL
LD (IX+24),0
LD (IX+25),"Y"
LD A,(IX+37)
AND A
JRZ RDATA2 Ej CTRL-XZ
LD (BUFF4),A S{nd tkn i ACK!
INC (IX+24) L{ngd ett
SET 4,(IX+0) V{nta p} Z-pack
RES 5,(IX+0) F|rbjud CTRL-XZ
RDATA2 CALL SPACK Positivt svar
JPC TIMEOUT
LD A,(IX+23)
INC A
AND 63
LD (IX+23),A
JP RE1
;Behandla oms{ndning filnamn el data
RDATA3 LD A,(IX+23)
DEC A
CP (IX+22)
JPNZ RE2 Ej oms{ndning
LD (IX+24),0
LD (IX+25),"Y"
CALL SPACK Positivt svar
JPNC RE1
JP TIMEOUT
;End Of File
REOF LD A,(IX+23)
CP (IX+22)
JPNZ RE2 Fel packetnr
RES 5,(IX+0) F|rbjud CTRL-XZ
BIT 4,(IX+0)
JRZ REOF2 Ej CTRL-XZ
LD A,(IX+24) L{ngd packet
AND A
JRZ REOF1 Tom
DEC A
JRNZ REOF1 Mer {n ett tkn
LD A,(BUFF3) Data i packet
CP "D"
JRNZ REOF1 Ej "avbryt"
RES 4,(IX+0) CTRL-XZ funkade
REOF1 PUSH IX
LD IX,FIL
LD DE,8:159
CALL FILCONTR Kill
POP IX
JPC FELFIL
LD A,32
LD (253:244),A
LD HL,KTXT7
LD BC,KTXT8-KTXT7
CALL WRITE
BIT 4,(IX+0)
JRZ REOF6 CTRL-XZ funkade
LD HL,REOF7
LD BC,REOF8-REOF7
LD DE,BUFF4
LD (IX+24),C
LDIR
LD (IX+25),"E"
CALL SPACK Error!
JP AVBRYT
REOF2 LD A,(IX+29) Typ av fil
PUSH IX
LD IX,FIL
CP 1
JRZ REOF3 Textfil
BIT 7,(IX+14)
JRZ REOF4 Buffert tom
CALL 8:156 Skriv buffert
RES 7,(IX+14) Buffert tom
REOF3 LD HL,(ANTBUF)
INC HL
LD (ANTBUF),HL
REOF4 LD DE,8:127
CALL FILCONTR Close
POP IX
JRNC REOF5
CALL SKRIVERR
JR REOF6
REOF5 LD A,32
LD (253:244),A
LD HL,KTXT5
LD BC,KTXT6-KTXT5
REOF6 CALL WRITE
LD (IX+24),0
LD (IX+25),"Y"
CALL SPACK Positivt svar
JPC TIMEOUT
LD A,(IX+23)
INC A
AND 63
LD (IX+23),A
LD (IX+26),"F"
JP RE1
REOF7 DM "User interrupt"
REOF8
;Skriv data p} fil
PUTFIL LD A,(IX+29) Typ av fil
CP 1
JRZ PF2 Textfil
CP 2
JRZ PF5 Bin{rfil
LD A,(FILE)
AND A
JRZ PF1 Textfil
CP 1
JRZ PF4 Bin{rfil
LD A,(HL) Annars unders|k
AND A byte i filen!
JRZ PF4 ABS-fil
CP 128
JRNC PF4 Annan bin{rfil
PF1 LD (IX+29),1 Typ textfil
PF2 PUSH IX
LD IX,FIL
LD E,(IX+13)
PUSH DE
LD DE,8:150
CALL FILCONTR Skriv rad
POP DE
POP IX
RETC
LD A,(FIL+13)
CP E
CCF
RETNC
LD HL,(ANTBUF)
INC HL
LD (ANTBUF),HL
AND A
RET
PF4 LD (IX+29),2 Typ bin{rfil
PUSH IX
LD IX,FIL
INC (IX+13)
LD A,(IX+9)
POP IX
AND A
LD A,52 ERR 52
SCF
RETZ Buffert saknas
PF5 PUSH IX
LD IX,FIL
LD E,(IX+10) Position i buff
LD D,(IX+11)
PF6 LD A,B
OR C
JRZ PF7
LDI L{gg tkn i buff
SET 7,(IX+14) Data i buffert
DEC (IX+13) Kvar i buffert
JRNZ PF6 Buffert ej full
PUSH HL
PUSH BC
CALL 8:156 Skriv buffert
LD HL,(ANTBUF)
INC HL
LD (ANTBUF),HL
POP BC
POP HL
RES 7,(IX+14) Buffert tom
INC (IX+13)
JR PF6
PF7 LD (IX+10),E
LD (IX+11),D
POP IX
RET
KTXT1 DB 13,10
DM "Waiting for init packet",13
KTXT2 DM "Init packet received ",13
KTXT3 DB 13,10
DM "Sending init packet",13
KTXT4 DM "filename bad "
DM "pkt bytes blk status"
KTXT5 DM "OK "
KTXT6 DM "."
KTXT7 DM "FLUSH "
KTXT8 DM "ERR "
KTXT9 DM "("
KTXT10 DM ")"
;Visa text i errorpacket p} sk{rm
RERROR LD HL,RERR1
LD BC,RERR2-RERR1
CALL WRITE
LD HL,BUFF3 Peka p} data
LD C,(IX+24) L{ngd data
LD B,0
CALL WRITE Skriv text
JP AVBRYT
RERR1 DM 13,10
DM "Received message:"
DM 13,10
RERR2 EQU $
;Fel vid filhantering, s{nd error
FELFIL PUSH AF
CALL SKRIVERR Skriv p} sk{rm
POP AF
LD (IX+24),0
OR 128
LD HL,FELF4
LD BC,FELF5-FELF4
CPIR
JRNZ FELF3
DEC HL Peka p} kod
FELF1 INC HL
BIT 7,(HL)
JRNZ FELF1 Skippa highbyte
PUSH HL
LD BC,0
FELF2 INC HL
INC BC
BIT 7,(HL)
JRZ FELF2
POP HL
LD (IX+24),C
LD DE,BUFF4
LDIR
FELF3 LD (IX+25),"E"
CALL SPACK Error!
JP AVBRYT
FELF4 DM 128+21
DM "Can't find file"
DM 128+35
DM 128+36
DM 128+37
DM 128+38
DM 128+44
DM 128+45
DM 128+46
DM 128+47
DM 128+48
DM 128+49
DM "I/O-error"
DM 128+39
DM 128+43
DM "Writeprotection"
DM 128+41
DM "Disk full"
DM 128+42
DM "Disk not ready"
DM 255
FELF5 EQU $
FELPACK LD HL,FPK1
LD BC,FPK3-FPK1
CALL WRITE
LD HL,FPK2
LD BC,FPK3-FPK1
LD (IX+24),C
LD DE,BUFF4
LDIR
LD (IX+25),"E"
CALL SPACK S{nd error
JR AVBRYT
FPK1 DM 10,13
FPK2 DM "Wrong packet received"
FPK3 EQU $
TIMEOUT INP 58
AND 2
LD HL,TIM2
LD BC,TIM3-TIM2
JRNZ TIM1 Ingen b{rv}g
BIT 3,(IX+0)
LD HL,TIM3
LD BC,TIM4-TIM3
JRNZ TIM1 ESCAPE nedtryckt
LD HL,TIM4
LD BC,TIM5-TIM4
TIM1 CALL 0:11
AVBRYT PUSH IX
LD IX,FIL
LD DE,8:127
CALL FILCONTR Close
POP IX
CALLC SKRIVERR
LD (IX+26),"A"
SCF
RET
TIM2 DM 13,10,7,"No connection"
TIM3 DM 13,10,7,"Abort"
TIM4 DM 13,10,7,"Timeout"
TIM5 EQU $
<<< kerm6.asm >>>
; KERM6.ASM
; Anders Franz`n <5258>
; Stockholm 1987-09-13
;S{nd en eller flera fil med Kermit
SEND INP 58
AND 2
JPNZ TIMEOUT B{rv}g saknas
LD HL,KTXT3
LD BC,KTXT4-KTXT3
CALL WRITE
LD IX,KERMAREA
LD (IX+0),0
LD (IX+23),0 Packetr{knare
LD A,(LENGTH)
LD (IX+1),A
LD A,(TIME)
LD (IX+2),A
LD A,(NUMPAD)
LD (IX+3),A
LD A,(PADCHAR)
LD (IX+4),A
LD A,(EOL)
LD (IX+5),A
LD A,(QCTL)
LD (IX+6),A
LD (IX+7),"Y"
LD A,(PARITET)
AND A
JRZ SE1 Paritet NONE
LD A,(QBIN)
LD (IX+7),A Vi beg{r QBIN
SE1 LD A,(CHECK)
LD (IX+8),A
LD A,(REPT)
LD (IX+9),A
CALL RDEFAULT
CALL SPARM
LD C,(IX+8)
PUSH BC
LD (IX+8),1 CH-typ 1
LD (IX+24),9
LD (IX+25),"S"
CALL PPACK S{nd parametrar
POP BC
LD (IX+8),C
JPC TIMEOUT Time out
CALL RPARM
LD A,(PARITET)
AND A
JRZ SE2 Paritet NONE
LD A,(IX+17)
CP (IX+7)
JRZ SE3 B}da vill QBIN
CP "Y"
JRZ SE3
LD (IX+7),0 Mottagaren
JR SE3 klarar ej QBIN
SE2 LD (IX+7),0
LD A,(IX+17)
AND A S{ndare klarar
JRZ SE3 ej QBIN
CP "Y"
JRZ SE3 Ingen vill QBIN
LD (IX+7),A S{ndare vill
SE3 LD A,(IX+8)
CP (IX+18)
JRZ SE4
LD (IX+8),1
LD (IX+18),1
SE4 LD A,(IX+9)
CP (IX+19)
JRZ SE5
LD (IX+9),0
LD (IX+19),0
SE5 LD HL,KTXT4
LD BC,KTXT5-KTXT4
CALL WRITE Skriv filrubrik
SE6 CALL CRLF Ny rad
LD HL,0
LD (PACKNR),HL
LD (ANTBYTES),HL
LD (ANTBUF),HL
LD (NAKNR),HL
LD A,(WILDFLG)
AND A
JRZ SE9 Ej wildcard
BIT 7,(IX+0)
JRNZ SE8 Drive initierad
SET 7,(IX+0)
XOR A
LD (255:212),A Filstorlek
SE7 LD BC,(WILDANT)
DEC B
JPM SE20 Slut p} drivear
LD A,C Drivenummer
INC C
LD (WILDANT),BC
CALL LIBINIT
JRC SE7
CALL FIRSTFIL
JRC SE7
JRZ SE7 Drive tom
JR SE9
SE8 CALL NEXTFIL
JRC SE7
JRZ SE7 N{sta drive
SE9 LD HL,255:132 Fil utan enhet
LD DE,BUFF4
LD (IX+24),-1 L{ngd data
LD BC,(FILPEK)
LD A,(BC)
CP 13
JRZ SE10 Samma fil remote
LD L,C
LD H,B
SE10 RST 32
INC HL
LD (DE),A Kopiera filnamn
INC DE
INC (IX+24) R{kna antal tkn
CP 13
JRNZ SE10
LD HL,255:132 Fil utan enhet
LD BC,12 L{ngd filnamn
CALL WRITE Skriv filnamn
CALL SKRIVFIL
LD A,(WILDFLG)
AND A
JRZ SE11 Ej wildcard
LD A,32+1
LD (253:244),A
LD HL,KTXT9
LD BC,1
CALL WRITE "("
LD A,(DEBUG)
DEC A
LD HL,(255:146)
CALLNZ SKRIVTAL Filstorlek
LD HL,KTXT10
LD BC,1
CALL WRITE ")"
SE11 LD HL,255:128 Filnamn
RST 32
PUSH IX
CALL OPEN
POP IX
JRNC SE12 Det gick bra
CALL SKRIVERR
LD A,(WILDFLG)
AND A Wildcard?
JPNZ SE6 Ja, n{sta fil
JP SE20 S{nd BREAK
SE12 LD (IX+37),0 Ej CTRL-XZ {nnu
SET 5,(IX+0) Till}t CTRL-XZ
LD (IX+27),0 Inget data l{st
LD (IX+29),0 Ok{nd filtyp
LD (IX+25),"F"
CALL PPACK S{nd filhuvud
JPC TIMEOUT Time out
LD HL,1
LD (ANTBUF),HL
CALL SKRIVFIL
SE13 LD A,(IX+37)
AND A
JPNZ SE18 Hoppa om CTRL-XZ
CALL PACK Packa data
JRC SE15 EOF eller ERROR
LD (IX+25),"D"
CALL PPACK S{nd data
JPC TIMEOUT Time out
CALL SKRIVFIL
LD A,(IX+24)
AND A
JRZ SE13 Inget data i ACK
DEC A
JRNZ SE13 Mer {n ett tkn
LD A,(BUFF3)
CP "X"
JRZ SE14 X i ACK
CP "Z"
JRNZ SE13 Ej Z i ACK
SE14 RES 5,(IX+0) F|rbjud CTRL-XZ
LD (IX+37),A
JP SE18
SE15 AND A
JRZ SE16 EOF
CALL SKRIVERR Annat fel
JR SE18
SE16 LD A,(IX+24)
AND A
JRZ SE17 Inget mer data
LD (IX+25),"D"
CALL PPACK S{nd sista data
JPC TIMEOUT Time out
CALL SKRIVFIL
SE17 LD A,32
LD (253:244),A
LD HL,KTXT5
LD BC,KTXT6-KTXT5
CALL WRITE Skriv sluttext
SE18 PUSH IX
LD IX,FIL
LD DE,8:127
CALL FILCONTR Close
POP IX
CALLC SKRIVERR
RES 5,(IX+0) F|rbjud CTRL-XZ
LD (IX+24),0
LD (IX+25),"Z"
LD A,(IX+37)
AND A
JRZ SE19 Ej CTRL-XZ
LD A,32
LD (253:244),A
LD HL,KTXT7
LD BC,KTXT8-KTXT7
CALL WRITE Skriv avbryttext
LD A,"D"
LD (BUFF4),A
INC (IX+24)
SE19 CALL PPACK S{nd EOF
JPC TIMEOUT
LD A,(IX+37)
CP "Z"
JRZ SE20 Skippa batch
LD A,(WILDFLG)
AND A Wildcard?
JPNZ SE6 Ja, n{sta fil
SE20 LD (IX+24),0
LD (IX+25),"B"
CALL PPACK S{nd BRAKE
JPC TIMEOUT
RET Klart!
;H{mta ett tecken fr}n fil
;Carry s{tts om EOF eller ERROR
GETFIL LD A,(IX+27)
AND A
JPNZ GF9 Data i buffert
LD A,(IX+29) Typ av fil
CP 1
JRZ GF1 Textfil
CP 2
JPZ GF7 Bin{rfil
LD A,(FILE)
AND A
JRZ GF1 Textfil
CP 1
JRZ GF7 Bin{rfil
PUSH IX Annars unders|k
LD IX,FIL filen...
LD L,(IX+10)
PUSH HL
LD HL,BUFF7
LD BC,255
LD DE,8:147
CALL FILCONTR L{s rad
POP HL
JRC GF5 Kanske bin{rfil
JR GF2 Annars textfil!
GF1 PUSH IX
LD IX,FIL
LD L,(IX+10)
PUSH HL
LD HL,BUFF7
LD BC,255
LD DE,8:147
CALL FILCONTR L{s rad
POP HL
JRC GF6 End of file
GF2 LD A,L
CP (IX+10)
JRC GF3
LD HL,(ANTBUF)
INC HL
LD (ANTBUF),HL
GF3 POP IX
EX DE,HL
LD A,(IX+20)
AND A
JRZ GF4 Hoppa om DUMP
LD (HL),10 Avsluta med LF
INC HL om Kermit
GF4 LD DE,BUFF7
SBC HL,DE
EX DE,HL
LD (IX+27),E L{ngd p} rad
LD (IX+29),1 Textfil
LD (IX+32),L
LD (IX+33),H
JR GF9
GF5 CP 186
JRZ GF8 Ogiltigt tecken
AND A
JRZ GF8 EOF dvs ABS-fil
GF6 POP IX
SCF
RET EOF eller ERROR
GF7 PUSH IX
LD IX,FIL
LD DE,8:153
CALL FILCONTR L{s buffert
LD HL,(ANTBUF)
INC HL
LD (ANTBUF),HL
JRNC GF8 Inget fel
POP IX
CP 38
SCF
RETNZ
LD A,0
RET Slut p} fil
GF8 LD L,(IX+8) Adress till
LD H,(IX+9) buffert
POP IX
LD (IX+27),253 L{ngd p} rad
LD (IX+29),2 Bin{rfil
LD (IX+32),L
LD (IX+33),H
GF9 LD L,(IX+32)
LD H,(IX+33)
LD A,(HL)
INC HL
LD (IX+32),L
LD (IX+33),H
DEC (IX+27)
LD HL,(ANTBYTES)
INC HL
LD (ANTBYTES),HL
AND A
RET
;S{nd packet, om negativt svar sker
;oms{ndning. Om f|r m}nga f|rs|k eller
;timeout sker retur med carry.
PPACK LD A,(INBUFF)
LD (INPOS),A T|m inputbuffer
LD A,(RETRY)
INC A
LD (IX+20),A Max ant f|rs|k
LD A,(IX+24)
LD (IX+30),A L{ngd data
LD A,(IX+25)
LD (IX+31),A Typ att s{nda
PPK1 BIT 3,(IX+0)
RETNZ ESCAPE
DEC (IX+20)
SCF
RETZ F|r m}nga f|rs|k
LD A,(IX+12)
LD (IX+21),A S{tt tid kvar
LD A,(IX+23)
LD (IX+22),A Packetnr
LD A,(IX+30)
LD (IX+24),A L{ngd data
LD A,(IX+31)
LD (IX+25),A Typ att s{nda
CALL SPACK S{nd packet
JRC PPK1 Fel, f|rs|k igen
CALL RPACK Ta emot svar
JRC PPK5 Fel, r{kna fel
LD A,(IX+25)
CP "Y"
JRZ PPK2
CP "N"
JRZ PPK4
CP "E"
JPZ RERROR
JP FELPACK
PPK2 LD A,(IX+22)
CP (IX+23)
JRNZ PPK5 Fel packetnr
PPK3 LD A,(IX+23)
INC A
AND 63 Clear carry!
LD (IX+23),A
LD HL,(PACKNR)
INC HL
LD (PACKNR),HL
RET
PPK4 LD A,(IX+22)
DEC A NAK n+1 tolkas
CP (IX+23) som ACK n!
JRZ PPK3
INC A
CP (IX+23)
JPNZ FELPACK Fel packetnr
PPK5 LD A,(IX+31) Typ att s{nda
CP "F"
JRZ PPK6
CP "D"
JRZ PPK6
CP "Z"
JPNZ PPK1
PPK6 LD HL,(NAKNR)
INC HL
LD (NAKNR),HL
CALL SKRIVFIL
JP PPK1 Oms{ndning
SKRIVFIL LD A,(DEBUG)
DEC A
RETZ
LD A,13
LD (253:244),A
LD HL,(NAKNR)
LD A,4
LD DE,SPACE
CALL SKRTAL
LD HL,(PACKNR)
LD A,4
LD DE,SPACE
CALL SKRTAL
LD HL,(ANTBYTES)
LD A,6
LD DE,SPACE
CALL SKRTAL
LD HL,(ANTBUF)
LD A,4
LD DE,SPACE
CALL SKRTAL
RET
SKRIVERR AND 127
LD L,A
LD H,0
LD A,(DEBUG)
DEC A
RETZ
PUSH HL
CALL SKRIVFIL
LD A,32
LD (253:244),A
LD HL,KTXT8
LD BC,KTXT9-KTXT8
CALL 0:11 Skriv ERR
POP HL
CALL SKRIVTAL Skriv felkod
RET
WRITE LD A,(DEBUG)
DEC A
CALLNZ 0:11
RET
CRLF LD A,(DEBUG)
DEC A
CALLNZ 7:66
RET
;filename bad pkt bytes blk status
;L]NGRAD .BAC 0 12 1234 12 (15)
;L]NGRAD .BAC 0 13 1235 12 ERR 48
;L]NGRAD .TXT 0 5 234 4 OK
<<< kerm7.asm >>>
; KERM7.ASM
; Anders Franz`n <5258>
; Stockholm 1987-09-24
; Uppdaterad 1990-01-07 J. Westman <5074>
; Skicka SP i respons paketet om ingen REPT
; Uppdaterad 1990-01-08 J. Westman <5074>
; Ingen REPT om ej valt, i s{ndning
;Spara mottagna parametrar
RPARM CALL RDEFAULT
LD A,(IX+24) L{ngd packet
AND A
RETZ L{ngd = 0
LD HL,BUFF3 Mottaget data
LD A,(HL)
INC HL
CP 33
JRC RPM1
SUB 32
LD (IX+11),A MAXL
RPM1 LD A,(IX+24)
CP 2
RETC L{ngd < 2
LD A,(HL)
INC HL
CP 33
JRC RPM2
SUB 32
LD (IX+12),A TIME
RPM2 LD A,(IX+24)
CP 3
RETC L{ngd < 3
LD A,(HL)
INC HL
CP 33
JRC RPM3
SUB 32
LD (IX+13),A NPAD
RPM3 LD A,(IX+24)
CP 4
RETC L{ngd < 4
LD A,(HL)
INC HL
CP 33
JRC RPM4
XOR 64
LD (IX+14),A PADC
RPM4 LD A,(IX+24)
CP 5
RETC L{ngd < 5
LD A,(HL)
INC HL
CP 33
JRC RPM5
SUB 32
LD (IX+15),A EOL
RPM5 LD A,(IX+24)
CP 6
RETC L{ngd < 6
LD A,(HL)
INC HL
CP 33
JRC RPM6
LD (IX+16),A QCTL
RPM6 LD A,(IX+24)
CP 7
RETC L{ngd < 7
LD A,(HL)
INC HL
CP 33
JRC RPM8
CP "Y"
JRZ RPM7
CP 127
JRNC RPM8
CP 96
JRNC RPM7
CP 63
JRNC RPM8
RPM7 LD (IX+17),A QBIN
RPM8 LD A,(IX+24)
CP 8
RETC L{ngd < 8
LD A,(HL)
INC HL
SUB 48
CP 1
JRC RPM9
CP 3
JRNC RPM9
LD (IX+18),A CHKT
RPM9 LD A,(IX+24)
CP 9
RETC L{ngd < 9
LD A,(HL)
CP 33
RETC
CP 127
RETNC
CP 96
JRNC RPM10
CP 63
RETNC
RPM10 LD (IX+19),A REPT
RET
;Defaultparametrar "andra sidan"
RDEFAULT LD (IX+11),80 Default MAXL
LD (IX+12),5 TIME
LD (IX+13),0 NPAD
LD (IX+14),0 PADC
LD (IX+15),13 EOL
LD (IX+16),"#" QCTL
LD (IX+17),0 QBIN
LD (IX+18),1 CHKT
LD (IX+19),0 REPT
RET
;S{tt egna parametrar
SPARM LD HL,BUFF4
LD A,(IX+1) Maxl{ngd packet
ADD 32
LD (HL),A
INC HL
LD A,(IX+2) Timeout
ADD 32
LD (HL),A
INC HL
LD A,(IX+3) Antal PAD-tkn
ADD 32
LD (HL),A
INC HL
LD A,(IX+4) PAD-tkn
XOR 64
LD (HL),A
INC HL
LD A,(IX+5) EOL-tkn
ADD 32
LD (HL),A
INC HL
LD A,(IX+6) QCTL-tkn
LD (HL),A
INC HL
LD A,(IX+7) QBIN-tkn
LD (HL),A
INC HL
LD A,(IX+8) Checksummetyp
ADD 48
LD (HL),A
INC HL
LD A,(IX+9) REPEAT-tkn
OR A
JR NZ,SPA1
LD A,32
SPA1 LD (HL),A
RET
;Ta emot en packet. Om checksumman {r
;fel s{nds negativt svar. Carry vid
;retur betyder att nytt f|rs|k ska
;g|ras.
GPACK CALL RPACK Ta emot packet
RETNC Inget fel
BIT 3,(IX+0)
RETNZ ESCAPE
LD A,(IX+20)
DEC A
SCF
RETZ Sista f|rs|ket
LD A,(IX+23)
LD (IX+22),A Packetnr
LD (IX+24),0 L{ngd data
LD (IX+25),"N"
CALL SPACK Negativt svar
SCF
RET
;Ta emot en packet
RPACK CALL RCHAR
RETC Time out!
LD BC,(MARKER)
CP C
JRNZ RPACK V{nta p} SOH...
LD HL,0 Checksumma
CALL RCHAR
RETC Time out!
SUB 34
SUB (IX+8)
LD (IX+24),A L{ngd p} data
CALL RCHAR
RETC Time out!
SUB 32
LD (IX+22),A Packetnr
CALL RCHAR
RETC Time out
LD (IX+25),A Typ av packet
CP "S"
JRNZ RPK1
LD A,(IX+8)
CP 1
JRZ RPK1
INC (IX+24)
RPK1 LD A,(DEBUG)
DEC A
LD A,"R"
CALLZ DEBRUB
LD A,(IX+24) L{ngd data
AND A
JRZ RPK3 Inget data
LD B,A
LD DE,BUFF3
RPK2 PUSH DE
PUSH BC
CALL RCHARD H{mta datatkn
POP BC
POP DE
RETC Time out!
LD (DE),A Spara tecken
INC DE
DJNZ RPK2
RPK3 PUSH HL
CALL RCHAR H{mta checksumma
POP HL
RETC Time out!
LD E,A
LD A,(IX+25)
CP "S"
JRZ RPK4 Packettyp S
LD A,(IX+8)
CP 1
JRZ RPK4 CH-typ 1
PUSH HL Annars CH-typ 2
PUSH DE
CALL RCHAR
POP DE
POP HL
RETC Time out!
LD D,A
LD A,L
AND 63
ADD 32
CP D
SCF
RETNZ Fel checksumma
LD A,H
RLC L
RLA
RLC L
RLA A = HL/64
AND 63
ADD 32
CP E
JRZ RPK5
SCF
RET Fel checksumma
RPK4 LD A,L
AND 192
RLCA
RLCA A = A/64
AND 3 A = A/64
ADD L
AND 63
ADD 32
CP E
SCF
RETNZ Fel checksumma
RPK5 CALL RCHAR EOL
RET
RCHARD CALL RCHAR
RETC
LD A,(DEBUG)
DEC A
LD A,E
RETNZ
LD (SLASK),A
CALL DEBCHAR
LD A,(SLASK)
AND A
RET
;V{nta p} tecken fr}n V24
RCHAR LD B,50
LD A,(253:240)
LD C,A
RCH1 LD A,(253:240)
CP C
JRZ RCH2 Klocka ej r|rd
LD C,A
DJNZ RCH2 Klocka p} 50Hz
LD B,50
XOR A
DEC (IX+21) Minska tid kvar
SCF
RETZ Maxtid
RCH2 INP 58
AND 2
SCF
RETNZ B{rv}g saknas!
CALL EVBRYT Kolla CTRL-X/Z
BIT 3,(IX+0)
SCF
RETNZ ESCAPE nedtryckt
PUSH HL
CALL MOTTAG Mottaget tkn?
POP HL
JRNC RCH1 Nej, v{nta...
LD E,A
LD D,0
LD A,(PARITET)
AND A
JRZ RCH3 Paritet NONE
RES 7,E Sl{ck paritet
RCH3 ADD HL,DE \ka checksumma
LD A,(DEBUG)
CP 2
LD A,E
CALLZ DITTO
AND A Clear carry
RET
;S{nd iv{g en packet
SPACK LD A,(PAUSE)
AND A
JRZ SPK4 Ingen paus
LD HL,253:240
LD C,A Antal tiondelar
SPK1 LD B,5
SPK2 LD A,(HL)
SPK3 CP (HL)
JRZ SPK3 V{nta 1/50 sek
DJNZ SPK2 V{nta 1/10 sek
DEC C
JRNZ SPK1 Fler tiondelar
SPK4 LD A,(DEBUG)
DEC A
LD A,"S"
CALLZ DEBRUB
LD A,(IX+13) Antal PAD-tkn
AND A
JRZ SPK6 Inga PAD-tkn
LD B,A
SPK5 LD A,(IX+14) PAD-tkn
CALL SCHAR
RETC B{rv}g saknas
DJNZ SPK5
SPK6 LD A,(MARKER)
CALL SCHAR SOH
RETC
LD A,(IX+24)
ADD (IX+8)
ADD 34
LD L,A
LD H,0
CALL SCHAR L{ngd data
RETC
LD A,(IX+22) Nummer p} packet
ADD 32
LD E,A
LD D,0
ADD HL,DE
CALL SCHAR
RETC
LD A,(IX+25) Typ av packet
LD E,A
LD D,0
ADD HL,DE
CALL SCHAR
RETC
LD A,(IX+24) L{ngd data
AND A
JRZ SPK8 Inget data
LD B,A
LD DE,BUFF4 Pekar p} data
SPK7 LD A,(DE)
INC DE
PUSH DE
LD E,A
LD D,0
ADD HL,DE R{kna checksumma
POP DE
CALL SCHARD S{nd datatkn
RETC
DJNZ SPK7
SPK8 LD A,(IX+25)
CP "S"
JRZ SPK9 Packettyp S
LD A,(IX+8)
CP 1
JRZ SPK9 CH-typ 1
LD A,H
LD H,L
RLC L
RLA
RLC L
RLA A = HL/64
AND 63
ADD 32
CALL SCHAR
RETC
LD A,H
AND 63
ADD 32
CALL SCHAR
JRNC SPK10
RET
SPK9 LD A,L
AND 192
RLCA
RLCA
AND 3 A = A/64
ADD L
AND 63
ADD 32
CALL SCHAR
RETC
SPK10 LD A,(IX+15) EOL-tkn
CALL SCHAR
RET
DEBRUB LD (DEB2),A
PUSH HL
LD HL,DEB1
LD BC,DEB3-DEB1
CALL 0:11 Debug-rubrik
LD A,12
LD (253:244),A
LD A,(IX+25) Typ av packet
LD (SLASK),A
LD HL,SLASK
LD BC,1
CALL 0:11
LD A,19
LD (253:244),A
LD L,(IX+22) Nummer p} packet
LD H,0
CALL SKRIVTAL
LD A,30
LD (253:244),A
LD L,(IX+24) L{ngd data
LD H,0
CALL SKRIVTAL
CALL 7:66
POP HL
RET
DEB1 DB 13,10
DEB2 DM "Spack type= "
DM "seq= length="
DEB3
DEBCHAR PUSH HL
PUSH DE
PUSH BC
LD HL,SLASK
LD BC,1
CALL 0:11
POP BC
POP DE
POP HL
RET
SCHARD LD (SLASK),A
LD A,(DEBUG)
DEC A
CALLZ DEBCHAR
LD A,(SLASK)
CALL SCHAR
RET
SCHAR LD C,A
LD A,(DEBUG)
CP 2
LD A,C
CALLZ DITTO
CALL S[ND
RETC
CALL EVBRYT
AND A
RET
DITTO PUSH HL
LD HL,(DITTO1)
LD (HL),A
INC HL
LD (DITTO1),HL
POP HL
RET
DITTO1 DW 135:0
EVBRYT PUSH HL
PUSH BC
CALL TAN Polla tangenter
CALL CHECKTAN H{mta ev tangent
POP BC
POP HL
RETNC Ingen tangent
BIT 5,(IX+0)
RETZ Ignorera!
CP 24
JRZ EVB1 CTRL-X
CP 26
RETNZ Ej CTRL-Z
EVB1 ADD 64
LD (IX+37),A
LD (EVB3),A
LD A,32
LD (253:244),A
PUSH HL
PUSH DE
PUSH BC
LD HL,EVB2
LD BC,EVB4-EVB2
CALL WRITE
POP BC
POP DE
POP HL
RET
EVB2 DM "CTRL-"
EVB3 DM "x"
EVB4
;Packa upp data
UNPACK LD HL,BUFF3 Pekar p} data
LD A,(IX+24)
INC A
LD (IX+28),A
CALL UPK1
RETC
CALL TOFIL
RET
UPK1 LD DE,BUFF5
LD (IX+27),0
UPK2 AND A Clear carry
DEC (IX+28)
RETZ Inget mer data
LD A,(HL)
INC HL
LD BC,1:0
CP (IX+19)
JRNZ UPK3 Ej REPT
AND A
JRZ UPK3
DEC (IX+28)
RETZ
DEC (IX+28)
RETZ
LD A,(HL)
SUB 32
LD B,A
INC HL
LD A,(HL)
INC HL
UPK3 CP (IX+17)
JRNZ UPK4 Ej QBIN
AND A
JRZ UPK4
DEC (IX+28)
RETZ
LD C,128
LD A,(HL)
INC HL
UPK4 CP (IX+16)
JRNZ UPK6 Ej QCTL
AND A
JRZ UPK6
DEC (IX+28)
RETZ
LD A,(HL)
INC HL
BIT 7,A
JRZ UPK5
LD C,128
UPK5 AND 127
CP (IX+16)
JRZ UPK6 QCTL
CP (IX+17)
JRZ UPK6 QBIN
CP (IX+19)
JRZ UPK6 REPT
XOR 64
UPK6 OR C
UPK7 LD (DE),A
INC DE
INC (IX+27)
DJNZ UPK7
JPP UPK2
CALL TOFIL
JRNC UPK1
RET
TOFIL LD A,(IX+27)
AND A
RETZ
PUSH HL
LD HL,BUFF5
LD C,A
LD B,0
PUSH BC
CALL PUTFIL
POP BC
LD HL,(ANTBYTES)
ADD HL,BC
LD (ANTBYTES),HL
POP HL
RET
;Packa data att s{nda
PACK LD HL,BUFF4
LD (IX+24),0 L{ngd data
LD C,(IX+9)
PK1 LD A,(IX+11)
SUB 8
SUB (IX+24)
CCF
RETNC Packet full
PUSH HL
PUSH BC
CALL GETFIL H{mta ett tecken
POP BC
POP HL
RETC EOF eller ERROR
LD E,A Spara tecken
LD A,(IX+9) Kolla om ej REPT
AND A
JR Z,PK11
CP E
JRZ PK4 REPT-tkn
LD A,E Tillbaks med tecknet i A
CP C
JRZ PK2 Samma som f|rut!
PK11 LD C,A Kom ih}g tecknet
LD B,1 Repeatr{knare
LD (IX+34),L
LD (IX+35),H Spara pekare
LD A,(IX+24)
LD (IX+36),A Spara l{ngd
JR PK4
PK2 INC B \ka repeatantal
LD A,B
CP 4
JRC PK4 Mindre {n 4 lika
CP 94
JRC PK3 Max 94 repeat!
LD C,(IX+9)
PK3 LD L,(IX+34)
LD H,(IX+35) ]terst{ll pekare
LD A,(IX+36)
LD (IX+24),A ]terst{ll l{ngd
LD A,(IX+9)
LD (HL),A REPT-tecken
INC HL
INC (IX+24)
LD A,B Antal repeat
ADD 32
LD (HL),A
INC HL
INC (IX+24)
PK4 BIT 7,E
JRZ PK5 Ej }ttabitsdata
LD A,(IX+7)
AND A
JRZ PK5 Ej QBIN
LD (HL),A
INC HL
INC (IX+24)
RES 7,E
PK5 LD A,E
CP 32
JRC PK6 Tecken < 32
CP 127
JRZ PK6
AND 127
CP (IX+6)
JRZ PK6 QCTL
CP (IX+9)
JRZ PK6 REPT
CP (IX+7)
JRNZ PK8 Ej QBIN
AND A
JRZ PK8 QBIN anv{nds ej
PK6 LD A,(IX+6)
LD (HL),A
INC HL
INC (IX+24)
LD A,E
CP 32
JRC PK7
CP 127
JRNZ PK8
PK7 XOR 64
LD E,A
PK8 LD (HL),E
INC HL
INC (IX+24)
JP PK1
<<< kermasm.inf >>>
Information om k{llkoden till KERM
Anders Franz`n Stockholm 1988-01-01
K{llkoden till KERM best}r av totalt
}tta filer varav en huvudfil. Dessa
{r assemblerade med ASS.BAC (det kr{vs
32K f|r assembleringen). Dessa filer
finns:
KERM.ASM Huvudfil, g|r include p} |vriga
KERM1.ASM-KERM7.ASM
<<< kermdump.bas >>>
100 REM +++++++++++++++++++++++++++++++
101 REM ! Program .... KERMDUMP
102 REM ! Utg}va 1.0 87-11-08
103 REM ! av Anders Franz`n <5258>
104 REM +++++++++++++++++++++++++++++++
105 REM
106 REM F%=0% : PREPARE 'trace.txt' ASFILE F%
107 A%=135%*256% : B%=A%+1%
108 I%=PEEK(A%) : A%=A%+1%
109 IF I%<>1% GOTO 119
110 FOR K%=B%-1% TO A%-2%
111 L%=PEEK(K%) AND 127%
112 IF L%>32% AND L%<128% ; #F%,' 'CHR$(L%); ELSE ; #F%,' ';
113 N%=N%+1% : IF N%=15% LET N%=0% : ; #F%
114 NEXT K% : N%=0%
115 ; #F% : GET T$ : ; #F%
116 IF T$='S' CLOSE F% : END
117 ; #F%,'typ='CHR$(PEEK(A%+2%))' seq='RIGHT$(NUM$(PEEK(A%+1%)-32%),2%)' len='RIGHT$(NUM$(PEEK(A%)-32%),2%)
118 B%=A%
119 ; #F%,SPACE$(4%-LEN(NUM$(I% AND 127%)))I% AND 127%;
120 N%=N%+1% : IF N%=15% LET N%=0% : ; #F%
121 GOTO 108
<<< kermdump.inf >>>
KERMDUMP.INF
Anders Franz`n <5258> Sthlm 1987-11-08
KERMDUMP {r ett program som dumpar mottaget
och s{nt data med KERM. S{tt parametern
DEBUG DUMP i KERM och |verf|r fil med Kermit.
Tryck RESET p} datorn och k|r sedan KERMDUMP.
Man kan dumpa datat till fil om s} |nskas
genom att {ndra filnummer i b|rjan av
programmet till annat v{rde {n noll.
Programmet ins{nt f|r att kunna h{rleda
fel.
<<< kermquit.bas >>>
100 REM +++++++++++++++++++++++++++++++
110 REM ! Program .... KERMQUIT
120 REM ! Utg}va 1.0 87-09-20
130 REM ! av Anders Franz`n <5258>
140 REM +++++++++++++++++++++++++++++++
150 REM
160 REM Medf|r }terhopp till KERM.
170 REM
180 ; 'Tryck CTRL-C f|r BASIC,'
190 ; 'annars }ter till KERM.'
200 GET A$
210 Z%=CALL(PEEK(65063%)+256%*PEEK(65064%)+16%)