- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 10
- Posts with Upvotes
- 9
- Upvoting Members
- 10
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
49 Posted Topics
Re: Well, things are getting off to a slow start. Apparently, folks are not actually reading the original post (mine) that inspired WolfShield to start this discussion in the first place. Note that this followed from my previous definition of a "Hacker": "Hacker" is the most widely misused term in the … | |
Re: There is also another very good reason why there will be WinXP installations for a very long time. It is not uncommon to have some very expensive piece of hardware using some version of Windows that cannot (ever) be updated to a newer version because there is no possible way … | |
Re: Crucify me if you like, but the simple answer is that you can't. Even the CPU's XCHG instruction uses a hidden TEMP. Yes, there are lots of tricks and kludges that get you most of the way there, but they ALL fail on some type of data or other. Besides, … | |
Re: I think that everyone will agree that strings can be a real pain. The days of simple ASCII strings have evaporated into the mists of time. Now we have to deal with unicode in all it's variants. However, in terms of assembly language string processing, pretty much everything has already … | |
Re: Roger, Several things. First, why is the range check for input digits valid commented out? I also will point out that the first compare (cmp bl, 30h) is redundant. Just subtract '0' right away - it also sets the sign flag and saves some work. Then compare the result to … | |
Re: I'd like to add to what Assembly Guy has said. The notion of "memory allocation" and "segment limits" are almost universally confused with each other. Certainly it is true that in "protected" mode operating systems (Windows, Linux, Unix, Mac) that they amount to almost the same thing. The user never … | |
Re: Well, no Linux, no Mac? Are you sure that this will always be the case? Why not all three in basically one code base. Python works but has some irritating overhead to get the GUI classes connected. Java works and has the advantage of greasing the slides to a web-based … | |
I am interested in getting some opinions on the use of include files to sub-divide a large module into functionally related groups. What I'm interested in is opening a discussion on best practices and minimal requirements. Here's the scenario: I am working with a library with 200+ functions. They naturally … | |
Re: If the OS got shutdown during a critical I/O operation to the memory card, it could have creamed something in the File System Tables on the card. This can make removal of the file very difficult. Windows can be really porky about this. If neither of the previous suggestions help, … | |
Re: Deegirl -- The Function or Subroutine conundrum is as old as programming itself. At the lowest level (i.e. assembly/machine code) there is little difference. Both are branches to someplace else in the code stream and both carry the address of the branch point along with them so that they may … | |
Re: I've followed this post for some time now and thought that everyone would be interested in a little fact. First some background. I abandonded Windows several years ago for a lot of reasons, many of which have been already well expressed by other posters. Right now I'm running several Linux … | |
Re: According to the C standard (§6.5.2.1 (C99)) Arrays in C (and C++ by extension) are always row-major order: A[row][col]. And, at least as far as I can tell, are also always contiguous in memory: one row followed by the other. Anything else would be irrational. This has the rather convenient … | |
Re: I will assume that by "System" you mean a VB program. Given that, here's how you might start: First, decide on a name for your program and a folder in which you want to put it. Then, open the VB environment and have a look around. Sooner or later you … | |
Re: This may be a bit "techie", but bear with me. It is not uncommon for poorly written programs to not play together well with other programs. One cause is a program that hogs cpu cycles for really stupid things - usually because the programmer is sloppy, or sometimes just because … | |
Re: Not to beat a dead horse, but please, everyone should take rahim's experience as a warning. From a Windows perspective, THERE ARE NO OTHER OPERATING SYSTEMS!! When you install Windows (Any version) any existing boot loader will be creamed. As far as I know, only Windows does this. At the … | |
Re: Try something like this: NineDigits db "123456789$" ;the target sting - any old junk will do mov cx,9 ;loop count move ax,value ;value to convert move bx NineDigits ;Pointer to NineDigits LoopHere: shr ax ;low order bit into carry flag mov [bx],'0' ;Assume bit is not set jnc NextDigit ;if … | |
Re: ShiftLeft already answered why adding or subtracting 32 won't work. However, also consider this: Control characters and other non-alphabetic characters have no upper/lower case equivalence. toggling bit 5 on these characters will produce very strage results indeed. A lower case "space" character is a null - it terminates the string. … | |
Re: MrMicro - The first question (bits 16) is a bit difficult to explain given the limited context of the code snippet. It's probably a declaration of a variable that defines the number of bits for some operation somewhere else in the code. Other than that, it remains a mystery. The … | |
Re: If I recall, virtually all computing devices perform subtraction by addition of the 2's complement of the subtrahend from the minuend. It's easier to see how this works in binary. For your example, writing the values 821 (0x33a) and -621 (0xfd93) in binary, you have: 0000 0011 0011 1010 - … | |
Re: Xufan - It would be nice if you could tell the forum exactly why you were getting an illegal instruction. There is clearly nothing in deceptikon's code snippet that would cause this - it wouldn't even compile if there were. I also doubt that it had to do with DOS … | |
Re: Jason, I suspect that the reason that you have not gotten more responses is simply that you did not specify sufficient background for the problem. I have inferred from the code listing that you are writing code for a microcontroller (apparently the PIC16F690). These always have their own, sometimes rather … | |
Re: This is admittedly a difficult subject. Partly because of the rather complex nature of LiIon battery technology and partly because there is a lot of mis-information out there about batteries. You should know that all LiIon batteries are charged by circuitry designed to protect the battery from both UNDER charge … | |
Re: Ow!! This is not a good sign. If the original card won't run either, then the possibility of a damaged Motherboard unfortunately crops up. None of this is really easy to diagnose. However, the fact that the CPU actually gets through boot up and all the way to the GUI … | |
Re: Does this really need to be part of a separate program? If you just need to replace the first occurrence of a word in some file before you use the file for something else, then you could use "sed" like this: your_prompt> sed -i s/OldWord/NewWord/ path_to_File.extension In this example, capitalization … | |
Re: There are a few oddities. First, the values array is defined as containing 5 items. Then you index from 1 to 4, essentially throwing away the first value. This is probably where the arithmetic error comes from. However, there are two other things that strike me as odd. First, is … | |
Re: First, it is clear that these 2 connectors do not match up exactly. Here's a few observations: 1) gpio is for the general purpose I/O bus. There are many devices that can interface to this bus, but in general, normal users would never use it or need it. There is … | |
Re: "Lies, Damn Lies, and Statistics" - Benjamin Disraeli's comment about the power of statistics to tell lies is as relevant today as it was in the 19th century. It is sad that every time we see a statistic, there is this natural suspicion of the number. Having said that, I … | |
Re: Check file permissions too. Apache daemon may not start if file permissions are wrong. | |
Re: While it is bad form to do your homework for you, here are some hints... Regarding Q1 1)What bash commands generate the listings you need? Try typing `man ls` at the command prompt. 2)Read about the bash If then else constructs. Regarding Q2 Learn about sed - try typing `man … | |
![]() | Re: I won't go into exact details (I have to look them up myself every time I move settings) but at least as far as firefox is concerned, the trick is to copy the firefox profile folders. There are details for doing this on the Firefox website. Based on the framing … |
Re: > What I am considering is dual-booting my Windows computer with it. If your hardware is adequate, I would really try running Windows 7 in a VirtualBox "jail". To be sure, there is a performance hit, but it is not at all noticeable unless you are running really heavy duty … | |
Re: You have some homework to do! For sequential access, read up on the LODS and STOS instructions. There is a byte specific form of each. For the LODSB, put the array pointer in ESI (SI if 16-bit), use CLD to clear the direction flag then with each execution of LODS, … | |
Re: The computed outcome is the same. The difference is in the stack contents after the operation is complete. In the first case, each FILD instruction pushes a value on the stack and the FMUL, having no arguments, multiplies the two values at the top of the stack, pops the top … | |
Re: @stompjkrz400 - This is not as simple a question as you might at first think, at least not if you approach it without having first mastered the ieee storage format used by the co-processor. I do think that it is safe to assume that all numbers are handled as 80-bit … | |
Re: Aside from some dabbling with Slackware in the late 1990's, my first real experience with Linux resulted from the need to set up a VOIP system for our LAB using Asterisk on Redhat. Still, for daily stuff, I was committed to Windows. The real transition came when we were preparing … | |
Re: For all the world, it looks like you're storing 16-bits per byte which is then printing as 2 unicode characters rather than 2 ascii characters. Those funny boxes with the 4 digits in them are a symbols for Unicode values that have no glyphs. For example, "31" comes out to … | |
![]() | Re: [CODE] lastname db 21,21 dup(?) [/CODE] Are you sure that this is what you want? Unless memory fails me, db 21, 21 dup(?) is asking the assembler to generate a byte array consisting of 014h, followed by 21 undefined bytes. I think what you want is something more like: [CODE] … ![]() |
Re: Since you've specified that the pointer is in [BP+1], I will assume that you are using 16-bit registers. [BP+1] does however sound a bit odd, given that arguments in a 16-bit segment should be 2 bytes and therefore BP offsets should always be even. nevertheless, I'll use your address. First … | |
Re: I think what you want to do is loop on lines 19-22, so, put a label at line19 and a loop after line 22: [CODE] LoopHere: call promptforintegers call arraysum call displaysum call dumpregs loop LoopHere exit [/CODE] You can also use one of the conditional loop instructions to test … | |
Re: I'm not sure exactly what you're up to, and I won't write finished code, but here are a few suggestions. First, you need to know if your code is in a 16, 32, or 64 bit segment. I will assume a 32 bit segment, in which case all registers and … | |
Re: [QUOTE]I really do not understand the process that you have post. Please say it clearly what I have to do now. [/QUOTE] Oh Dear! What you need to do is "Study and Learn". I don't mean that in a nasty or condescending way either. Let me explain. First, there are … | |
Re: How about a completely different approach that avoids all the dividing and most of the comparisons and is easily extensible to longer word lengths and can be fixed up to return the string. [code=c] #include <stdlib.h> /* Notes: 1) Internal representation of ALL numbers is already in hex. For this … | |
Re: While the previous responses tell you why not to expect the answer you were expecting (I guess 7 in the first case, and 12 in the second case), no one has explained what actually happened. In the first case, the compiler has to generate code to add 2 operands, which … | |
Re: This whole code sequence is way too complicated. Here are some suggestions: 1) Don't use the %d format in scanf. Read the data in as a character string, 2) All characters in the input string will be either '0' or '1'. Use the characteristics of the character values to your … | |
Re: Using while(1) amounts to while(true). Since 1 is a constant, it will never be false and the loop will go on forever unless program flow encounters a break statement. Try something like: if(some condition is met) break; | |
Re: I think that it might be useful to generalize this a bit more. The problem is that you didn't distinguish between what happens (or can happen) at compile time from what happens (or can happen) at run time - this is not always a simple thing to do. Nevertheless, since … | |
Re: I'm not 100% sure about this, but I suspect that you are seeing the result of a compiler optimization. The "const" is telling the compiler that the value of j won't be changing. On the other hand, you bypass that assumption by trying to sneak a new value into j's … | |
Re: I realize that this thread is old, but it is still useful to correct an erroneous assertion about inb(), outb(), etc., especially given that Google drops people in here when looking for an answer to why these functions segfault, even when all the advice featured elsewhere is followed. The truth … |
The End.