Rev 7 | Rev 138 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
@@@ Copyright 2010 TheSeven@@@ This file is part of emBIOS.@@ emBIOS is free software: you can redistribute it and/or@ modify it under the terms of the GNU General Public License as@ published by the Free Software Foundation, either version 2 of the@ License, or (at your option) any later version.@@ emBIOS is distributed in the hope that it will be useful,@ but WITHOUT ANY WARRANTY; without even the implied warranty of@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.@ See the GNU General Public License for more details.@@ You should have received a copy of the GNU General Public License@ along with emBIOS. If not, see <http://www.gnu.org/licenses/>.@@.section .icode.renderbmp, "ax", %progbits.align 2.global renderbmp.type renderbmp, %functionrenderbmp:ldrh r3, [r1]sub r3, r3, #0x4d00subs r3, r3, #0x42movne pc, lrstmfd sp!, {r4,lr}ldrh r4, [r1,#18]ldrh r12, [r1,#20]orr r4, r4, r12,lsl#16ldrh r3, [r1,#22]ldrh r12, [r1,#24]orr r3, r3, r12,lsl#16ldrh lr, [r1,#10]ldrh r12, [r1,#12]orr lr, lr, r12,lsl#16add r1, r1, lrmov r12, #352mul lr, r12, r3add r0, r0, lrrenderbmp_row:mov r12, r4sub r0, r0, r2renderbmp_pixel:ldrb lr, [r1,#1]strb lr, [r0], #1ldrb lr, [r1], #2strb lr, [r0], #1subs r12, r12, #1bne renderbmp_pixeltst r4, #1addne r1, r1, #2sub r0, r0, r4,lsl#1subs r3, r3, #1bne renderbmp_rowldmfd sp!, {r4,pc}.size renderbmp, .-renderbmp.section .icode.renderchar, "ax", %progbits.align 2.global renderchar.type renderchar, %functionrenderchar:stmfd sp!, {r4-r7,lr}ldr r7, [sp,#0x14]cmn r2, #1beq renderchar_nobgmov r6, r0mov r4, #8mov lr, r2,lsr#16sub lr, lr, #0xff00subs lr, lr, #0xffbne renderchar_opaquerowmov r12, r2,lsl#16mov r12, r12,lsr#16renderchar_blendrow:mov r5, #6renderchar_blendcol:ldrh lr, [r6]tst lr, #1orrne lr, lr, #0x10000mov lr, lr,lsr#1bic lr, lr, #0x1000bic lr, lr, #0x84add lr, lr, r12strh lr, [r6], #2subs r5, r5, #1bne renderchar_blendcoladd r6, r6, r7sub r6, r6, #12subs r4, r4, #1bne renderchar_blendrowb renderchar_nobgrenderchar_opaquerow:mov r5, #6renderchar_opaquecol:strh r2, [r6], #2subs r5, r5, #1bne renderchar_opaquecoladd r6, r6, r7sub r6, r6, #12subs r4, r4, #1bne renderchar_opaquerowrenderchar_nobg:adr r5, renderchar_fontsub r3, r3, #0x20cmp r3, #0x5faddcc r5, r3,lsl#2addcc r5, r3mov r3, #5renderchar_col:mov r6, r0ldrb r4, [r5], #1renderchar_row:tst r4, #1strneh r1, [r6]add r6, r6, r7movs r4, r4,lsr#1bne renderchar_rowadd r0, r0, #2subs r3, r3, #1bne renderchar_coladd r0, r0, #2ldmfd sp!, {r4-r7,pc}renderchar_font:.byte 0, 0, 0, 0, 0.byte 0, 0, 95, 0, 0.byte 0, 7, 0, 7, 0.byte 20, 127, 20, 127, 20.byte 36, 42, 127, 42, 18.byte 35, 19, 8, 100, 98.byte 54, 73, 85, 34, 80.byte 5, 3, 0, 0, 0.byte 28, 34, 65, 0, 0.byte 0, 0, 65, 34, 28.byte 20, 8, 62, 8, 20.byte 8, 8, 62, 8, 8.byte 0, -96, 96, 0, 0.byte 8, 8, 8, 8, 8.byte 0, 96, 96, 0, 0.byte 32, 16, 8, 4, 2.byte 62, 81, 73, 69, 62.byte 0, 66, 127, 64, 0.byte 66, 97, 81, 73, 70.byte 33, 65, 69, 75, 49.byte 24, 20, 18, 127, 16.byte 39, 69, 69, 69, 57.byte 60, 74, 73, 73, 48.byte 1, 113, 9, 5, 3.byte 54, 73, 73, 73, 54.byte 6, 73, 73, 41, 30.byte 0, 54, 54, 0, 0.byte 0, 86, 54, 0, 0.byte 8, 20, 34, 65, 0.byte 20, 20, 20, 20, 20.byte 0, 65, 34, 20, 8.byte 2, 1, 81, 9, 6.byte 50, 73, 121, 65, 62.byte 124, 18, 17, 18, 124.byte 127, 73, 73, 73, 62.byte 62, 65, 65, 65, 34.byte 127, 65, 65, 34, 28.byte 127, 73, 73, 73, 65.byte 127, 9, 9, 9, 1.byte 62, 65, 73, 73, 58.byte 127, 8, 8, 8, 127.byte 0, 65, 127, 65, 0.byte 32, 64, 65, 63, 1.byte 127, 8, 20, 34, 65.byte 127, 64, 64, 64, 64.byte 127, 2, 12, 2, 127.byte 127, 4, 8, 16, 127.byte 62, 65, 65, 65, 62.byte 127, 9, 9, 9, 6.byte 62, 65, 81, 33, 94.byte 127, 9, 25, 41, 70.byte 38, 73, 73, 73, 50.byte 1, 1, 127, 1, 1.byte 63, 64, 64, 64, 63.byte 31, 32, 64, 32, 31.byte 127, 32, 24, 32, 127.byte 99, 20, 8, 20, 99.byte 3, 4, 120, 4, 3.byte 97, 81, 73, 69, 67.byte 0, 127, 65, 65, 0.byte 2, 4, 8, 16, 32.byte 0, 65, 65, 127, 0.byte 4, 2, 1, 2, 4.byte 64, 64, 64, 64, 64.byte 1, 2, 4, 0, 0.byte 32, 84, 84, 84, 120.byte 127, 68, 68, 68, 56.byte 56, 68, 68, 68, 40.byte 56, 68, 68, 68, 127.byte 56, 84, 84, 84, 24.byte 8, 126, 9, 1, 2.byte 8, 84, 84, 84, 60.byte 127, 4, 4, 4, 120.byte 0, 68, 125, 64, 0.byte 32, 64, 64, 61, 0.byte 127, 16, 40, 68, 0.byte 0, 65, 127, 64, 0.byte 124, 4, 24, 4, 120.byte 124, 8, 4, 4, 120.byte 56, 68, 68, 68, 56.byte 124, 20, 20, 20, 24.byte 8, 20, 20, 20, 124.byte 124, 8, 4, 4, 8.byte 72, 84, 84, 84, 32.byte 4, 63, 68, 64, 32.byte 60, 64, 64, 32, 124.byte 28, 32, 64, 32, 28.byte 60, 64, 56, 64, 60.byte 68, 40, 16, 40, 68.byte 12, 80, 80, 80, 60.byte 68, 100, 84, 76, 68.byte 0, 8, 54, 65, 0.byte 0, 0, 119, 0, 0.byte 0, 65, 54, 8, 0.byte 2, 1, 2, 4, 2.align 2.size renderchar, .-renderchar