Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user slaxx ! (Registered 2019-07-23) You are not logged in 
CSDb User Forums


Forums > C64 Coding > using UP9600 in prog8
2019-06-19 11:13
Bones99

Registered: May 2005
Posts: 29
using UP9600 in prog8

Hi
Hopefully someone can help me with this.

Basically, I'm trying to do this:

10 rem sys51200
20 OPEN 5,2,0,CHR$(14)
30 GET#5,A$:IF A$<>""THEN PRINT A$;
40 GETA$:IF A$<>""THEN PRINT#5,A$;
45 poke53280,a
50 GOTO 30

in prog8 (https://prog8.readthedocs.io/en/latest/index.html)

I think its going to be something like this :

sub Setup() {
; -- init driver
c64scr.print("initializing driver.\n")
%asm {{ jsr 51200}}
c64scr.print("driver initialized.\n")
c64.SETLFS(5,2,0)
c64.SETNAM(???)
c64.OPEN()
}

but I realize that I dont fully understand what :

20 OPEN 5,2,0,CHR$(14)

is doing, in particular, the chr$(14) part.

Thanks for your time.
2019-06-19 12:23
Bones99

Registered: May 2005
Posts: 29
ok, I think I get it..

sub Setup() {
; -- init driver
c64scr.print("initializing driver.\n")
%asm {{ jsr 51200}}
c64scr.print("driver initialized.\n")
c64.SETLFS(5,2,0)
c64.SETNAM(2,"14")
c64.OPEN()
}

setnam expects the length of a string for the baud rate settings and then the acutal string is the baud,data bit,stop bits all or'ed togeather..?

The example above seems to connect to my python test server unsing VICE. I'll try it on my real c64 once I figure out how to read and write from/to the device I opened there.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
hedning/G★P
Alakran_64
stephan-a
Twilight/ExCeSs
Dymo/G★P
moh/Fairlight
TheRyk/MYD
iceout/Avatar/HF
MWR/Visdom
YPS
Mythus/Delysid
Strepto/Astral
Guests online: 43
Top Demos
1 Unboxed  (9.7)
2 Uncensored  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 The Shores of Reflec..  (9.6)
7 Lunatico  (9.6)
8 Wonderland XII  (9.5)
9 C=Bit 18  (9.5)
10 X Marks the Spot  (9.5)
Top onefile Demos
1 Smile to the Sky  (9.5)
2 Dawnfall V1.1  (9.5)
3 Crystal Gazer  (9.5)
4 Daah, Those Acid Pil..  (9.5)
5 Rewind  (9.5)
6 Instinct  (9.5)
7 Pandemoniac Part 5 o..  (9.5)
8 Innervasion  (9.4)
9 Bad Boy  (9.4)
10 Arok 20 Invitation  (9.4)
Top Groups
1 Fossil  (9.8)
2 PriorArt  (9.7)
3 Performers  (9.6)
4 Oxyron  (9.4)
5 Booze Design  (9.3)
Top Graphicians
1 Mirage  (9.7)
2 Archmage  (9.7)
3 DocJM  (9.7)
4 Veto  (9.7)
5 Electric  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2019
Page generated in: 0.055 sec.