Search found 3466 matches

by MrSwiss
Jul 06, 2020 13:42
Forum: Hardware Interfaces / Communication
Topic: BCD Conversion #Define(s)
Replies: 9
Views: 377

Re: BCD Conversion #Define(s)

Yes, it's packed BCD, which is also used in devices, like RTC's e.t.c.
And this is, what this thread is all about.
by MrSwiss
Jul 06, 2020 13:32
Forum: Hardware Interfaces / Communication
Topic: BCD Conversion #Define(s)
Replies: 9
Views: 377

Re: BCD Conversion #Define(s)

Back on topic, please. (aka: ... End Asm ...) BCD has as caped value, when compared to Hex, because the representation of A to F (10 to 15 decimal) isn't ever used in a Nibble (value = 0 to 9 dec). A Nibble is a half-Byte, which means it consists of 4 bits ( hi and low = UByte). In order to avoid t...
by MrSwiss
Jul 05, 2020 16:02
Forum: Community Discussion
Topic: Problems with downloading from Sourceforge
Replies: 5
Views: 471

Re: Problems with downloading from Sourceforge

Hi Mike,

Have you tried with another browser, e.g. FireFox ?
If the automatic dl fails, click the link to manually start dl.
by MrSwiss
Jul 05, 2020 15:55
Forum: Hardware Interfaces / Communication
Topic: BCD Conversion #Define(s)
Replies: 9
Views: 377

Re: BCD Conversion #Define(s)

marcov wrote:It is pre pentium era fun.
Even a 8086 can cope with that.
marcov wrote:I'm not even sure if those instructions are really faster nowadays.
Agree, likely to be slower even ...
by MrSwiss
Jul 05, 2020 9:32
Forum: Tips and Tricks
Topic: Yet another expression parser (spreadsheet)
Replies: 16
Views: 480

Re: Yet another expression parser (spreadsheet)

Probably the -Ofast (GCC optimizer setting).
Recomendations are: for 'production code' -O2 (no more is considered safe!)
(as stated on GCC's site)
by MrSwiss
Jul 05, 2020 9:25
Forum: Hardware Interfaces / Communication
Topic: BCD Conversion #Define(s)
Replies: 9
Views: 377

Re: BCD Conversion #Define(s)

Nice explanation but ... don't know how many here, are understanding ASM ?!?
(suppose probably less than 10% of all members)
by MrSwiss
Jul 03, 2020 23:27
Forum: Hardware Interfaces / Communication
Topic: BCD Conversion #Define(s)
Replies: 9
Views: 377

BCD Conversion #Define(s)

Since certain devices require it, to use BCD formatted UBytes, this two #Define(s) might come in handy, to solve communication problems, with such devices. #Define setBCD(v) converts from: base 16 to: base 10 (v = Decimal/Hex) #Define getBCD(v) converts from: base 10 to: base 16 (v =...
by MrSwiss
Jul 02, 2020 22:14
Forum: General
Topic: 20 decimal to 20 H
Replies: 8
Views: 255

Re: 20 decimal to 20 H

Dinosaur wrote:By the way, what made you say that

SD2405 seems to be "discontinued".
The web-site pointed to by my search engine (DDG).
Maybe, just related to their own product ?
Btw: that's where I've got the datasheet from ...
by MrSwiss
Jul 02, 2020 21:38
Forum: General
Topic: 20 decimal to 20 H
Replies: 8
Views: 255

Re: 20 decimal to 20 H

So my problem is not converting 20 to hex, but putting 20 hex to represent 20 decimal. OK, now I hopefully understand, what you seemingly need. Try the below code: ' toBCD_Mac.bas -- (c) 2020-07-02, MrSwiss ' ' compile: -s console ' #Define toBCD(v) ( CUByte( (v) \ 10 Shl 4 + (v) Mod 10 ) ) Dim As ...
by MrSwiss
Jul 02, 2020 16:31
Forum: General
Topic: 20 decimal to 20 H
Replies: 8
Views: 255

Re: 20 decimal to 20 H

More on BCD encoding is found in: Section: Tips & Tricks Titled: Union as 'own' data-type URL: https://www.freebasic.net/forum/viewtopic.php?f=7&t=27450 This just to give an idea of, how to deal with it ... (it just does one UByte at the time) You might have to extend it for your specific ne...
by MrSwiss
Jul 02, 2020 14:27
Forum: General
Topic: 20 decimal to 20 H
Replies: 8
Views: 255

Re: 20 decimal to 20 H

@Dinosaur, seems to me, that you've misunderstood what's written in the Docs, of the device. The encoding isn't, as you assumed in HEX, but in BCD (binary coded decimal). 5.2 Real Time Clock Registers [00h to 06h] These RTC (Realtimeclock) registers are stored as binary-coded decimal BCD format. Sec...
by MrSwiss
Jul 01, 2020 15:13
Forum: Community Discussion
Topic: Windows 10 May 2020 Update
Replies: 16
Views: 479

Re: Windows 10 May 2020 Update

Nothing new under the sun:
M$ is still (always did it) using its userbase, as beta testers ...

Btw: those that haven't taken control of their OS themselfs by now,
by wresting it forcefully back from M$, can only be pityed.
by MrSwiss
Jun 29, 2020 16:22
Forum: Tips and Tricks
Topic: The Ultimate FB HashMap
Replies: 10
Views: 1988

Re: The Ultimate FB HashMap

Which clashes with other header definitions (the Windows headers, no less). Nope, nothing to do with headers (the TRUE/FALSE issue) it is FBC related. It's a change in FBC itself: OK, up to and including version: 1.03.0 From version: 1.04.0 (introduction of Boolean type into FBC) it must be removed...
by MrSwiss
Jun 28, 2020 18:25
Forum: Community Discussion
Topic: Mac OS X Support
Replies: 23
Views: 644

Re: Mac OS X Support

srvaldez wrote:I don't know what's going on, no binaries, maybe this will work

Maybe just your virus-scanner interfering ...
(try with it switched OFF, for the test)
by MrSwiss
Jun 28, 2020 16:12
Forum: Beginners
Topic: help using fbsound-1.1 for playing multiple wav files
Replies: 8
Views: 228

Re: help using fbsound-1.1 for playing multiple wav files

I'd suggest to use FBC 64 bit, whenever you are on a 64 bit operating system. The advantage is: the 32 bit emulator (WoW on WIN) isn't needed, at all. Typically: consumes more RAM and possibly, slows down execution speed. From my point of view, the 32 bit version, is only good for legacy 32 bit OS's...

Go to advanced search