Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: milldrone on September 08, 2012, 05:49:51 PM
-
I'm looking for a equivalent to the load formatted function. I would like to load the status of inputs X2 to X15 into a V memory. I'm presuming the MAPIO is the closest function. Typing in each item is very tedious, perhaps there is another function or an easy way to enter the items.
It does work when I map each input to a single V memory bit.
like:
x2 V5:2
x3 V5:3
x4 V5:4 ect.
-
I think you're going to need to do a cast, like V0 = X0:W (the cast being the X0:W part)or something like that. Don't remember off the top of my head what the cast nomenclature is for a 16-bit word. I believe there's also a bitwise copy function that will copy one memory range to another with no conversion, which should work.
-
Either of these will work. The MATH is faster, but not as intuitive, but if you understand bit shifting (>>> unsigned shift right and >> signed shift right), then this is your best bet.
-
Thanks to both of you