🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.cbm
Article #2271

Re: 1571 ROM bug fixes

#2271
From: mcewan
Date: Wed, 17 Sep 1986 02:05
28 lines
1904 bytes
> Hi, I am using the C-Power compiler for my Commodore 64 and I need some help.
> I am interested in sending a string to my disk drive without opening a file.
> ie I am trying to create a program which changes disk drive numbers. Easy as
> pie with basic but I cant quite figure it out for C-Power.

It is? The only way I know to do this from basic is by opening the disk command
channel. The procedure is the same in C-Power. E.g., to change device 8 to
device 9:
	open(15,8,15,"");
	fprintf(15,"M-W%c%c%c%c%c",119,0,2,9+32,9+64);

> Also I am interested in utilyzing one of the kernal routines from C. I know 
> that a SYS utility exists but the sys that I am used to uses a lot of parameters
> eg sys XXXXX,"filename":poke XXX,YY:poke XXX,YY:sys XXXXX
> (sorry I dont have the addresses here in front of me) The actual routine
> will save a block of memory to the specified filename if you specify the begin
> and end locations (hence the pokes).

Poking in C is trivial. "poke x,y" can be translated as "*(char *)x = y". You
can #define this as a macro ("#define poke(x,y) *(char *)(x) = y"). If you
prefer, you can declare "char *mem = (char *)0;" and use "mem[x] = y".

		Scott McEwan
		{ihnp4,pur-ee}!uiucdcs!mcewan

"Stop by the castle later. I'll bash your teeth in."
"It's a date."
Technical Details
Message-ID: <36100108@uiucdcs>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!caip!clyde!cbatt!ihnp4!inuxc!pur-ee!uiucdcs!mcewan
References: <3332@caip.RUTGERS.EDU>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!caip!clyde!cbatt!ihnp4!inuxc!pur-ee!uiucdcs!mcewan
From: mcewan@uiucdcs.CS.UIUC.EDU
Newsgroups: net.micro.cbm
Subject: Re: 1571 ROM bug fixes
Message-ID: <36100108@uiucdcs>
Date: Tue, 16-Sep-86 22:05:00 EDT
Article-I.D.: uiucdcs.36100108
Posted: Tue Sep 16 22:05:00 1986
Date-Received: Fri, 19-Sep-86 23:32:02 EDT
References: <3332@caip.RUTGERS.EDU>
Lines: 28
Nf-ID: #R:caip.RUTGERS.EDU:3332:uiucdcs:36100108:000:1292
Nf-From: uiucdcs.CS.UIUC.EDU!mcewan    Sep 16 21:05:00 1986