arm assembley instruction BAL

This is a discussion on arm assembley instruction BAL within the Tech Board forums, part of the Community Boards category; Code: loop: CMP R1,#0 SUB R1,R1,#1 LDR R4,[R2] ADD R3,R3,R4 ADD R2,R2,#4 BAL loop DoneLoop: swi 0x11 What does BAL ...

  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    116

    arm assembley instruction BAL

    Code:
    loop:
    	CMP	R1,#0		
    	SUB	R1,R1,#1	
    	LDR	R4,[R2]	
    	ADD	R3,R3,R4	
    	ADD	R2,R2,#4	
    	BAL	loop
    DoneLoop:
    	swi	0x11
    What does BAL do?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,535
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    116
    Damn that took a lot of googling. In ARM BAL means branch always.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. x86 Instruction SBB
    By Aleck_pl in forum C Programming
    Replies: 6
    Last Post: 04-10-2009, 04:43 PM
  2. INT n instruction in C Program
    By raghu2383 in forum C Programming
    Replies: 5
    Last Post: 08-24-2008, 03:08 AM
  3. ASM with MOV instruction.
    By kinghajj in forum Tech Board
    Replies: 6
    Last Post: 10-14-2003, 12:41 AM
  4. i want to print number on scrren via assembley
    By planet_abhi in forum C Programming
    Replies: 2
    Last Post: 03-26-2003, 05:12 PM
  5. Assembley
    By Xterria in forum C++ Programming
    Replies: 5
    Last Post: 08-30-2001, 01:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21