Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


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

Registered: May 2005
Posts: 31
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: 31
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
mkarcz
theK/ATL
AlexC
eater
Guests online: 263
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Oxyron  (9.3)
5 Censor Design  (9.3)
Top Graphicians
1 Mirage  (9.7)
2 Archmage  (9.7)
3 Sulevi  (9.6)
4 Pal  (9.6)
5 Hein  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.045 sec.