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: 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
Erhan/Nostalgia
Menace/Spaceballs
Guests online: 94
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.032 sec.