- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 9
- Posts with Upvotes
- 6
- Upvoting Members
- 9
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hobbiest developer ia64
- PC Specs
- Ubuntu 12.04, Intel dual core,
44 Posted Topics
I'm in the process of designing a console personal/business finance package for Linux. It's easy to identify the advantages of data abstraction through classes, but I'm not inclined to become proficient with STL or containers. Exception handling may become a consideration, but definitely memory allocation via "new". My own implementation … | |
For those interested in operating system development, this snippet tests status of A20. It is the line that allows memory beyond 1 meg to be addressed, otherwise it will just wrap around which some applications and versions of DOS depend on. My bootloader **MBR1_44** has switched system to protected (*32 … | |
Re: #1: Is the compiler your using case sensitive? If so, color & Color are not the same #2: What is the calling conventions of SetTextColor? CDELC pushes value or pointer on stack mov eax, [Color] + (black * 16) push eax call SetTextColor You could also; push dword [Color] + … | |
Re: You should maybe finish the thread you started 5 days ago on the exact same question. What was lacking in the answers you got then. | |
This will take a value in EAX or AX, convert to ASCII hex with optional padding and upper or lower case This example would yield "---fc103a" push word 0x222d ; 32 bit conversion, padd output with '-' push word ASCPntr ; Pointer to end of conversion buffer push 0xfc103a call … | |
Re: Lets assume for example PI = 180 / 57. Division essentially is nothing more than successive subtractions, so based on that premis, one could construct a loop as follows for (Cnt = 0; Cnt < Presision; Cnt++ ) { Result = 0; while (Value > Divisor) { Value -= Divisor; … | |
Re: Why are you starting a new thread for a question you just asked [here](https://www.daniweb.com/software-development/cpp/threads/494674/password-strong-or-weak-or-too-strong) yesterday | |
Re: There are a couple of pieces you've got a pretty good handle on, but what would be helpful now, is to show your entries and what the program yields thus far. I assume your entries are 94 "A", 88 "B", 80 "B" & 95 "A". Might be a good idea … | |
Re: Here is the [explanation](http://en.wikipedia.org/wiki/Modulo_operation) you seek, which by the way was just a real simple Google search for "modulus division". | |
Re: Hopefully you understand the concept of bit patterns and that way at line 48 you could code whatever conditionals you need. I left out the 6 char conditional, you can stuff it in wherever it will work. I'm also new to C++ and think there might be better ways to … | |
Re: Although I've never had a chance to benchmark my concept with a large dataset, I've implemented a slight twist to the insertion sort wherein I maintain an array of pointers to the first element. PNTR(0) to the fist alpha numerically. 1 - 26 correspond to letters a-z and PNTR(27) anything … | |
This is a special purpose boot loader for a system I've called Proto-Sys. Eventually it is going to become a 64 bit application that will encompass all the resources to hook into drivers, benchmark code and optomize algorithms. Synopsis: * Preserve registers as they were passed by BIOS * Create … | |
Re: Yes, DBMS (Database Management System) is software that manipulates the data. There are [these](http://www.capterra.com/database-management-software/) most popular ones. SQL is simply an integrated or independant layer that will extract a subset of a larger database and then, that smaller database can be manipulated by the DBMS, but data is not considered … | |
Re: Assuming your using Intel or AMD rotate right or left with carry (RCR or RCL) respectively into any of the general purpose registers or even memory. | |
Re: > .Is it really worth learning assembly language? No. I am an assembly only programmer at the lowest level, not using macros or any higher level extensions specifically. As a hobbiest and a good dose of nostalgia mixed in as my first ASM attempt was in 1978, I can afford … | |
I'm pretty comfortable with "C", but where I lack, is understanding what types of options must be passed to compiler to produce the tightest code possible. Here is an example of a formula in "C"; int ADDR = VIDEO_BASE + (WND_X + POS_X) + ((WND_Y + POS_Y) * SCR_X) * … | |
Re: Excerpt from Intel's manual > Divides the (signed) value in the AX, DX:AX, or EDX:EAX (dividend) by the source operand (divisor) and stores the result in the AX (AH:AL), DX:AX, or EDX:EAX registers. The source operand can be a general-purpose register or a memory location. The action of this instruction … | |
Re: The [X86](http://en.wikipedia.org/wiki/X86) processor has two fundemantal modes, [Real](http://en.wikipedia.org/wiki/Real_mode) & [Protected](http://en.wikipedia.org/wiki/Protected_mode). There are 4 other [modes](http://en.wikipedia.org/wiki/Category:X86_operating_modes) derived from these and unreal or as you put it unprotected is one, or maybe you meant real mode. At this point in time and assuming you're very novice I wouldn't delve into this too … | |
Re: What you need to do is write the input algo yourself. What you've done is taken the disassembly from something or someone else and tried to make it look like your own work. This example wouldn't even compile. | |
This code will not work on EMU8086 or any processor prior to 80286. Line 40 would need to be changed. | |
Re: ASSUME esi : ptr workers mov ebx, [esi:idnum] - or - mov ebx, [esi: Employee:idnumb] ASSSUME esi : nothing Been quite sometime since I've used MASM, so the move may not be exactly right, but should get you started in the right direction. | |
Re: There is nothing wrong with the calculation part global _start section .const Sum dd 0 section .text _start mov ecx, 4 xor eax, eax .L0 mov bx, 1 shl bx, cl add eax, ebx dec ecx jnz .L0 cmp eax, 30 ; Result in EAX is 1EH .Done xor rdi, … | |
Re: The difference between upper and lower case in ASCII characters is bit 5. "D" = 44H = 0100 0100 "d" = 64H = 0110 0100 So striping bit 5 converts to upper and setting bit 5 converts to lower mov al, 64H ; AL = "d" and al, 5FH ; … | |
Re: Actually, it is X86 and more specifically MASM for windows. I don't have a machine to compile and test, but the best advice I have is trace through to line 101 and see if your returned an integer atom. If not you know one of the values is wrong in … | |
Re: In lines 13 & 14, what you want to be doing is incrementing the pointer, not adding two to the contents of where they are pointing. add si, 2 add di, 2 or inc si inc si inc di inc di then cmp di, arr_e | |
Re: Assume AX = 4423H 1: Move AX -> CX 2: Shift AH -> AL 3: Shift CL -> CH 4: Move CH -> AH BSWAP assuming your using Intel converts edian values, but what you require isn't exactly an edian conversion. | |
Re: This may help you out http://www.pages.drexel.edu/~kws23/tutorials/PICTutorial/PICTutorial.html | |
Re: At line 37, you need to covert the value in AL to a digit. See examples of converting Binary to ASCII. Simply, a value of 9 lets say in AL needs to be 39H so it will display as the digit 9. Otherwise it's interpreted on most systems as TAB. | |
Re: Depends which assember your using. In NASM lines 1 & 2 are ok, but 3 needs to be qualified with MOV **WORD** [SI], 2000H. In MASM all need be qualified with MOV **WORD PTR** SI,DS. | |
Re: What are you converting to. This 20 bit value have these equivalents. Bin: 1001 1100 1111 0110 1010 Hex: 9CF6A Oct: 2347552 Dec: 642922 The loop for all these is much the same, it's how the result is converted to ASCII is quite a bit different for each. | |
Re: What I usually do with any application or procedure is work from the outside in. So in your example I would have a title prompt that only shows up once and then a loop that would allow multiple entries. global _start section .text _start: call MainPrompt push 0 .L0: call … | |
Re: Without knowing what X, Y, V & Z are, I'm going to assume 32 bit integers Source is NASM V dd 1 Z dd 1 ; EAX = "X" ; ECX = "Y" cmp eax, ecx ja .L1 cmp ecx, [V] jnz .Done call Path1 jmp .Done .L1 cmp eax, … | |
Re: Unless getPos does something special with return, lines 1-2, 5-6 and 9-10 will not work unless you did something like this. call getPos jmp $ + 4 M1 dw ? mov` ax, M1 Show me the code for ioSubs.inc and I'll show you a much simpler way of doing this. | |
Re: Interesting. You wrote a 183 line program, but yet you don't understand how CHANGE works. Anyway, conversion is required because the digits you seen on the screen do not have the same internal representation as thier binary value, but in the low nibble there is a similarity, meaning; '0' = … | |
Re: What did you enter and what were the results? | |
Re: Which OS? Linux, Windows (XP, 7), OSX (Leopard, Tiger) etc. Which Assembler, NASM, MASM, GOASM, FLATASM Show the code you were trying to assemble also and make sure to use the code button above to include it. | |
| |
Re: I can help you with this problem, but there are several inconsistencies to deal with first. 1:) Formula: > b + 2(3a - 4c) + 5 So how does **d** (line 7) & **x** (line 9) fit into the scheme of things. and > a + (b + (c + … | |
Re: Boy, you are at a college that is touting itself as being on top of the latest technology and they are using DOS 1.0. Let's just fix one piece at a time. Zero is not the same as the digit zero '0'. As a matter of fact, it happens to … | |
Is there an option that can be passed to GDB to make it happy with callee cleaning up stack. push eax push rbp push 0 call AddVals ret AddVals enter 28, 0 ;... Bunch of code leave ret 24 1) If I single step "si" into AddVals and right through … | |
Re: In principal you have the idea. If you plan on doing a lot of ASM, you may want to consider this example. This is a generic input routine not unlike function 10 in INT 21H. Even though 64 bit Linux, the principal is the same not matter the platform. Here … | |
Re: In GDB you can see where a string is located (gdb) **x/s &msg** Another thing you can do is **objdump -ds -Mintel** <*your program name*> in command line and the result on my system being 64bit is; Test1: file format elf64-x86-64 Contents of section .text: 4000b0 ba0e0000 00b9d000 6000bb01 000000b8 … | |
Source code **NASM** on **Ubuntu 12.04** This demonstrates Input/Output algos using syscall and how they can be implemented in a fairly condensed loop. These routine do not conform to any specific call convention and without modification won't interface with higher level languages. My code is stand alone assembly and doesn't … | |
# Show # This procedure doesn't conform to any particular calling convention. It is designed specifically to work with other subroutines designed by me. Any of my examples won't be using and standard library functions either. Not because I think they are inadequate, but rather give me complete independence and … |
The End.