cmp word CL, 0x20

Developer
Jun 2, 2011 at 6:51 PM
Edited Jun 2, 2011 at 6:53 PM

Last I checked,  the CL register is only 8-bits, so why is cosmos's compiler wanting to call it 16-bits? (This actually generates warnings from Nasm, but they don't appear in VS unless there is an actual error in the code (such as putting a register as the destination, and a byte as the source value, of an out command :P (well Out2Port as I've created it XD (Also have an In2Port, and Loop command as well.)))

So, any idea why the compiler wants to do that? If you actually wanted 16-bits, you should be using CX, not CL.

 

Also, if you feel you need a nice graphic so show the size of the registers, one can be found here:

http://www.asmcommunity.net/book/basics/registers/

 

And a good instruction reference (where I looked to find out what the mouse code I've been using as reference is actually doing) can be found here:

http://siyobik.info/main/reference

Coordinator
Jun 2, 2011 at 10:53 PM
> Last I checked, the CL register is only 8-bits, so why is cosmos's
> compiler wanting to call it 16-bits? (This actually generates warnings
> from Nasm, but they don't appear in VS unless there is an actual error
> in the code (such as putting a register as the destination, and a byte
> as the source value, of an out command :P (well Out2Port as I've created
> it XD (Also have an In2Port, and Loop command as well.)))
>
> So, any idea why the compiler wants to do that? If you actually wanted
> 16-bits, you should be using CX, not CL.

Its probably a bug. Do you have write access?
Coordinator
Jun 3, 2011 at 6:27 AM
what code is being generated?



On 6/2/11, blah38621 <notifications@codeplex.com> wrote:
> From: blah38621
>
> Last I checked, the CL register is only 8-bits, so why is cosmos's compiler
> wanting to call it 16-bits? (This actually generates warnings from Nasm, but
> they don't appear in VS unless there is an actual error in the code (such as
> putting a register as the destination, and a byte as the source value, of an
> out command :P (well Out2Port as I've created it XD (Also have an In2Port,
> and Loop command as well.)))
>
> So, any idea why the compiler wants to do that? If you actually wanted
> 16-bits, you should be using CX, not CL. Also, if you feel you need a nice
> graphic so show the size of the registers, one can be found here:
> http://www.asmcommunity.net/book/basics/registers/
>
>
Developer
Jun 3, 2011 at 1:18 PM
Edited Jun 3, 2011 at 1:38 PM

The code that this is generated in I've put here:

http://pastebin.com/9ZPGPTU7

(That's only a  few lines, which contains 2 of the 14 warnings that appear to be getting generated, but ignored.  )

 

And no, kudzu, I don't currently have write access.

 

 

Also, any idea why, when i'm polling the mouse in remote mode,  it doesn't seem to realize the mouse has moved? As it keeps sending back that it's not moved at all....

Coordinator
Jun 3, 2011 at 1:47 PM
> The code that this is generated in I've put here:
>
> http://pastebin.com/9ZPGPTU7
>
> (That's only a few lines, which contains 2 of the 14 warnings that
> appear to be getting generated, but ignored. )
>
> And no, kudzu, I don't currently have write access.

You do now, but contact us before committing anything. Skype is the best
way to keep in touch with the core team, and of course we are on the IRC
as well.