Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

5.2.4.  Clearing BSS

BSS is the area of memory used to hold static variables which must be initialized to zero. Its start and end are defined by two variables from the linker/loader, __bss_start and end respectively.

        l.movhi r28,hi(__bss_start)
        l.ori   r28,r28,lo(__bss_start)
        l.movhi r30,hi(end)
        l.ori   r30,r30,lo(end)

.L1:
        l.sw    (0)(r28),r0
        l.sfltu r28,r30
        l.bf    .L1
        l.addi  r28,r28,4
	  
Embecosm divider strip