RE: Weird problem writing buffer 1 of a 8250 drive

ruud.baltissen_at_apg.nl
Date: 2008-09-04 08:50:16

Hallo allemaal,


Everyone who reacted, many thanks!



Hallo Anders,

> I tried this program in x64 and got it to work after a while:

This is a dump of the VICE-C64 screen and as you can see it works

load"mwr2",8

searching for mwr2
loading
ready.
list

100 open1,8,15
200 for i=0 to 15 : print i;
210 print#1,"m-w" chr$(i) chr$(5) chr$(1
) chr$(i) : next
240 print : print
400 for i=0 to 15
410 print#1,"m-r" chr$(i) chr$(5)
420 get#1,a$ : if a$="" then a$=chr$(0)
430 print asc(a$);" "; : next
ready.
run
 0  1  2  3  4  5  6  7  8  9  10  11  1
2  13  14  15

 0   1   2   3   4   5   6   7   8   9
 10   11   12   13   14   15
ready.


Line 210 is based on a PRG I wrote a year ago to test my harddisk
project under 1541 and, as I found out this morning, is almost the same
as your line 20. 

> 20 PRINT#1,"M-W"CHR$(I)CHR$(5)CHR$(1)CHR$(I):NEXT

As you can see, your line is only lacking some spaces. 


Running the same program on a PET:

*** commodore basic 4.0 ***

 31743 bytes free

ready.
load"mwr2",8

searching for mwr2
loading
ready.
list

 100 open1,8,15
 200 for i=0 to 15 : print i;
 210 print#1,"m-w" chr$(i) chr$(18) chr$(1) chr$(i) : next
 240 print : print 400 for i=0 to 15
 410 print#1,"m-r" chr$(i) chr$(18)
 420 get#1,a$ : if a$="" then a$=chr$(0)
 430 print asc(a$);" "; : next
ready.
run
 0  1


Just the 0 and the 1 again :(


> but I assume you got the number correct,

I'm 100% sure :)

In fact I already found a work-around: I'm using the #1 command to
allocated Buffer 1 and then I write the data to this buffer instead of
poking it directly into the memory.


Hallo Ray,

> There is a colon in your quotes with m-w statement

The above proves that that could be the problem indeed. But a) using the
colon is mentioned in various user manuals for various drives and b) I
remember having used the colon in the past as well, because not using
this command very often, I simply copied lines like these directly from
the book.


Hallo William,

> You also need a semicolon at the end of the PRINT# statement,
> otherwise you will be sending a RETURN character at the end
> of each print statement.

This is mentioned indeed in one of the manuals for the 4040-drive. But
the same manual mentions the method without semicolons as well. Anyway,
I tried it placing one or more semicolons in the line but every time the
same result: just a 0 ad a 1.


--
     ___
    / __|__
   / /  |_/     Groetjes, Ruud
   \ \__|_\
    \___|       URL: Ruud.C64.org

 

De informatie in dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de 
geadresseerde. Wanneer u dit bericht per abuis ontvangt, verzoeken wij u contact op te 
nemen met de afzender per kerende e-mail. Verder verzoeken wij u in dat geval dit 
e-mailbericht te vernietigen en de inhoud ervan aan niemand openbaar te maken. 
Wij aanvaarden geen aansprakelijkheid voor onjuiste, onvolledige dan wel ontijdige 
overbrenging van de inhoud van een verzonden e-mailbericht, noch voor daarbij 
overgebrachte virussen.

APG Algemene Pensioen Groep NV is gevestigd te Heerlen en is ingeschreven in het handelsregister van de Kamer van Koophandel Limburg onder nummer 14099617


The information contained in this e-mail is confidential and may be privileged. 
It may be read, copied and used only by the intended recipient. 
If you have received it in error, please contact the sender immediately by 
return e-mail; please delete in this case the e-mail and do not disclose it's 
contents to any person. We don't accept liability for any errors, omissions, 
delays of receipt or viruses in the contents of this message which arise as a 
result of e-mail transmission.

APG Algemene Pensioen Groep NV is registered in the trade register of the Chamber of Commerce Limburg, The Netherlands, registration number: 14099617



       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.