MVCOM and null bytes
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
MVCOM and null bytes
Hi there,
I'm trying to use MVCOM to send a byte sequence via the RS-232 port which includes a terminating null byte ($00 or 0x00). Monitoring what is being sent using a serial port monitor the null byte does not appear to be included in what is sent, although everything else is up to that point. E.g. if I send 1,2,3,4,5,0 all I see is 1,2,3,4,5 on the serial port monitor.
Can anyone tell me if MVCOM sends null bytes or does it ignore them? If it does ignore them is there a way around this?
Kind regards,
Francis.
			
			
									
									
						I'm trying to use MVCOM to send a byte sequence via the RS-232 port which includes a terminating null byte ($00 or 0x00). Monitoring what is being sent using a serial port monitor the null byte does not appear to be included in what is sent, although everything else is up to that point. E.g. if I send 1,2,3,4,5,0 all I see is 1,2,3,4,5 on the serial port monitor.
Can anyone tell me if MVCOM sends null bytes or does it ignore them? If it does ignore them is there a way around this?
Kind regards,
Francis.
if you use the command ComSendByte(HCom.l,*Buffer,BufferLen)
there's shouldn't be any problem.
but if you send a string, the last '0' char won't be sent.
			
			
													there's shouldn't be any problem.
but if you send a string, the last '0' char won't be sent.
					Last edited by Flype on Fri Aug 18, 2006 7:52 pm, edited 1 time in total.
									
			
									No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
						There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
sorry i didn't think about the version.
but anyway it's the same result.
just use ComWrite() with Len() + 1 for the extra '0' byte.
not tested but it should work.
tell me.
			
			
									
									but anyway it's the same result.
just use ComWrite() with Len() + 1 for the extra '0' byte.
not tested but it should work.
Code: Select all
MyBuffer1.s = "0123456789"
If ComWrite(Hcom, @MyBuffer1, Len(MyBuffer1) + 1)
	;Your code
EndIfNo programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
						There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
can't let an amiga user without answerDreamland Fantasy wrote:@Flype
Yep, that seems to work!![]()
Many thanks!
Kind regards,
Francis.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
						There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
yes, i would love to see pb4 ported to amigaos to.
but fred's team have an already very big amount of work with the win/linux/macos versions.
			
			
									
									but fred's team have an already very big amount of work with the win/linux/macos versions.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
						There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
- Dreamland Fantasy
 - Enthusiast

 - Posts: 335
 - Joined: Fri Jun 11, 2004 9:35 pm
 - Location: Glasgow, UK
 - Contact:
 
@Flype
Yeah, I know that Fred and co. do have a lot of work with all the different versions on the go. That doesn't detract from the fact that I would love to have a native version for OS4.
Maybe everyone who wants an updated AmigaOS 3.x/4.x version should put a kitty together to encourage them!
 
Kind regards,
Francis.
			
			
									
									
						Yeah, I know that Fred and co. do have a lot of work with all the different versions on the go. That doesn't detract from the fact that I would love to have a native version for OS4.
Maybe everyone who wants an updated AmigaOS 3.x/4.x version should put a kitty together to encourage them!
Kind regards,
Francis.
