OK, the "removing comments" issue, I found, is caused by my text editor putting a strange control character at the end of any file it edits. I was lucky to find that one. Some things should go better now.
I get a "multiple include guards may be useful for:" message when I change the name of "vdriveinit" to something shorter, like "VINIT". How do I do anything about that? Thanks for any help.
VDRIVE and BasicChip
Re: VDRIVE and BasicChip
You must be removing more than just a comment, maybe the #include which is not a comment.
The "no newline" error comes out of the C pre-processor, and means just that. It is a warning that the last line of a file has more than a carraige return in it. To cure it, go to the end of the file in your test editor, type ENTER and save it.
As for debugging, check connections again. Do you have another USB-serial or TTL-Serial device? With that you can eavesdrop on the serial characters going between the BASICchip and the Vdrive.
The "no newline" error comes out of the C pre-processor, and means just that. It is a warning that the last line of a file has more than a carraige return in it. To cure it, go to the end of the file in your test editor, type ENTER and save it.
As for debugging, check connections again. Do you have another USB-serial or TTL-Serial device? With that you can eavesdrop on the serial characters going between the BASICchip and the Vdrive.
Re: VDRIVE and BasicChip
Again that is just a warning from the C pre-processor
In many C header files (included files) you will see
You can ignore the warning, or most of these files people just #define something related to the name of the file, so that it can be safely included by other files also included in main.bas without casuing duplicate statements.
In many C header files (included files) you will see
Code: Select all
#ifndef THIS_FILE_HAS_BEEN_INCLUDED_ALREADY
#define THIS_FILE_HAS_BEEN_INCLUDED_ALREADY
... the rest of the file ...
#endif
Re: VDRIVE and BasicChip
PS what text editor are you using?OK, the "removing comments" issue, I found, is caused by my text editor putting a strange control character at the end of any file it edits.
I would not recommend that one. We now install a version of NotePad++ with the other Coridium files
Re: VDRIVE and BasicChip
Thanks for all the comments and advice.
I'm using an old text editor (from the mid '80s) that I really like, but I worked-around the editor troubles now. I wasn't removing good code lines - it's that any edit in the included file put that control chr at the end, causing the compiler to stop after the include file.
I still wonder about that "multiple include guards may be useful for:" error message, but I don't see it anymore.
I have the Vdrive fully working now at 9600 baud.
I checked the command strings being sent to the vdrive. Using code pieces from the supplied "Vdrive.bas" for read and write, I saw the vdrive and/or BasicChip lock-up.
------The following is only an attempt to explain the initial troubles and confusion:--------
Here is an example of strange operation: in VdriveFileWriteString, the statements:
vdriveString$ = "WRF " + str(len(outString$)) + CR
SEROUT (vdriveRXD, vdriveBAUD, 1, len(vdriveString$), vdriveString$)
were producing the string:
WRF 19
when the outString$ was just ABCDE plus a carriage return. This locks-up the vdrive in LED-blinking mode.
I don't know why - but after a while "why ask why?", just try something else.
So when I used the statements:
V=len(outString$)
XOUT$="WRF "+STR(V)
vdriveString$=XOUT$+CR
SEROUT (vdriveRXD, vdriveBAUD, 1, len(vdriveString$), vdriveString$)
I saw it produce the string:
WRF 6
which is correct, and the vdrive works without trouble.
So, rather than trying to convert functioning old ArmMite code for the BasicChip, I wrote stuff from scratch, checking things along the way.
I like the BasicChip.
I'm using an old text editor (from the mid '80s) that I really like, but I worked-around the editor troubles now. I wasn't removing good code lines - it's that any edit in the included file put that control chr at the end, causing the compiler to stop after the include file.
I still wonder about that "multiple include guards may be useful for:" error message, but I don't see it anymore.
I have the Vdrive fully working now at 9600 baud.
I checked the command strings being sent to the vdrive. Using code pieces from the supplied "Vdrive.bas" for read and write, I saw the vdrive and/or BasicChip lock-up.
------The following is only an attempt to explain the initial troubles and confusion:--------
Here is an example of strange operation: in VdriveFileWriteString, the statements:
vdriveString$ = "WRF " + str(len(outString$)) + CR
SEROUT (vdriveRXD, vdriveBAUD, 1, len(vdriveString$), vdriveString$)
were producing the string:
WRF 19
when the outString$ was just ABCDE plus a carriage return. This locks-up the vdrive in LED-blinking mode.
I don't know why - but after a while "why ask why?", just try something else.
So when I used the statements:
V=len(outString$)
XOUT$="WRF "+STR(V)
vdriveString$=XOUT$+CR
SEROUT (vdriveRXD, vdriveBAUD, 1, len(vdriveString$), vdriveString$)
I saw it produce the string:
WRF 6
which is correct, and the vdrive works without trouble.
So, rather than trying to convert functioning old ArmMite code for the BasicChip, I wrote stuff from scratch, checking things along the way.
I like the BasicChip.
Re: VDRIVE and BasicChip
Please post your Vdrive.bas file when it is doing what you want.
As for changing editors, I understand that is a painful process, I have given up on an old one only when it stopped running on newer Windows. That is why in the IDEs we use allow you to use the editor of your choice. Iam slowly moving over to NotePad++, but I still miss a couple of the keyboard shortcuts from my old favorite.
For "multiple include guards may be useful for:", those or more often used in C, and the pre-processor we used is written for C but hacked to handle BASIC comments. When programs get very big it makes sense to break them into pieces that make sense, especially when more than one person is working on them (I often define myself as multiple people when I haven't looked at one section of code for 6 months or more). In BASIC the definition of a set of global variables might be a good use for multiple copies of #include files.
As for changing editors, I understand that is a painful process, I have given up on an old one only when it stopped running on newer Windows. That is why in the IDEs we use allow you to use the editor of your choice. Iam slowly moving over to NotePad++, but I still miss a couple of the keyboard shortcuts from my old favorite.
For "multiple include guards may be useful for:", those or more often used in C, and the pre-processor we used is written for C but hacked to handle BASIC comments. When programs get very big it makes sense to break them into pieces that make sense, especially when more than one person is working on them (I often define myself as multiple people when I haven't looked at one section of code for 6 months or more). In BASIC the definition of a set of global variables might be a good use for multiple copies of #include files.
Re: VDRIVE and BasicChip
I looked at my copy of Vdrive.bas and only found it uses the Serial.bas library.
Looks like you would need 4 pins for the serial - RTS & CTS are used by the Vdrive device
-
what kind of code conversion issues are you having??
Looks like you would need 4 pins for the serial - RTS & CTS are used by the Vdrive device
-
what kind of code conversion issues are you having??