Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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
Jesder/Hokuto Force
Mikael/P.L/CEN
hqn/Silicon Ltd
Jammer/TooMany
Guests online: 65
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.6)
3 Coma Light 13  (9.6)
4 Memento Mori  (9.6)
5 Comaland 100%  (9.6)
6 The Shores of Reflec..  (9.6)
7 Unboxed  (9.6)
8 Lunatico  (9.6)
9 Remains  (9.5)
10 C=Bit 18  (9.5)
Top onefile Demos
1 Dawnfall V1.1  (9.5)
2 Gumbo Revised  (9.5)
3 Smile to the Sky  (9.5)
4 Daah, Those Acid Pil..  (9.5)
5 Bad Boy  (9.5)
6 Crystal Gazer  (9.5)
7 Cuarentenauta  (9.5)
8 Instinct  (9.5)
9 The Night It Snowed  (9.5)
10 Rewind  (9.4)
Top Groups
1 PriorArt  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.4)
4 Fossil  (9.4)
5 Performers  (9.3)
Top Mega Swappers
1 Aslive  (9.4)
2 Dishy  (9.2)
3 Nightshade  (9.2)
4 Calypso  (9.2)
5 R.C.S.  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2020
Page generated in: 0.064 sec.