150 Posted Topics
Re: When creating an "[i]EDIT[/i]" window there are several flags associated all begining with [b]ES_[/b]. The one you want to use is [b]ES_AUTOHSCROLL[/b] in dwStyle. | |
Re: Assuming your using CreateWindowEx, change the value of [b]y[/b] [i](vertical position of window)[/i] before the next window is created. | |
Re: It almost looks like you threw something out in the wind in the hopes that someone will fix it up for you. Clean up your code with indentation to begin with so it's a little more legible. Then run it to see if you get the results you expect. Right … ![]() | |
Re: Pentium class processor also have BT (Bit Test) that is non destructive unlike Salem's examples. [code=asm] bt eax, 0[/code]would test bit zero and return CY = 1 if set otherwise 0. Otherwise boolean operators like in the previous post are the best alternative or choice. | |
Re: One of expecption handlings greatest claims to fame is ability to unroll the stack. Lets suppose you have subroutines "A", "B", "C". Your main code establishes a try block, where in it you call "A" and then "A" calls "B" and "B" calls "C". In "C" there is an error … | |
Re: The only thing I can think of is that another process or instance of this application already has the file open, and because you are not sharing the file this would not allow the handle to be created. Other than that, your code is correct. | |
Re: Set a soft break at CreateRawDataBUFR then a watchpoint at rdi, or set the same softbreak and a watchpoint to the location where rdi is stored and another at the contents that rdi points too. Then by single stepping see which changes at what point int the subroutine. | |
Re: Hamrick's link is about as succenct as you can get. The why on the other hand probably will never be know. It could be deliberate, accidental or just a matter of convienence as code is being developed, modfied or upgraded. Concentrate more on the API's that provide you handles to … | |
Re: #1: Determine the type of intrusions and possible frequencies. #2: Research the type of equipment that is suitiable for intended purpose. Alarms, cameras, sirens etc. #3: Is there existing software for devices best suited to your application. Older PC's are sometimes a viable option #4: Imlement prototypes and do some … | |
Using VC++ 6.0, setting this option doesn't seem to do anything significant. Specically, I can still run the app on a 486. I've drilled into assembly and can't find anywhere that Pentium opcodes are being used. My guess would be timing and as I don't have any references to that … | |
Re: SP is a special purpose register and it should never be used for anything other than what it was intended and you realize that anyway by your comment [B]this is wrong[/B]. You've got the right idea using index registgers, but you're failing to use instructions that give these registers thier … | |
Re: I don't know, if iamthwee's link doesn't give you the answer then I guess there isn't one. | |
Re: If you don't return a value to the operating system, then whatever happens to be in EAX at the time will probably be returned and this may cause undesirable results. That is why void main () is a definite NO NO! | |
Re: In VC 6.0++ each of Debug & Release can have different settings for directories. Use ALT-F7 and check that the settings for each is the same | |
Re: When you open a single file in Visual Studio (VC 6.0++), what it will ask if you want to open an [B]project workspace. [/B]That is just something it needs internally and doesn't actually create a project. Just click on yes and you can compile a single file. | |
Re: [quote=Bench;417568] I think its a 'big picture' issue that you shouldn't worry about too much for the moment. For small/toy programs while learning the language, or testing out a feature of the language, it really doesn't matter IMHO.[/quote] I concur, you will find that after writing a few hundred programs … | |
Re: Your code is unconventional to say the least, but creative non the less. You'll also find you get unusual results if you add 54 + 93 = 7< and if you add 87 + 44 = <; 7 + 4 = 11, then add 48 to this and you get … | |
Re: To become an assembly programmer understanding instruction encoding is not essential. If you were programming like the first computer [URL]http://www.imsai.net/[/URL] I had that had 8 toggle switches for instruction and 16 switches for addresses and then a button to write, this information would be critical Fortunately, assemblers and compilers take … | |
Re: Which processor? Being brand new, before tackling any examples you should spend some time getting to know what your processor can actually do, especially in the case of which flags are set or reset and by which instructions. In any event for IA32, [url]www.masm32.com[/url] has a complete package with lots … | |
Re: [quote=Evenbit;417232]If you insist on learning the obsolete DOS-style 16-bit code[/quote] There seems to be a lot of interest in 16 bit code in this forum , which leads me to believe there are a lot of educational institutions teaching this. My question would be WHY? masm32.com has the whole package … | |
Re: If your application is pure assembly then the way AncientDragon explained it is the only way unless you use BCD or want to display result in decimal. A lot of applications I do are for windows therefore I use wsprintf a function of kernel32.lib and then one of the parameters … | |
Re: [quote=satya.vijai;417028] HANDLE hFile; hFile = CreateFile(L[COLOR=green]"C:\\test.txt"[/COLOR],GENERIC_READ, FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); I thought of doing like, 1. get the file size 2. create a char* and allocate the size of file size 3. copying the entire file into a string buffer using Readfile() API, [/quote] [code] int FSize, Actual; char *Buffer; FSize = GetFileSize … | |
Re: [quote=RicardoDiaz;415544]in Linux you put: [code]mov $1, %eax mov $0, %ebx int $0x80[/code] [/quote] The two most significant things are strip $ and % and invert operators [code=asm]mov eax, 1 mov ebx, 0 int 0x80[/code] I don't remember what the call is for Linux, but in windows to do an orderly … | |
In assembly I would[code=asm] ProcA enter 16, 0 call ProcB leave ret ProcB enter 16, 1 ... code leave ret[/code]Even if ProcA is in another file, so long as I know the order of the variables in ProcA they are visible to me in ProcB because [U][B]16 ,1[/B][/U] nests procedures … | |
Re: Use WM_KEYDOWN as a toggle instead of an event that actually moves your character. You've probably discovered by now that your character movement corresponds to how repeat keys work. Therefore;[code]MoveFlag ^= 1;[/code] Then in a timer event check if the flag is on and if so move your character.[code]if (MoveFlag … | |
Re: There are two ways of doing it, #1: Trace through the program with whichever debugger your using, #2: Emit a listing file from your compiler shows assembly with source | |
Re: Which processor? In general any 8 bit unsigned addition that will cause a result greater than 255 or less than zero for subtraction will cause carry to be set, otherwise it will be reset respectively. | |
Re: Unlike executables that have a lot more information for startup and memory allocation, your binary file always starts at the origin. So in case #2 you have to put a jump instruction ahead of scrollXLines so it will actual start where you expect | |
Re: You propbably want to use [inlinecode]int 21H[/inlinecode] in line 10. What you are actually doing is calling interrupt 15H (21) instead of 21H. I can't verify that AX = 4C00 is correct because my book is for DOS 2.1 | |
Re: Your assumption that NASM has the same syntax as ML (Masm) or TASM. Yes, for the most part opcodes are similar. An example would be. ML: mov eax, Data mov eax, offset Data NASM: mov eax, [Data] the contents of location Data mov eax, Data the address of data If … |
The End.