m2_vwf.print_string now returns number of pixels rendered

This commit is contained in:
jeffman 2017-03-25 20:13:54 -04:00
parent 9762910926
commit fb0b7e72c8
1 changed files with 5 additions and 2 deletions

View File

@ -95,13 +95,15 @@ pop {r0-r5,pc}
// r2: y (pixel) // r2: y (pixel)
// Out: // Out:
// r0: number of characters printed // r0: number of characters printed
// r1: number of pixels printed
//============================================================================= //=============================================================================
.print_string: .print_string:
push {r1-r5,lr} push {r2-r6,lr}
mov r3,#0 mov r3,#0
mov r5,r3 mov r5,r3
mov r6,r1
mov r4,r0 mov r4,r0
- -
ldrb r0,[r4,#1] ldrb r0,[r4,#1]
@ -117,7 +119,8 @@ b -
.print_string_end: .print_string_end:
mov r0,r5 mov r0,r5
pop {r1-r5,pc} sub r1,r1,r6
pop {r2-r6,pc}
//============================================================================= //=============================================================================