Search Results

Search found 302 results on 13 pages for 'assembler'.

Page 1/13 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How Do You Make An Assembler?

    - by mudge
    I'd like to make a simple x86 assembler. I'm wondering if there's any tutorials for making your own assembler. Or if there's a simple assembler that I could study. Also, I wonder what tools are used in looking at and handling the binary/hex of programs.

    Read the article

  • What are the limitations of assembler? (NASM)

    - by citronas
    Is there a technical limitation of what kind of programs I can write with assembler (NASM)? For now I've only seem some program that do arithmetic operations, like adding two numbers. Is it possible to write complex assembler programs, that provide a GUI, access the file system, plays sounds et cetera? I know I wouldn't write such programs, but I'm curious, if there are technical limitations on what kind of programs I can write with assembler.

    Read the article

  • Add two 32-bit integers in Assembler for use in VB6

    - by Emtucifor
    I would like to come up with the byte code in assembler (assembly?) for Windows machines to add two 32-bit longs and throw away the carry bit. I realize the "Windows machines" part is a little vague, but I'm assuming that the bytes for ADD are pretty much the same in all modern Intel instruction sets. I'm just trying to abuse VB a little and make some things faster. So... if the string "8A4C240833C0F6C1E075068B442404D3E0C20800" is the assembly code for SHL that can be "injected" into a VB6 program for a fast SHL operation expecting two Long parameters (we're ignoring here that 32-bit longs in VB6 are signed, just pretend they are unsigned), what is the hex string of bytes representing assembler instructions that will do the same thing to return the sum? The hex code above for SHL is, according to the author: mov eax, [esp+4] mov cl, [esp+8] shl eax, cl ret 8 I spit those bytes into a file and tried unassembling them in a windows command prompt using the old debug utility, but I figured out it's not working with the newer instruction set because it didn't like EAX when I tried assembling something but it was happy with AX. I know from comments in the source code that SHL EAX, CL is D3E0, but I don't have any reference to know what the bytes are for instruction ADD EAX, CL or I'd try it. I tried flat assembler and am not getting anything I can figure out how to use. I used it to assemble the original SHL code and got a very different result, not the same bytes. Help?

    Read the article

  • Solaris Tips : Assembler, Format, File Descriptors, Ciphers & Mount Points

    - by Giri Mandalika
    .roundedcorner { border:1px solid #a1a1a1; padding:10px 40px; border-radius:25px; } .boxshadow { padding:10px 40px; box-shadow: 10px 10px 5px #888888; } 1. Most Oracle software installers need assembler Assembler (as) is not installed by default on Solaris 11.      Find and install eg., # pkg search assembler INDEX ACTION VALUE PACKAGE pkg.fmri set solaris/developer/assembler pkg:/developer/[email protected] # pkg install pkg:/developer/assembler Assembler binary used to be under /usr/ccs/bin directory on Solaris 10 and prior versions.      There is no /usr/ccs/bin on Solaris 11. Contents were moved to /usr/bin 2. Non-interactive retrieval of the entire list of disks that format reports If the format utility cannot show the entire list of disks in a single screen on stdout, it shows some and prompts user to - hit space for more or s to select - to move to the next screen to show few more disks. Run the following command(s) to retrieve the entire list of disks in a single shot. format 3. Finding system wide file descriptors/handles in use Run the following kstat command as any user (privileged or non-privileged). kstat -n file_cache -s buf_inuse Going through /proc (process filesystem) is less efficient and may lead to inaccurate results due to the inclusion of duplicate file handles. 4. ssh connection to a Solaris 11 host fails with error Couldn't agree a client-to-server cipher (available: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour) Solution: add 3des-cbc to the list of accepted ciphers to sshd configuration file. Steps: Append the following line to /etc/ssh/sshd_config Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,\ arcfour,3des-cbc Restart ssh daemon svcadm -v restart ssh 5. UFS: Finding the last mount point for a device fsck utility reports the last mountpoint on which the filesystem was mounted (it won't show the mount options though). The filesystem should be unmounted when running fsck. eg., # fsck -n /dev/dsk/c0t5000CCA0162F7BC0d0s6 ** /dev/rdsk/c0t5000CCA0162F7BC0d0s6 (NO WRITE) ** Last Mounted on /export/oracle ** Phase 1 - Check Blocks and Sizes ... ...

    Read the article

  • What Are Some Advantages/Disadvantages of Using C over Assembly?

    - by Daniel
    I'm currently studying engineering in Telecommunications and Electronics and we have migrated from assembler to C in microprocessor programming. I have doubts that this is a good idea. What are some advantages and disadvantages of C compared to assembly? The advantages/disadvantages I see are: Advantages: I can tell that C syntax is a lot easier to learn than Assembler syntax. C is easier to use for making more complex programs. Learning C is somehow more productive than learning assembler cause there is more developing stuff around C than Assembler. Disadvantages: Assembler is a lower level programming language than C,so this makes it a good for programming directly to hardware. Is a lot more flexible alluding you to work with memory,interrupts,micro-registers,etc.

    Read the article

  • output byte value in assembler

    - by altvali
    I'm a bit ashamed about asking this, but how do i output the value of a byte in assembler? Suppose I have the number 62 in the AL register. I'm targeting an 8086. There seem to be available only interrupts that output it's ascii value.

    Read the article

  • General confusion with assembler

    - by gnrlcf
    So I took a look at the x86 assembly language; All the commands are pretty clear but: I don't see anything that can actually trigger something in the computer like: Access RAM and not only CPU registers, read from the HDD, etc. How do you go beyond computations in the CPU with assembler?

    Read the article

  • Android.mk - How to assemble and link ARM assembler files

    - by Kim
    Hi, I have some *.cpp source files and some *.s ARM assembler files I want to assemble and link in my Android.mk file (by running ndk-build script). My Android.mk file looks like this: LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_ARM_MODE := arm LOCAL_MODULE := libTestJNI LOCAL_SRC_FILES := Test.cpp TestAS_gas4.s LOCAL_CFLAGS := -DHAVE_CONFIG_H -DFPM_ARM -ffast-math -O3 -DOPT_ARM LOCAL_LDLIBS += -llog include $(BUILD_SHARED_LIBRARY) Unfortunately the .s file is not recognized. ndk-build says: Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup make: ** No rule to make target /cygdrive/c/projects/TestAS_gas4.s', needed by/cygdrive/c/projects/obj/local/armeabi/objs-debug/libTestJNI/TestAS_gas4.o'. Stop. In a "normal" makefile I would have to assemble by using "as" in a rule. How is it done in the Android.mk files? /Kim

    Read the article

  • Intel Assembler optimization

    - by Søren Haagerup
    I'm currently trying to optimize the code emitted from a home-made compiler, for a home-made language. I've tried out Intel VTune to see where the bottlenecks are: http://www.imada.sdu.dk/~sorenh07/misc/vtune-assembly-optimization.png I find it very impressive that a "subl"-instruction is responsible for over 38% of the clockticks in a program running for 30-90 seconds! Can anybody give an explanation why? The "optimization report" feature in VTune apparently doesn't exist for programs not compiled with icc. Does there exist a program which suggests optimization for assembler code? (that is, not code coming from a high-level language).

    Read the article

  • x86 assembler question

    - by b-gen-jack-o-neill
    Hi, I have 2 simple, but maybe tricky questions. Let´s say I have assembler instruction: MOV EAX,[ebx+6*7] - what I am curious is, does this instruction really actually translates into opcode as it stands,so computation of code in brackets is encoded into opcode, or is this just pseudo intruction for compiler, not CPU, so that compiler before computes the value in brackets using add mul and so, store outcome in some reg and than uses MOV EAX,reg with computed value? Just to be clear, I know the output will be the same. I am interested in execution. Second is about LEA instruction. I know what it does, but I am more interested wheather its real instruction, so compiles does not further change it, just make it into opcode as it stands, or just pseudo code for compiler to, again, first compute adress and than store it.

    Read the article

  • Illegal instruction gcc assembler.

    - by Bernt
    In assembler: .globl _test _test: pushl %ebp movl %esp, %ebp movl $0, %eax pushl %eax popl %ebp ret Calling from c main() { _test(); } Compile: gcc -m32 -o test test.c test.s This code gives me illegal instruction sometimes and segment fault other times. In gdc i always get illegal instruction, this is just a simple test, i had a larger program that was working and suddenly after no apperant reason stopped working, now i always get this error even if i start from scratch like above. I have narrowed it down to pushl %eax (or any other register....), if i comment out that line the code runs fine. Any ideas? (I'm running the program at my universities linux cluster, so I have not changed any settings..)

    Read the article

  • Choosing between assembler and COBOL

    - by Azares Cob
    I have to rewrite and greatly modify parts of a legacy COBOL application. The COBOL source-code is available (around 100.000 lines of copy & pasted code mixed with GOTOs). Some more details on the system: It is a general management system controlling transactions, bank management, customer data and employees of the company I work for. The COBOL-powered database is about 4 Terabytes distributed over 50 old HDDs. (But messing around with them is the sysadmins job) They are using COBOL85 only. Now I have two options: Rewrite and refactor 50% of the old COBOL system, or use X86 assembly. Should I use X86 assembler or COBOL?

    Read the article

  • Building ARM assembler vorbis decoder lib 'Tremolo' for iPhone

    - by Joachim Bengtsson
    I'm trying to compile Tremolo for iPhone. I've pulled in the files bitwise.c bitwiseARM.s codebook.c dpen.s dsp.c floor0.c floor1.c floor1ARM.s floor_lookup.c framing.c info.c mapping0.c mdct.c mdctARM.s misc.c res012.c into a new target, added the following custom settings: GCC_PREPROCESSOR_DEFINITIONS = _ARM_ASSEM_ GCC_C_LANGUAGE_STANDARD = gnu99 GCC_THUMB_SUPPORT = YES ... but as soon as xcode reaches the first assembler file, bitwiseARM.s, I get errors like these: /tremolo/bitwiseARM.s:3:Unknown pseudo-op: .global /tremolo/bitwiseARM.s:3:Rest of line ignored. 1st junk character valued 111 (o). /tremolo/bitwiseARM.s:4:Unknown pseudo-op: .global /tremolo/bitwiseARM.s:4:Rest of line ignored. 1st junk character valued 111 (o). /tremolo/bitwiseARM.s:5:Unknown pseudo-op: .global /tremolo/bitwiseARM.s:5:Rest of line ignored. 1st junk character valued 111 (o). /tremolo/bitwiseARM.s:6:Unknown pseudo-op: .global /tremolo/bitwiseARM.s:6:Rest of line ignored. 1st junk character valued 111 (o). /tremolo/bitwiseARM.s:11:bad instruction `STMFD r13!,{r10,r11,r14}' /tremolo/bitwiseARM.s:12:bad instruction `LDMIA r0,{r2,r3,r12}' /tremolo/bitwiseARM.s:16:bad instruction `SUBS r2,r2,r1' /tremolo/bitwiseARM.s:17:bad instruction `BLT look_slow' /tremolo/bitwiseARM.s:19:bad instruction `LDR r10,[r3]' The first error I could google, and changing .global to .globl fixed the first errors, but I still get the bad instructions, and I don't get why. Googling for the ARM instruction set, the above instructions look valid to me. I've tried toggling thumb support, and building for just armv7 instead of armv6, but neither helped.

    Read the article

  • Printf in assembler doesn't print

    - by Gaim
    Hi there, I have got a homework to hack program using buffer overflow ( with disassambling, program was written in C++, I haven't got the source code ). I have already managed it but I have a problem. I have to print some message on the screen, so I found out address of printf function, pushed address of "HACKED" and address of "%s" on the stack ( in this order ) and called that function. Called code passed well but nothing had been printed. I have tried to simulate the environment like in other place in the program but there has to be something wrong. Do you have any idea what I am doing wrong that I have no output, please? Thanks a lot EDIT: This program is running on Windows XP SP3 32b, written in C++, Intel asm there is the "hack" code CPU Disasm Address Hex dump Command Comments 0012F9A3 90 NOP ;hack begins 0012F9A4 90 NOP 0012F9A5 90 NOP 0012F9A6 89E5 MOV EBP,ESP 0012F9A8 83EC 7F SUB ESP,7F ;creating a place for working data 0012F9AB 83EC 7F SUB ESP,7F 0012F9AE 31C0 XOR EAX,EAX 0012F9B0 50 PUSH EAX 0012F9B1 50 PUSH EAX 0012F9B2 50 PUSH EAX 0012F9B3 89E8 MOV EAX,EBP 0012F9B5 83E8 09 SUB EAX,9 0012F9B8 BA 1406EDFF MOV EDX,FFED0614 ;address to jump, it is negative because there mustn't be 00 bytes 0012F9BD F7DA NOT EDX 0012F9BF FFE2 JMP EDX ;I have to jump because there are some values overwritten by the program 0012F9C1 90 NOP 0012F9C2 0090 00000000 ADD BYTE PTR DS:[EAX],DL 0012F9C8 90 NOP 0012F9C9 90 NOP 0012F9CA 90 NOP 0012F9CB 90 NOP 0012F9CC 6C INS BYTE PTR ES:[EDI],DX ; I/O command 0012F9CD 65:6E OUTS DX,BYTE PTR GS:[ESI] ; I/O command 0012F9CF 67:74 68 JE SHORT 0012FA3A ; Superfluous address size prefix 0012F9D2 2069 73 AND BYTE PTR DS:[ECX+73],CH 0012F9D5 203439 AND BYTE PTR DS:[EDI+ECX],DH 0012F9D8 34 2C XOR AL,2C 0012F9DA 2066 69 AND BYTE PTR DS:[ESI+69],AH 0012F9DD 72 73 JB SHORT 0012FA52 0012F9DF 74 20 JE SHORT 0012FA01 0012F9E1 3120 XOR DWORD PTR DS:[EAX],ESP 0012F9E3 6C INS BYTE PTR ES:[EDI],DX ; I/O command 0012F9E4 696E 65 7300909 IMUL EBP,DWORD PTR DS:[ESI+65],-6F6FFF8D 0012F9EB 90 NOP 0012F9EC 90 NOP 0012F9ED 90 NOP 0012F9EE 31DB XOR EBX,EBX ; hack continues 0012F9F0 8818 MOV BYTE PTR DS:[EAX],BL ; writing 00 behind word "HACKED" 0012F9F2 83E8 06 SUB EAX,6 0012F9F5 50 PUSH EAX ; address of "HACKED" 0012F9F6 B8 3B8CBEFF MOV EAX,FFBE8C3B 0012F9FB F7D0 NOT EAX 0012F9FD 50 PUSH EAX ; address of "%s" 0012F9FE B8 FFE4BFFF MOV EAX,FFBFE4FF 0012FA03 F7D0 NOT EAX 0012FA05 FFD0 CALL EAX ;address of printf This code is really ugly because I am new in assembler and there mustn't be null bytes because of buffer-overflow bug

    Read the article

  • MIPS Assembler Instruction parameters

    - by Martin K.
    Hi, why does such a instruction as mul $t1, $v0 , 4 evaluates as expected. But mul $t1, 4 , $v0 results in a syntax error! I wonder why the first one works, because mul only works with registers per default, so I expect that only a solution like this will be workin li $t1, 4 # set $t1 = 4 mul $t1, $v0 , $t1 # set $t1 = 4 * n I'm using the SPIM simulator.

    Read the article

  • variables in assembler

    - by stupid_idiot
    hi, i know this is kinda retarded but I just can't figure it out. I'm debugging this: xor eax,eax mov ah,[var1] mov al,[var2] call addition stop: jmp stop var1: db 5 var2: db 6 addition: add ah,al ret the numbers that I find on addresses var1 and var2 are 0x0E and 0x07. I know it's not segmented, but that ain't reason for it to do such escapades, because the addition call works just fine. Could you please explain to me where is my mistake?

    Read the article

  • Question on Addressing Modes in PDP-11 Assembler

    - by lego69
    I have small question about pdp-11(simulator), I have this command (it begins from the address 1000) add 2500, #2500 and this initial list: register/address - initial value pc 1000 sp 600 2500 3000 and I want to know how this small snippet exactly runs, in my booklet I found that: firstly it reads inforamtion from the address 1000, inside this address we have value 066727, after we read number from the address 1002, AND VALUE MUST BE 2500(because of add 2500, #2500), but in my booklet I have 1474 without any explanations why, I know that I have here relative addressing mode, but why 1474 inside the address 1002 and not 2500, thanks in advance for any help

    Read the article

  • Electronic resources for learning Z/OS assembler?

    - by Jared
    This is a follow up to this question. I'm totally blind so printed books aren't an option. All the recommended books appear to have been published before electronic publishing got started. I've been able to learn the very basics but would like something between here's what a register is, and the IBM reference material. Searching the normal places like Safari Books Online has come up dry.

    Read the article

  • Choosing the right and learning assembler for compiler-writing

    - by X A
    I'm writing a compiler and I have gone through all the steps (tokenizing, parsing, syntax tree structures, etc.) that they show you in all the compiler books. (Please don't comment with the link to the "Resources for writing a compiler" question!). I have chosen to use NASM together with alink as my backend. Now my problem is: I just can't find any good resources for learning NASM and assembly in general. The wikibook (german) on x86 assembly is horrible. They don't even explain the code they write there, I currently can't even get simple things like adding 1 to 2 and outputting the result working. Where can I learn NASM x86 assembly?

    Read the article

  • When is assembler faster than C?

    - by Adam Bellaire
    One of the stated reasons for knowing assembler is that, on occasion, it can be employed to write code that will be more performant than writing that code in a higher-level language, C in particular. However, I've also heard it stated many times that although that's not entirely false, the cases where assembler can actually be used to generate more performant code are both extremely rare and require expert knowledge of and experience with assembler. This question doesn't even get into the fact that assembler instructions will be machine-specific and non-portable, or any of the other aspects of assembler. There are plenty of good reasons for knowing assembler besides this one, of course, but this is meant to be a specific question soliciting examples and data, not an extended discourse on assembler versus higher-level languages. Can anyone provide some specific examples of cases where assembler will be faster than well-written C code using a modern compiler, and can you support that claim with profiling evidence? I am pretty confident these cases exist, but I really want to know exactly how esoteric these cases are, since it seems to be a point of some contention.

    Read the article

  • What are good or interesting Assembler-like languages, but at a higher level?

    - by CodexArcanum
    I've been looking at L.in.oleum and am intrigued by it's mix of higher-level constructs (loops, dynamic variables) with low-level assembler power (registers). Are there other languages like Lino out there, which blend the speed of assembler with productivity enhancing features? EDIT: I realized this kind of sounds like an ad. I'm genuinely interested in other assembler-like languages, Lino is just the only one I happen to know of.

    Read the article

  • How to access C arrays from assembler for Windows x64?

    - by 0xdword32
    I've written an assembler function to speed up a few things for image processing (images are created with CreateDIBSection). For Win32 the assembler code works without problems, but for Win64 I get a crash as soon as I try to access my array data. I put the relevant info in a struct and my assembler function gets a pointer to this struct. The struct pointer is put into ebx/rbx and with indexing I read the data from the struct. Any idea what I am doing wrong? I use nasm together with Visual Studio 2008 and for Win64 I set "default rel". C++ code: struct myData { tUInt32 ulParam1; void* pData; }; CallMyAssemblerFunction(&myData); Assembler Code: Win32: ... push ebp; mov ebp,esp mov ebx, [ebp + 8]; pointer to our struct mov eax, [ebx]; ulParam1 mov esi, [ebx + 4]; pData, 4 byte pointer movd xmm0, [esi]; ... Win64: ... mov rbx, rcx; pointer to our struct mov eax, [rbx]; ulParam1 mov rsi, [rbx + 4]; pData, 8 byte pointer movd xmm0, [rsi]; CRASH! ...

    Read the article

  • What is technically more advanced: Brainf*ck or Assembler?

    - by el ka es
    I wondered which of these languages is more powerful. With powerful I don't mean the readability, assembler would be naturally the winner here, but something resulting from, for example, the following factors: Which of them is more high-level? (Both aren't really but one has to be more) Who would be the possibly fastest in compiled state? (There is no BF compiler out there as far as I know but it wouldn't be hard writing one I suppose) Which of the both has the better code length/code action ratio? What I mean is If you get to distracted by the, compared to Brainf*ck, improved readability of assembler, just think of writing plain binary/machine code as what assembler assembles to. Both languages are so basic that it should be possible to answer the question(s) in a rather objective view, I hope.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >