Thread: arm assembley instruction BAL

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

    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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

  3. #3
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    132
    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, 06:12 PM
  5. Assembley
    By Xterria in forum C++ Programming
    Replies: 5
    Last Post: 08-30-2001, 01:27 PM