WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

Bug in the RGB macro, I recently downloaded the latest version of MASM32 and I believe I have found a bug in the RGB macro.

mjsalman
Quote Post


New Member
*

Group: Members
Posts: 4
Member No.: 508
Joined: 7-September 04


I recently downloaded the latest version of MASM32 and I believe I have found a bug in the RGB macro (last update to that file is Dec.4/2003)
The macro is supposed to return COLOREF in eax and is coded as follows

CODE
xor eax,eax
mov ah,blue
mov al,green
rol eax, 16
mov al,red


now if you use this maco like this RGB 255,255,255 it returns in eax FFFF00FF which is wrong, for a COLOREF the last byte must be always 0 the error comes from rol eax,16 it should be rol eax, 8 which will then return in eax 00FFFFFF
I am not sure if this is the proper place to report this, there is a provision for reporting winasm bugs but there does not seem to be any for masm32

Mike

PMEmail Poster
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


hi,
This is what it is included in my MASM32 package
CODE
RGB MACRO red, green, blue
   xor eax, eax
   mov al, blue ; blue
   rol eax, 8
   mov al, green; green
   rol eax, 8
   mov al, red  ; red
ENDM


Antonis

PS. This place is for ANYTHING related to programming using MASM
PMEmail PosterUsers Website
Top
mjsalman
Quote Post


New Member
*

Group: Members
Posts: 4
Member No.: 508
Joined: 7-September 04


Hi:
I downloaded the file m32v82r.zip which installs a newer version of MASM32 and this is where the macro has been changed and is incorrect
Mike
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google