Commodore Homestead

  • Home
  • Home

News

  • Commodore News
  • Add News Item
  • Older News

Stuff

  • Central Market
  • Homestead Plus
  • Commodore CDs
  • TIFCU

Mailing Lists

  • Homestead
  • COPS

Articles

  • Anchors Away
  • C64 Survival Guide
  • CBM Fidonet Echos
  • Instant Messaging
  • Internet How-To
  • Novaterm Manual
  • Telecommunications

Software

  • Browser
  • CBM FTP Site
  • QTT64
  • QWKRR128
  • Type-in Term Prg

Fun Stuff

  • Favourite BBS's
  • Favourite Software

User login

  • Create new account
  • Request new password

VCSWEB

  • VCSWEB Hosting
  • About Us

Other News & Link Sites

  • C= 64 SK
  • C= Webring
  • COCOS

Type-In Term Program

Submitted by Gaelyne on Sun, 06/29/2008 - 15:11.


A Simple X-Modem Term Program

The following is a type in term program. I included the original message (edited slightly) from the person who posted it to me, mainly for reasons of gratitude - after all, this it the person who went to the trouble to type this into a message for me, and for the person who originally needed the program.

Hint: If using Lynx, press "p" and either mail
this to yourself or save it as a file on your local system.



Date : 07/25/95	     Time : 01:10    Status : Public - Unread
From : Robert Saltiel		     Subj   : 'simple' Term
To   : Gaelyne Moranec		     Area   : CBM

Hi Gaelyne,

    Ok, you should get the whole thing this time..  This ought to be
what you're looking for!  This might be worthwhile for folks to have
in their libraries or on the online services as was mentioned you(?) or
someone (I forget) might u/l it to one as well.

    Note, I don't know that an ASCII to Basic converter will convert
all properly unless you first remove the bracketed-style keypresses
([blue] [shft-home] etc), then put-in the actual keypresses after the
conversion is done (or at least since they are in print statements, just
bear in mind that they are there in that format, and will need to be
entered properly once the thing is in Basic).  But of course for the
original type-in purpose, this is just what the doctor ordered :-)



10 rem *****************
15 rem * xmodem 64 3.6 *
20 rem *  karl schmitt *
25 rem *****************
30 poke53281,3:poke53280,6:printchr$(151)chr$(14):open5,2,3,chr$
   (6)+chr$(.)
35 open15,8,15:u=212:d=256:w=1:e$=chr$(147):c=250:s=64:p$=chr$
   (19):o=8
40 bl$="[home][5-dn]":er$="[home][8-dn][14 spcs][up]"+chr$(13)
45 ack=6:nak=21:eot=4:can=24:z=131:v=132:f=255:m=288:p=12
50 c$=chr$(.):r$=chr$(18):j$=chr$(13):o$=chr$(18)+chr$(32)+
   chr$(157)+chr$(146)
55 printe$j$"[blue]XMODEM 64"j$
60 print"DOWNLOAD and UPLOAD";:g$=chr$(133):q$=chr$(34):i$=chr$(20)
65 print" TERMINAL PGM"j$j$"DISK VERSION 3.6"j$
70 print"by Karl Schmitt"j$j$
75 print"Hit  For Main Menu."
80 printj$"Use XMODEM protocol for all transfers."j$j$:l$=chr$
   (32)+chr$(157)
85 print"1. Bulletin Board"j$j$"2. 64 to 64"j$j$j$j$
90 print"Type 1 or 2 to begin.":gosub505:ifa$="1"then105
95 ifa$="2"thenb=w:goto105
100 goto90
105 dimf%(f),t%(f),u%(p,v)
110 printe$"Please stand by for 9 seconds."j$j$"Creating Translat
    ion tables."
115 forj=32to64:t%(j)=j:next:t%(13)=13:t%(20)=8:forj=65to90:t%(j)
    =j+32:next
120 forj=91to95:t%(j)=j:next:forj=193to218:t%(j)=j-128:next:t%
    (146)=p
125 t%(133)=p:t%(147)=19:t%(137)=3:t%(134)=17:t%(138)=19:forj=.to
    f:k=t%(j)
130 ifk<>.thenf%(k)=j:f%(k+128)=j
135 next
140 rem------------terminal------------
145 printchr$(14)
150 printe$" Terminal Mode"j$:ifa$=chr$(can)thenprint"Transfer CA
    NCELLED!"
155 iffa=wthenprint"When host is ready to receive, hit f1"j$"for
    main menu and";
160 iffa=wthenfa=.:print" start the upload."j$
165 get#5,a$:ifa$=""then180
170 printl$chr$(f%(asc(a$)));:ifa$=q$thenpokeu,.
175 goto165
180 printo$;:geta$:ifa$=""then165
185 ifb=wthen:x=asc(a$):ifx=13orx=145orx=157orx=29orx=17orx=19
    thenprintl$;
190 ifb=wthenprinta$;:ifa$=q$thenpokeu,.
195 ifa$=g$thenprintl$j$:goto320
200 print#5,chr$(t%(asc(a$)));:goto165
205 rem-----------download-------------
210 printe$"is host computer waiting to send? y/n":gosub505:ifa$=
    "n"then145
215 printj$:ifa$<>"y"then210
220 g=3:k$="w":gosub345:print:bl=.:n=.
225 printj$"downloading  "f$er$"[up]status"
230 forh=wtop
235 ch=.:forx=wtov:get#5,a$:e=st:ifa$=""thenife=othenl=l+w
240 ife=.thenl=.:goto255
245 ifl=mthenl=.:gosub525:printbl$"waiting":goto230
250 goto235
255 ifx=wthenifa$=chr$(eot)thengosub520:goto310
260 u%(h,x)=asc(a$+c$):ch=ch+u%(h,x):next:ch=ch-u%(h,v)
265 if(u%(h,w)+u%(h,2)+u%(h,3)and f)<>.thengosub525:printer$"soh
    error":goto235
270 ifu%(h,v)<>(chandf)thengosub525:printer$"checksum error":
    goto235
275 bl=bl+w:printbl$"block"bl
280 ifu%(h,2)<>blthenbl=bl-1:gosub520:printer$"duplicate bl":
    goto235
285 ifh<>pthengosub520
290 next:h=h-w
295 ifn=wthenifh=.then310
300 fory=1toh:forx=eottoz:print#3,chr$(u%(y,x));:next:next
305 gosub520:goto230
310 fora=wtoh:forr=eottoz:print#3,chr$(u%(a,r));:next:next:close3
    :goto550
315 rem-----------menu-----------------
320 printchr$(142)e$
325 printj$"1. download"j$"2. upload"j$"3. terminal"j$"4. directo
    ry"
330 print"5. start upload"j$"6. end":gosub505
335 onval(a$)goto210,375,145,475,585,515
340 goto325
345 printe$:input"filename e[rvs-on]x[rvs-off]it.";f$:iff$="x"
    then320
350 printe$:input"filetype [rvs-on]p[rvs-off]rogram[space]
    [rvs-on]s[rvs-off]equential e[rvs-on]x[rvs-off]it";ft$:ifft$=
    "x"then320
355 ft$=left$(ft$,w)
360 openg,8,g,"0:"+f$+","+ft$+","+k$:input#15,a,b$:printe$;a;b$:
    ifa=.thenreturn
365 closeg:goto325
370 rem-----------upload---------------
375 g=6:k$="r":gosub345:bl=.:fa=w
380 printer$"[up]reading      ":fory=wtop:u%(y,w)=w
385 bl=bl+w:u%(y,2)=bl:u%(y,3)=f-bl:ch=w+u%(y,2)+u%(y,3):printer$
    "block"bl
390 forx=eottoz:get#6,b$:ifst=.then400
395 fl=y:ch=ch+u%(y,x):fora=x+wtoz:u%(y,a)=.:next:u%(y,v)=chandf:
    goto405
400 u%(y,x)=asc(b$+c$):ch=ch+u%(y,x):next:u%(y,v)=chandf:next:
    y=y-w
405 iffa=wthen145
410 get#5,a$:ifa$<>chr$(nak)then410
415 bl=bl-y:y=.
420 printer$"[up]upload status"j$"nak"bl$"[up]uploading"
425 y=y+w:bl=bl+w
430 printbl$"block"bl:forx=wtov:print#5,chr$(u%(y,x));:next
435 fora=.to1200:get#5,a$:ifa$=""thennext:goto430
440 ifa$=chr$(ack)thenify=pthenprinter$"ack":goto380
445 ifa$=chr$(ack)theniffl<>ythenprinter$"ack":goto425
450 ifa$=chr$(ack)theniffl=ythenfl=.:gosub535:gosub540:close6:
    goto550
455 ifa$=chr$(nak)thenprinter$"nak":goto430
460 ifa$=chr$(can)thenclose6:goto550
465 goto435
470 rem---------directory--------------
475 printe$:open1,8,0,"$0":get#1,a$,a$
480 get#1,a$,a$:ifa$=""then500
485 get#1,a$,b$:printasc(a$+c$)+asc(b$+c$)*d;
490 get#1,a$:ifa$=""thenprint:goto480
495 printa$;:goto490
500 close1:goto325
505 geta$:ifa$=""then505
510 return
515 end
520 print#5,chr$(ack);:printer$"ack":q=.:return
525 q=q+w:ifq=11thenclose3:a$=chr$(can):print#5,a$:goto550
530 print#5,chr$(nak);:printer$"nak":return
535 print#5,chr$(eot);:printer$"eot":return
540 get#5,a$:ifa$=""then540
545 return
550 print"[clr/home]hit any key for terminal mode"
555 so=54272
560 pokeso+1,250:pokeso+5,10:pokeso+15,200
565 pokeso+24,15:forcl=1to12:pokeso+4,21:fortm=1to1250:next:
    pokeso+4,20
570 getb$:ifb$=""then560
575 so=54272:forcl=.to24:pokeso+cl,.:next
580 goto145
585 printe$"is host computer ready to recieve? y/n"j$:gosub505:
    ifa$="n"then145
590 ifa$<>"y"then585
595 printe$"have the first 12 (or less) blocks to[3 spaces]upload
    been read yet ?"
600 gosub505:ifa$="n"then145
605 ifa$<>"y"then595
610 printe$"uploading[2 spaces]"f$:goto405



Syndicate content
Commodore Homestead is brought to you by Gaelyne & Rod Gasson of VCSWEB.
RoopleTheme