- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 9
- Posts with Upvotes
- 9
- Upvoting Members
- 6
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: [code] mov ah,0ah lea dx,para_list ; DS:DX should point to buffer with ; first byte containing length int 21h mov thename,al ;On return from 21/0A AL=last char read ; usually the carriage return 0D [/code] A correct buffer used as a parameter to function 21/0A would have the following form: … | |
Re: JL or JB / JC ; Jump less-than or jump below JG or JA ; Jump greater-than or jump above The CMP instruction subtracts the dest-src from each other, and updates the FLAGS which can be tested by conditional jumps. For instance JB is equivalent to JC (Jump if CF … | |
Re: Creating a data structure in 8086 assembler is as simple as declaring any other data variables. [code] MYVAR1 DB 0 ; an 8-bit quantity FAR_OFF DW 0 ; a 32-bit far pointer FAR_SEG DW 0 ; Now for the mentioned data structure StudentId DW 0 ; this is also the … | |
Re: Resources on assembly placed on the web go way back, there is a lot to find. Recent: Programming From The Ground Up. X86 32-bit Assembly, AT&T Syntax, Under Linux. [url]http://savannah.nongnu.org/projects/pgubook/[/url] Power Basic, downloads on assembler X86. [url]http://www.powerbasic.com/support/downloads/assembler.htm[/url] Art Of Assembly. [url]http://webster.cs.ucr.edu/AoA/DOS/pdf/0_AoAPDF.html[/url] Old: Here is a list of the old files … | |
Re: Linux and Windows run on several different machine architectures to which they have been ported, assembly language programs are machine specific and cannot be garuanteed to run or properly assemble under another version of Linux or Windows. If a compatible assembler and library were used on systems of the same … | |
Re: This code worked for me... mov al, 182 ; Prepare the speaker for the out 43h, al ; note. mov ax, 4560 ; Frequency number (in decimal) ; for middle C. out 42h, al ; Output low byte. mov al, ah ; Output high byte. out 42h, al in al, … | |
Re: Describing the error or the output of the assembler makes it a bit easier for us to know where to look for an error in your code listing, sorry. | |
Re: Programs perform a lot of arithmetic in code, if reading human readable source code check for an abundance of these operators (+-*/) and () [] pairs, or look for red-tape directives such as #include .include include .i386, to identify the probability of the source-code being a valid program. | |
Re: It's pretty rudimentary stuff in any language to pair two strings together. The target buffer is the length of the two strings excluding the NULL characters +1 for the NULL terminator. Indexing is fundamental to an array of operations and this is one of them, maintain an index into the … | |
Re: This code builds a Small Model .EXE program, whick allocates several segments to the program, .stack 100h allocates a 256-byte stack segment and will initialize SS : SP when the .EXE header is read by the loader, the code: [code] mov ax, @data mov ds, ax [/code] is necessary to … | |
Re: When you say 32-bit and 64-bit computers do you mean the IA-32, IA-64, AMD-64, x86??? No matter anyways. A true 32-bit machine has 32-bit wide CPU registers, and also for true 64-bit machines their registers are 64-bits wide. The x86 line is backwards compatible and: Lower 16-bits are used in … | |
Re: You'd be right about that, MASM is an x86 assembler mainly used with MS-Windows and MS-DOS. It is apart of Visual Studio and was included with Microsoft C/C++ for DOS. MASM-32 these days is used for making Windows applications in assembler. At least, that's all I've used MASM-32 for. Under … | |
Re: ESI is a general purpose register, it does not care if it is set to the end of an array, in fact that is one of it's intended purposes: Example code, Set DirectionFlag to 1 to go from higher to lower address using MOVSW, ESI will be decremented by 2 … | |
Re: Each digit is a multiple of a power of ten. the 4th digit of 9,321 is 9*10^3. Sum each of these multiples of powers of ten (the base) and you'll have the binary equivalent of the value. If the digits were entered as ASCII subtract 30H (48d) to turn it … | |
Re: How are you accessing 32-bit registers without a prefix before going into protected mode? | |
Re: Function AH = 2C of the INT 21 Dos interrupt will return the current time. Seconds are returned in DH. Here is a simple expample of using this interrupt, it will print the ascii character 'A' every time a second has passed. This program is in a infinite loop, modify … | |
Re: BP+1 does sound odd due to the fact that this would refer only to the second byte of the subroutines return address, and because WORDs are pushed and popped off the stack, thus the indexes would normally be an even value when indexing into the stack. After setting up a … | |
Re: In contrast to regular re-iteration in a repetitive procedure a recursive function calls itself over and over again to perform its operation. It takes parameters just as any other function and has a condition upon which its recursion will stop. | |
Re: Do you mean the assembly language implementation of basicly an assembly language interpreter? That would be pretty long code... An example of such a program though would be the Ketman Assembly Language Tutorial, a 8086 tutorial and assembly language interpreter. Instruction format deals with the binary encoding of a processor's … | |
Re: The operand size attribute is apart of the instructions opcode and specifies 8-bit, 16-bit, or 32-bit operands. The IDTr register contains the 32-bit linear address of the Interrupt Descriptor Table and a 16-bit Limit Field, which specifies the number of entries in this table. Though 6 byte operands are not … | |
Re: Give me convience or give me death... This is 16-bit code, but it should give you the general idea, the LOOPZ will decrement CX even if the ZeroFlag is clear (no Zero Result), both LOOPZ and JCXZ are used to exit the loop, and LOOPZ is used to exit when … | |
Re: The previous contents of the accumulator AX is destroyed on each execution of DIVide. Hence your are dividing your divisor by your previous remainder and quotient in AX. That seems to me a bug. An 8-bit divisor will divide against a 16-bit Implicit Dividend in AX, after the division AH … | |
Re: To create a two-dimensional array is simple. Instead of a single index you will have two axises with which to index into your array. For a [50][25] do: Y * 25 + X, where 25 is the width or number of columns, Y is the row, X the column. | |
Re: MessageBox is a predefined window class, with one or more buttons, one window, and with a title and text. Try the Iczelion Win32 Assembly Language Tutorial. [code] .386 .model flat,stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc includelib \masm32\lib\kernel32.lib include \masm32\include\user32.inc includelib \masm32\lib\user32.lib .data MsgBoxCaption db "Hello",0 MsgBoxText db "Hello World!",0 … | |
Re: Offset means literally "displacement", an offset is added to an address. Each item in an array lies then at it's own offset. 'H' 'E' 'L' 'L' 'O', the first 'L' lies at offset 2 into the array, X0XXX1XXX2X This is because the offset is added to the beginning of the … | |
Re: BYTE PTR VAL, would correctly refer to a byte size storage location in MASM syntax, also BYTE PTR [VAL]. For performing computations the byte order of the values are irrelevant, and are transparent unless handled a byte at a time. Your code should have shown you that your double word … | |
Re: Headers - A C/C++ program is a compiled program, if by headers you mean prefixed program format information that is used by the operating systems loader, typically. Data Structures are just that, 'data'. They are interpreted by program code. If the executable is already compiled, you will have to reverse … | |
Re: I assume your using the linux API, due to your INT80 system calls. Any keystrokes read into the buffer should be printable. Check you parameters to the API calls. What is this? [code] mov ecx, msg2 ; number of output bytes bassically in segment.data [/code] You are loading the counter … | |
Re: Each hex digit represents a nibble. 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F Subtract 48 from the ASCII value, is it less than or equal to 9? If so shift it into the proper nibble. If not subtract 65 'A' or 97 'a' from the original value and add ten and shift into the proper nibble. … | |
Re: To make a bootable 1.44MB disk image, create a binary file exactly 1474560. The first 512 bytes of this image at the very beginning will be the Boot Record. Stack may not be initialized upon entry. If so set up your own stack. [code] mov ax, cs mov ss, ax … |