- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 5
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
I've been a computer enthusiast since 1978 and enjoy assembly programming as a hobby.
- PC Specs
- AMD 950, CDROM, 17 gig HD, 784 Ram,
Re: I'd like to point out that these solutions are no better or worse than anyone elses, but rather a demonstration of different ways to solve the problem and still get the same result. [code][size=2]char get_letter_grade (int grade_num) { char Result; switch (grade_num / 10) { case 10: case 9: Result … | |
Re: One that I've done and called it Phrase Guess was pretty simple. Allow player to enter a phrase or sentence, pretty well anything, including a clue. Then it's redisplayed with just underscores but in a way you can tell how many words there are and number of letters in each … | |
Re: So what part do you actually need help with? Which platform? If Windows, DOS or GUI? Most importantly show something of the source as you understand it should be done | |
Re: [code]void delspace (char *Str) { int Pntr = 0; int Dest = 0; while (Str [Pntr]) { if (Str [Pntr] != ' ') Str [Dest++] = Str [Pntr]; Pntr++; } Str [Pntr] = 0; }[/code]Think in terms of how you would have to do something manually and then coding it … | |
Re: [QUOTE=guneky;598110]Hello, I tried to convert below code, but I couldn't..[/QUOTE] Actually that's not correct, you did convert it and a reasonably good job too, the only problem is it's not working as expected. 1. You only initialize AL to -1 (255 or 0FFH) once and then inside your loop it's … | |
Re: What your doing is passing the address of the proceedure to MesssageBox instead of xd [code] invoke MessageBox, NULL, addr xd, addr xd, MB_OK.[/code] It will look kid of odd those, your caption being exactly the same as text | |
Re: It is different, and yes probably has something to do with alignment, but without seeing code in its entirety and more importantly the switches your passing to GCC it's hard to say why this is happening. | |
Re: Here is [URL="http://www.penguin.cz/~literakl/intel/intel.html"]http://www.penguin.cz/~literakl/intel/intel.html[/URL] instruction set with clocks Keep in mind, in a multithreaded operating system, cycles are only realative as other concurrent processes are using CPU at same time, which will affect the throughput of application of interest. | |
Re: Depending upon the compiler, it will tell you how large these areas can be, but it's not good practice as it actually allocates that much space in your application much better to [code] arr dd 0[/code] and then use the appropriate API to allocate whatever space you need and then … | |
Re: What platform are you using, as there is a distinct way of calling interrupts through BIOS, DOS or LINUX. These calling conventions allow you to access hardware directly (BIOS) or near directly (DOS). Windows just won't allow you to do it at all. This page deliniates how to use [URL="http://www.bookcase.com/library/dos/ints/int10.html"]INT … | |
Re: Example 1: You've declared single byte, whereas word declares 2[code]array1 dw 4 dup(?)[/code] Example 2: is correct. In both cases you are declaring space in uninialized space and has no effect of executable size. If however you used [B]dup (0)[/B] you'd wind up with an executable of 20k bytes. | |
| |
Re: [code] .data V1 dd 24 V2 dd 37 V3 dd 123 V4 dd 18 V5 dd -1 [COLOR="Red"] -(( 24 + 37 ) - 123) + ( 37 - 18 ) ( 61 - 123) + 19 -(-62) + 19 62 + 19 = 81[/COLOR] .code Start: mov eax, V2 … | |
Re: Q1: Assuming your using MASM [code] PUBLIC Str1 .const Str1 db 'Backward', 0[/code] Then in all other modules you would use[code] extern Str1:DWORD[/code]so the linker will resolve the global context Q2: Eventhough some assembers have "switch" macros, there isn't a switch statement in assembly. It is accomplished by testing and … | |
Re: What part needs to be in assembly? Is the array necessary? Calculation to consider interations other than 4? Where does test1 through 4 come from? Post the details of the assignment as they were given to you by the instructor | |
Re: Look for any handlers you have in your app relative to non-client area such as WM_NCLBUTTONDOWN or UP. | |
Re: Show an example of what you've done so far | |
Re: You don't need line 18 or line 25 as getenv only takes one argument, that being a string pointer. I generally like using kernel32 library functions and in this case may work for you [B]GetEnvironmentVariable[/B] The GetEnvironmentVariable function retrieves the value of the specified variable from the environment block of … | |
This procedure dispatches application defined event handlers and alternately executes default process for both standard or sub/super classed windows. Map is defined as follows. In most cases I define this table in .data, but in can be in .const also. I choose writeable memory as application can redefine characteristics. [code] … | |
I use GetTickCount in a lot of my applications, so I built this snippet to convert to hours minutes and seconds. Leading extraneous data is excluded from output. | |
User can enter an ascii string of up to 48 characters consisting of 1's or 0's, with randomly interspersed whitespace. IE: [B]1011111001011110 [/B]will be evaulated equally to [B][1011][111....cc001cccx01 111hhhh0 [/B]Algorithm parses from right to left so will be truncated at 16 position Purpose is to give all those still programming … | |
There are numerous calls to Win32 API that return detailed information as to failure via GetLastError (). I've devised a method by which to get the textual information corresponding to error and the address of the call that caused the violation. If GetLastError () returns null, then it can serve … | |
Additional features will be added to this section of code such as fixing window size proportial to monitors resolution and subclassing the single edit control of this program. You'll notice I don't call ShowWindow here as WS_VISIBLE in windows style is defined. | |
I've often wondered why M$ didn't make creating a window a simple as registering a class in that only one 32 bit value need be passed to calling routine. Although this is not ground breaking code design it does facilitate calling code only set EBX to point to all values … | |
I prefer to use this method as it doesn't clutter a windows procedure with dozens of conditionals and it address my primary objective of coding as tight as possible [28 bytes]. If you think my method can be improved upon in size and/or speed please post your solution. Note: I … | |
The next few posts will be what's required to get a window to display on the monitor. The code between Main & Pump will probably change as time goes on, but for now this is all that is required. I choose this method or placement because only 28 bytes of … | |
These are a pair of routine I use quite often. I know MemSet is virtualy the same as ZeroMemory in kernel32.dll, but there may be a time I want to use these in an embedded system where this dll won't be avaliable. | |
As part of a larger hobby project that I'm undertaking being a doubly linked list for 95/98/XP, this is the first in a series that I will be posting. Upon completion, I will have a complete application written in assembly for the Windows platform. Compiled with NASM | |
Re: I am curious as to which compiler you used to create the executable. In know with VC++, not typecasting WindowProcedure will cause and error. Secondly, why MS$ has done this I'll never know, but not adding 1 to the desired background color will yeild the wrong color. I must use … |