150 Posted Topics
Re: I am an avid and would even venture to say an excellent assembly programmer. In the early 80's my assembly overlays to basic where an essential component to greater throughput. Example sorting 1,000 elements in basic would take 11 mins and with the overlay 30 sec with the kind of … | |
Re: After you've entered Month & Day, your program has no way of knowing which sign those entries are applicable too. One way would be to calculate the number of days that have elapsed since Jan 1 and then compare that with a table that provides a pointer to appropriate text … | |
Re: I see what you mean in respect to the first example and the only conclusion I can come too is although new processors are backward compatible, but there are problems when attempting to use the high order bits of a 16 bit value. If you have access to a 286, … | |
Re: [url]http://www.husseinsspace.com/teaching/udw/1996/asmnotes/chapsev.htm[/url] | |
Re: Let's see your code for doing indvidual lights and explain exactly what you mean by "running lights" | |
Re: I've been freelancing for 25 years and never had a contract. That being said though, there were quite a few problems in the beginning because I didn't have the experience to recognize disingenuous people. I have always though laid out a prospectus so there was never any confusion of the … | |
Re: Start with [code=cplus]int main () { int a = 2, c = 1, b, d; while (c < 100) { b = 2; a++; /* Implement your next loop here changing the logic a bit */ } return 0; }[/code]This is how you get rid of loop1. Use the same … | |
Re: [code=cplus]int TxtSize = GetWindowTextLenth (hwndEditBox) + 1; char *Entry = new char [TxtSize]; GetWindowText (hwndEditBox, Entry, TxtSize); MessageBox (NULL, Entry, "", MB_OK | MB_ICONINFORMATION) delete Entry [];[/code]I'm pretty rusty at C++, so note useage of NEW & DELETE | |
![]() | Re: Without seeing your code or header file it's impossible to know where the problem is, but my implementation would have each node with two pointers. One to students name and other to array of grades. That way each node is exactly 8 bytes, which reduces overhead for sorting and seach … |
Re: Well it sound like you've got the logic already figured out, and dependant upon operating system I would recommend researching high precision timers in either *nix or windows. | |
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 … | |
Re: and after you've edited for readability, maybe post a few ideas of your own on how you would solve this problem because it is after all beyond simple. Clue: Do the opposite of what you did to convert to uppercase! | |
Re: I use ML & NASM only because they both use intel's syntax. That being said though, if your compiler is doing everything you want it do then its probably a good compiler. In my case the only advantage ML has over NASM is that emits adequate information for Olleybug so … | |
Re: The problem probably is at Speed Gonzales3456. There is no space between es and 3456, so afterwards everything is out of sync by one field. You last post wasn't visible to me until I posted this one | |
Re: Probably the simplest thing to do is pull the key off and see what is making it keep continuous contact. Usually it's pretty easy to see if there's something broken or foreign material not allowing to travel freely. Most often I've found a simple cleaning solves the problem<br> | |
Re: As you elude to WinXP, I'll assume you are doing a windows application and as such you must include kernel32.lib and call one of the text emitting functions DrawText, TextOut or ExTextOut. For example DrawText requires 5 parameters as follows 1. Your programs window device context 2. Long pointer to … | |
Re: What is the underlying operating system, or are you using BIOS calls. In any event, EAX won't work because especially in the case of ASCII only an 8 bit value is returned and you are comparing a 32 bit value and may not know at any given time what the … | |
Re: I've never used TASM, but maybe this might help steer you in the right direction. In NASM I must compile "NASMW -fwin32 sourcefile". Note -fwin32, this tells the compiler which platform I intend to compile application for. then "link /entry:Main /machine:ix86 ......", this tell the linker the entry point and … | |
Re: Google LINUX. There may be a better deliniation of how kernel is realated and/or part of the operating system. [quote]It is, essentially the same (at least for me)[/quote] I agree, the destinction is as subtle as car is to transportation. | |
Re: In Access, VB & Excel today is 38,427 days since Jan 1, 1970. The time becomes the fracation protion, so at the time I'm writing this response it's 38,427.31. Now at 3:30 pm today 38,427.65 you lanuch you application and try to enter data that was for ealier today it … | |
Re: [QUOTE=DaveSW]However, I would caution that this community is built fundamentally around your personality Dani[/QUOTE] I agree 100%. No matter how the hierarchy of the forum reshapes itself which is inevitable, so long as your signature prevails right or wrong that is what is important. I'd like to thank you for … |
The End.