1; "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman 2; Ken Silverman's official web site: "http://www.advsys.net/ken" 3; See the included license file "BUILDLIC.TXT" for license info. 4; This file has been modified from Ken Silverman's original release 5 6%include "valgrind.inc" 7 8 SECTION .data 9 10%ifndef M_TARGET_LINUX 11%define ylookup _ylookup 12%define vince _vince 13%define vplce _vplce 14%define palookupoffse _palookupoffse 15%define bufplce _bufplce 16%define dc_iscale _dc_iscale 17%define dc_colormap _dc_colormap 18%define dc_count _dc_count 19%define dc_dest _dc_dest 20%define dc_source _dc_source 21%define dc_texturefrac _dc_texturefrac 22 23%define setupvlineasm _setupvlineasm 24%define prevlineasm1 _prevlineasm1 25%define vlineasm1 _vlineasm1 26%define vlineasm4 _vlineasm4 27 28%define setupmvlineasm _setupmvlineasm 29%define mvlineasm1 _mvlineasm1 30%define mvlineasm4 _mvlineasm4 31 32%define R_SetupDrawSlabA _R_SetupDrawSlabA 33%define R_DrawSlabA _R_DrawSlabA 34%endif 35 36EXTERN ylookup ; near 37 38EXTERN vplce ; near 39EXTERN vince ; near 40EXTERN palookupoffse ; near 41EXTERN bufplce ; near 42 43EXTERN dc_iscale 44EXTERN dc_colormap 45EXTERN dc_count 46EXTERN dc_dest 47EXTERN dc_source 48EXTERN dc_texturefrac 49 50 SECTION .text 51 52ALIGN 16 53GLOBAL setvlinebpl_ 54setvlinebpl_: 55 mov [fixchain1a+2], eax 56 mov [fixchain1b+2], eax 57 mov [fixchain2a+2], eax 58 mov [fixchain1m+2], eax 59 mov [fixchain2ma+2], eax 60 mov [fixchain2mb+2], eax 61 selfmod fixchain1a, fixchain2mb+6 62 63setdrawslabbpl: 64 mov dword [voxbpl1+2], eax 65 mov dword [voxbpl2+2], eax 66 mov dword [voxbpl3+2], eax 67 mov dword [voxbpl4+2], eax 68 mov dword [voxbpl5+2], eax 69 mov dword [voxbpl6+2], eax 70 mov dword [voxbpl7+2], eax 71 mov dword [voxbpl8+2], eax 72 selfmod voxbpl1, voxpl8+6 73 ret 74 75 SECTION .data 76 77lastslabcolormap: 78 dd 4 79 80 SECTION .text 81 82GLOBAL R_SetupDrawSlabA 83GLOBAL @R_SetupDrawSlabA@4 84R_SetupDrawSlabA: 85 mov ecx, [esp+4] 86@R_SetupDrawSlabA@4: 87 cmp [lastslabcolormap], ecx 88 je .done 89 mov [lastslabcolormap], ecx 90 mov dword [voxpal1+2], ecx 91 mov dword [voxpal2+2], ecx 92 mov dword [voxpal3+2], ecx 93 mov dword [voxpal4+2], ecx 94 mov dword [voxpal5+2], ecx 95 mov dword [voxpal6+2], ecx 96 mov dword [voxpal7+2], ecx 97 mov dword [voxpal8+2], ecx 98.done ret 99 100 101; pass it log2(texheight) 102 103ALIGN 16 104GLOBAL setupvlineasm 105setupvlineasm: 106 mov ecx, [esp+4] 107 108 ;First 2 lines for VLINEASM1, rest for VLINEASM4 109 mov byte [premach3a+2], cl 110 mov byte [mach3a+2], cl 111 112 mov byte [machvsh1+2], cl ;32-shy 113 mov byte [machvsh3+2], cl ;32-shy 114 mov byte [machvsh5+2], cl ;32-shy 115 mov byte [machvsh6+2], cl ;32-shy 116 mov ch, cl 117 sub ch, 16 118 mov byte [machvsh8+2], ch ;16-shy 119 neg cl 120 mov byte [machvsh7+2], cl ;shy 121 mov byte [machvsh9+2], cl ;shy 122 mov byte [machvsh10+2], cl ;shy 123 mov byte [machvsh11+2], cl ;shy 124 mov byte [machvsh12+2], cl ;shy 125 mov eax, 1 126 shl eax, cl 127 dec eax 128 mov dword [machvsh2+2], eax ;(1<<shy)-1 129 mov dword [machvsh4+2], eax ;(1<<shy)-1 130 selfmod premach3a, machvsh8+6 131 ret 132 133%ifdef M_TARGET_MACHO 134 SECTION .text align=64 135%else 136 SECTION .rtext progbits alloc exec write align=64 137%endif 138 139%ifdef M_TARGET_MACHO 140GLOBAL _rtext_a_start 141_rtext_a_start: 142%endif 143 144;eax = xscale 145;ebx = palookupoffse 146;ecx = # pixels to draw-1 147;edx = texturefrac 148;esi = texturecolumn 149;edi = buffer pointer 150 151ALIGN 16 152GLOBAL prevlineasm1 153prevlineasm1: 154 mov ecx, [dc_count] 155 cmp ecx, 1 156 ja vlineasm1 157 158 mov eax, [dc_iscale] 159 mov edx, [dc_texturefrac] 160 add eax, edx 161 mov ecx, [dc_source] 162premach3a: shr edx, 32 163 push ebx 164 push edi 165 mov edi, [dc_colormap] 166 xor ebx, ebx 167 mov bl, byte [ecx+edx] 168 mov ecx, [dc_dest] 169 mov bl, byte [edi+ebx] 170 pop edi 171 mov byte [ecx], bl 172 pop ebx 173 ret 174 175GLOBAL vlineasm1 176ALIGN 16 177vlineasm1: 178 push ebx 179 push edi 180 push esi 181 push ebp 182 mov ecx, [dc_count] 183 mov ebp, [dc_colormap] 184 mov edi, [dc_dest] 185 mov eax, [dc_iscale] 186 mov edx, [dc_texturefrac] 187 mov esi, [dc_source] 188fixchain1a: sub edi, 320 189 nop 190 nop 191 nop 192beginvline: 193 mov ebx, edx 194mach3a: shr ebx, 32 195fixchain1b: add edi, 320 196 mov bl, byte [esi+ebx] 197 add edx, eax 198 dec ecx 199 mov bl, byte [ebp+ebx] 200 mov byte [edi], bl 201 jnz short beginvline 202 pop ebp 203 pop esi 204 pop edi 205 pop ebx 206 mov eax, edx 207 ret 208 209 ;eax: -------temp1------- 210 ;ebx: -------temp2------- 211 ;ecx: dat dat dat dat 212 ;edx: ylo2 ylo4 213 ;esi: yhi1 yhi2 214 ;edi: ---videoplc/cnt---- 215 ;ebp: yhi3 yhi4 216 ;esp: 217ALIGN 16 218GLOBAL vlineasm4 219vlineasm4: 220 mov ecx, [dc_count] 221 push ebp 222 push ebx 223 push esi 224 push edi 225 mov edi, [dc_dest] 226 227 mov eax, dword [ylookup+ecx*4-4] 228 add eax, edi 229 mov dword [machvline4end+2], eax 230 sub edi, eax 231 232 mov eax, dword [bufplce+0] 233 mov ebx, dword [bufplce+4] 234 mov ecx, dword [bufplce+8] 235 mov edx, dword [bufplce+12] 236 mov dword [machvbuf1+2], ecx 237 mov dword [machvbuf2+2], edx 238 mov dword [machvbuf3+2], eax 239 mov dword [machvbuf4+2], ebx 240 241 mov eax, dword [palookupoffse+0] 242 mov ebx, dword [palookupoffse+4] 243 mov ecx, dword [palookupoffse+8] 244 mov edx, dword [palookupoffse+12] 245 mov dword [machvpal1+2], ecx 246 mov dword [machvpal2+2], edx 247 mov dword [machvpal3+2], eax 248 mov dword [machvpal4+2], ebx 249 250; �������������������������������Ŀ 251;edx: �v3lo �v1lo � 252; �������������������������������Ĵ 253;esi: �v2hi v2lo � v3hi� 254; �������������������������������Ĵ 255;ebp: �v0hi v0lo � v1hi� 256; ��������������������������������� 257 258 mov ebp, dword [vince+0] 259 mov ebx, dword [vince+4] 260 mov esi, dword [vince+8] 261 mov eax, dword [vince+12] 262 and esi, 0fffffe00h 263 and ebp, 0fffffe00h 264machvsh9: rol eax, 88h ;sh 265machvsh10: rol ebx, 88h ;sh 266 mov edx, eax 267 mov ecx, ebx 268 shr ecx, 16 269 and edx, 0ffff0000h 270 add edx, ecx 271 and eax, 000001ffh 272 and ebx, 000001ffh 273 add esi, eax 274 add ebp, ebx 275 ; 276 mov eax, edx 277 and eax, 0ffff0000h 278 mov dword [machvinc1+2], eax 279 mov dword [machvinc2+2], esi 280 mov byte [machvinc3+2], dl 281 mov byte [machvinc4+2], dh 282 mov dword [machvinc5+2], ebp 283 284 mov ebp, dword [vplce+0] 285 mov ebx, dword [vplce+4] 286 mov esi, dword [vplce+8] 287 mov eax, dword [vplce+12] 288 and esi, 0fffffe00h 289 and ebp, 0fffffe00h 290machvsh11: rol eax, 88h ;sh 291machvsh12: rol ebx, 88h ;sh 292 mov edx, eax 293 mov ecx, ebx 294 shr ecx, 16 295 and edx, 0ffff0000h 296 add edx, ecx 297 and eax, 000001ffh 298 and ebx, 000001ffh 299 add esi, eax 300 add ebp, ebx 301 302 mov ecx, esi 303 selfmod beginvlineasm4, machvline4end+6 304 jmp short beginvlineasm4 305ALIGN 16 306beginvlineasm4: 307machvsh1: shr ecx, 88h ;32-sh 308 mov ebx, esi 309machvsh2: and ebx, 00000088h ;(1<<sh)-1 310machvinc1: add edx, 88880000h 311machvinc2: adc esi, 88888088h 312machvbuf1: mov cl, byte [ecx+88888888h] 313machvbuf2: mov bl, byte [ebx+88888888h] 314 mov eax, ebp 315machvsh3: shr eax, 88h ;32-sh 316machvpal1: mov cl, byte [ecx+88888888h] 317machvpal2: mov ch, byte [ebx+88888888h] 318 mov ebx, ebp 319 shl ecx, 16 320machvsh4: and ebx, 00000088h ;(1<<sh)-1 321machvinc3: add dl, 88h 322machvbuf3: mov al, byte [eax+88888888h] 323machvinc4: adc dh, 88h 324machvbuf4: mov bl, byte [ebx+88888888h] 325machvinc5: adc ebp, 88888088h 326machvpal3: mov cl, byte [eax+88888888h] 327machvpal4: mov ch, byte [ebx+88888888h] 328machvline4end: mov dword [edi+88888888h], ecx 329fixchain2a: add edi, 88888888h 330 mov ecx, esi 331 jle short beginvlineasm4 332 333; �������������������������������Ŀ 334;edx: �v3lo �v1lo � 335; �������������������������������Ĵ 336;esi: �v2hi v2lo � v3hi� 337; �������������������������������Ĵ 338;ebp: �v0hi v0lo � v1hi� 339; ��������������������������������� 340 341 mov dword [vplce+8], esi 342 mov dword [vplce+0], ebp 343;vplc2 = (esi<<(32-sh))+(edx>>sh) 344;vplc3 = (ebp<<(32-sh))+((edx&65535)<<(16-sh)) 345machvsh5: shl esi, 88h ;32-sh 346 mov eax, edx 347machvsh6: shl ebp, 88h ;32-sh 348 and edx, 0000ffffh 349machvsh7: shr eax, 88h ;sh 350 add esi, eax 351machvsh8: shl edx, 88h ;16-sh 352 add ebp, edx 353 mov dword [vplce+12], esi 354 mov dword [vplce+4], ebp 355 356 pop edi 357 pop esi 358 pop ebx 359 pop ebp 360 ret 361 362;************************************************************************* 363;************************* Masked Vertical Lines ************************* 364;************************************************************************* 365 366; pass it log2(texheight) 367 368ALIGN 16 369GLOBAL setupmvlineasm 370setupmvlineasm: 371 mov ecx, dword [esp+4] 372 mov byte [maskmach3a+2], cl 373 mov byte [machmv13+2], cl 374 375 mov byte [machmv14+2], cl 376 mov byte [machmv15+2], cl 377 mov byte [machmv16+2], cl 378 selfmod maskmach3a, machmv13+6 379 ret 380 381ALIGN 16 382GLOBAL mvlineasm1 ;Masked vline 383mvlineasm1: 384 push ebx 385 push edi 386 push esi 387 push ebp 388 mov ecx, [dc_count] 389 mov ebp, [dc_colormap] 390 mov edi, [dc_dest] 391 mov eax, [dc_iscale] 392 mov edx, [dc_texturefrac] 393 mov esi, [dc_source] 394beginmvline: 395 mov ebx, edx 396maskmach3a: shr ebx, 32 397 movzx ebx, byte [esi+ebx] 398 cmp ebx, 0 399 je short skipmask1 400maskmach3c: mov bl, byte [ebp+ebx] 401 mov [edi], bl 402skipmask1: add edx, eax 403fixchain1m: add edi, 320 404 dec ecx 405 jnz short beginmvline 406 407 pop ebp 408 pop esi 409 pop edi 410 pop ebx 411 mov eax, edx 412 ret 413 414ALIGN 16 415GLOBAL mvlineasm4 416mvlineasm4: 417 push ebx 418 push esi 419 push edi 420 push ebp 421 422 mov ecx,[dc_count] 423 mov edi,[dc_dest] 424 425 mov eax, [bufplce+0] 426 mov ebx, [bufplce+4] 427 mov [machmv1+3], eax 428 mov [machmv4+3], ebx 429 mov eax, [bufplce+8] 430 mov ebx, [bufplce+12] 431 mov [machmv7+3], eax 432 mov [machmv10+3], ebx 433 434 mov eax, [palookupoffse] 435 mov ebx, [palookupoffse+4] 436 mov [machmv2+2], eax 437 mov [machmv5+2], ebx 438 mov eax, [palookupoffse+8] 439 mov ebx, [palookupoffse+12] 440 mov [machmv8+2], eax 441 mov [machmv11+2], ebx 442 443 mov eax, [vince] ;vince 444 mov ebx, [vince+4] 445 xor bl, bl 446 mov [machmv3+2], eax 447 mov [machmv6+2], ebx 448 mov eax, [vince+8] 449 mov ebx, [vince+12] 450 mov [machmv9+2], eax 451 mov [machmv12+2], ebx 452 453 inc ecx 454 push ecx 455 mov ecx, [vplce+0] 456 mov edx, [vplce+4] 457 mov esi, [vplce+8] 458 mov ebp, [vplce+12] 459fixchain2ma: sub edi, 320 460 461 selfmod beginmvlineasm4, machmv2+6 462 jmp short beginmvlineasm4 463ALIGN 16 464beginmvlineasm4: 465 dec dword [esp] 466 jz near endmvlineasm4 467 468 mov eax, ebp 469 mov ebx, esi 470machmv16: shr eax, 32 471machmv12: add ebp, 0x88888888 ;vince[3] 472machmv15: shr ebx, 32 473machmv9: add esi, 0x88888888 ;vince[2] 474machmv10: movzx eax, byte [eax+0x88888888];bufplce[3] 475machmv7: movzx ebx, byte [ebx+0x88888888];bufplce[2] 476 cmp eax, 1 477 adc dl, dl 478 cmp ebx, 1 479 adc dl, dl 480machmv8: mov bl, [ebx+0x88888888] ;palookupoffs[2] 481machmv11: mov bh, [eax+0x88888888] ;palookupoffs[3] 482 483 mov eax, edx 484machmv6: add edx, 0x88888888 ;vince[1] 485machmv14: shr eax, 32 486 shl ebx, 16 487machmv4: movzx eax, byte [eax+0x88888888];bufplce[1] 488 cmp eax, 1 489 adc dl, dl 490machmv5: mov bh, [eax+0x88888888] ;palookupoffs[1] 491 492 mov eax, ecx 493machmv3: add ecx, 0x88888888 ;vince[0] 494machmv13: shr eax, 32 495machmv1: movzx eax, byte [eax+0x88888888];bufplce[0] 496 cmp eax, 1 497 adc dl, dl 498machmv2: mov bl, [eax+0x88888888] ;palookupoffs[0] 499 500 xor eax, eax 501 shl dl, 4 502fixchain2mb: add edi, 320 503 mov al, dl 504 add eax, mvcase15 505 jmp eax ;16 byte cases 506 507ALIGN 16 508endmvlineasm4: 509 mov [vplce], ecx 510 mov [vplce+4], edx 511 mov [vplce+8], esi 512 mov [vplce+12], ebp 513 pop ecx 514 pop ebp 515 pop edi 516 pop esi 517 pop ebx 518 ret 519 520 ;5,7,8,8,11,13,12,14,11,13,14,14,12,14,15,7 521ALIGN 16 522mvcase15: mov [edi], ebx 523 jmp beginmvlineasm4 524ALIGN 16 525mvcase14: mov [edi+1], bh 526 shr ebx, 16 527 mov [edi+2], bx 528 jmp beginmvlineasm4 529ALIGN 16 530mvcase13: mov [edi], bl 531 shr ebx, 16 532 mov [edi+2], bx 533 jmp beginmvlineasm4 534ALIGN 16 535mvcase12: shr ebx, 16 536 mov [edi+2], bx 537 jmp beginmvlineasm4 538ALIGN 16 539mvcase11: mov [edi], bx 540 shr ebx, 16 541 mov [edi+3], bh 542 jmp beginmvlineasm4 543ALIGN 16 544mvcase10: mov [edi+1], bh 545 shr ebx, 16 546 mov [edi+3], bh 547 jmp beginmvlineasm4 548ALIGN 16 549mvcase9: mov [edi], bl 550 shr ebx, 16 551 mov [edi+3], bh 552 jmp beginmvlineasm4 553ALIGN 16 554mvcase8: shr ebx, 16 555 mov [edi+3], bh 556 jmp beginmvlineasm4 557ALIGN 16 558mvcase7: mov [edi], bx 559 shr ebx, 16 560 mov [edi+2], bl 561 jmp beginmvlineasm4 562ALIGN 16 563mvcase6: shr ebx, 8 564 mov [edi+1], bx 565 jmp beginmvlineasm4 566ALIGN 16 567mvcase5: mov [edi], bl 568 shr ebx, 16 569 mov [edi+2], bl 570 jmp beginmvlineasm4 571ALIGN 16 572mvcase4: shr ebx, 16 573 mov [edi+2], bl 574 jmp beginmvlineasm4 575ALIGN 16 576mvcase3: mov [edi], bx 577 jmp beginmvlineasm4 578ALIGN 16 579mvcase2: mov [edi+1], bh 580 jmp beginmvlineasm4 581ALIGN 16 582mvcase1: mov [edi], bl 583 jmp beginmvlineasm4 584ALIGN 16 585mvcase0: jmp beginmvlineasm4 586 587align 16 588 589 590;************************************************************************* 591;***************************** Voxel Slabs ******************************* 592;************************************************************************* 593 594GLOBAL R_DrawSlabA 595R_DrawSlabA: 596 push ebx 597 push ebp 598 push esi 599 push edi 600 601 mov eax, [esp+5*4+0] 602 mov ebx, [esp+5*4+4] 603 mov ecx, [esp+5*4+8] 604 mov edx, [esp+5*4+12] 605 mov esi, [esp+5*4+16] 606 mov edi, [esp+5*4+20] 607 608 cmp eax, 2 609 je voxbegdraw2 610 ja voxskip2 611 xor eax, eax 612voxbegdraw1: 613 mov ebp, ebx 614 shr ebp, 16 615 add ebx, edx 616 dec ecx 617 mov al, byte [esi+ebp] 618voxpal1: mov al, byte [eax+88888888h] 619 mov byte [edi], al 620voxbpl1: lea edi, [edi+88888888h] 621 jnz voxbegdraw1 622 jmp voxskipslab5 623 624voxbegdraw2: 625 mov ebp, ebx 626 shr ebp, 16 627 add ebx, edx 628 xor eax, eax 629 dec ecx 630 mov al, byte [esi+ebp] 631voxpal2: mov al, byte [eax+88888888h] 632 mov ah, al 633 mov word [edi], ax 634voxbpl2: lea edi, [edi+88888888h] 635 jnz voxbegdraw2 636 jmp voxskipslab5 637 638voxskip2: 639 cmp eax, 4 640 jne voxskip4 641 xor eax, eax 642voxbegdraw4: 643 mov ebp, ebx 644 add ebx, edx 645 shr ebp, 16 646 xor eax, eax 647 mov al, byte [esi+ebp] 648voxpal3: mov al, byte [eax+88888888h] 649 mov ah, al 650 shl eax, 8 651 mov al, ah 652 shl eax, 8 653 mov al, ah 654 mov dword [edi], eax 655voxbpl3: add edi, 88888888h 656 dec ecx 657 jnz voxbegdraw4 658 jmp voxskipslab5 659 660voxskip4: 661 add eax, edi 662 663 test edi, 1 664 jz voxskipslab1 665 cmp edi, eax 666 je voxskipslab1 667 668 push eax 669 push ebx 670 push ecx 671 push edi 672voxbegslab1: 673 mov ebp, ebx 674 add ebx, edx 675 shr ebp, 16 676 xor eax, eax 677 mov al, byte [esi+ebp] 678voxpal4: mov al, byte [eax+88888888h] 679 mov byte [edi], al 680voxbpl4: add edi, 88888888h 681 dec ecx 682 jnz voxbegslab1 683 pop edi 684 pop ecx 685 pop ebx 686 pop eax 687 inc edi 688 689voxskipslab1: 690 push eax 691 test edi, 2 692 jz voxskipslab2 693 dec eax 694 cmp edi, eax 695 jge voxskipslab2 696 697 push ebx 698 push ecx 699 push edi 700voxbegslab2: 701 mov ebp, ebx 702 add ebx, edx 703 shr ebp, 16 704 xor eax, eax 705 mov al, byte [esi+ebp] 706voxpal5: mov al, byte [eax+88888888h] 707 mov ah, al 708 mov word [edi], ax 709voxbpl5: add edi, 88888888h 710 dec ecx 711 jnz voxbegslab2 712 pop edi 713 pop ecx 714 pop ebx 715 add edi, 2 716 717voxskipslab2: 718 mov eax, [esp] 719 720 sub eax, 3 721 cmp edi, eax 722 jge voxskipslab3 723 724voxprebegslab3: 725 push ebx 726 push ecx 727 push edi 728voxbegslab3: 729 mov ebp, ebx 730 add ebx, edx 731 shr ebp, 16 732 xor eax, eax 733 mov al, byte [esi+ebp] 734voxpal6: mov al, byte [eax+88888888h] 735 mov ah, al 736 shl eax, 8 737 mov al, ah 738 shl eax, 8 739 mov al, ah 740 mov dword [edi], eax 741voxbpl6: add edi, 88888888h 742 dec ecx 743 jnz voxbegslab3 744 pop edi 745 pop ecx 746 pop ebx 747 add edi, 4 748 749 mov eax, [esp] 750 751 sub eax, 3 752 cmp edi, eax 753 jl voxprebegslab3 754 755voxskipslab3: 756 mov eax, [esp] 757 758 dec eax 759 cmp edi, eax 760 jge voxskipslab4 761 762 push ebx 763 push ecx 764 push edi 765voxbegslab4: 766 mov ebp, ebx 767 add ebx, edx 768 shr ebp, 16 769 xor eax, eax 770 mov al, byte [esi+ebp] 771voxpal7: mov al, byte [eax+88888888h] 772 mov ah, al 773 mov word [edi], ax 774voxbpl7: add edi, 88888888h 775 dec ecx 776 jnz voxbegslab4 777 pop edi 778 pop ecx 779 pop ebx 780 add edi, 2 781 782voxskipslab4: 783 pop eax 784 785 cmp edi, eax 786 je voxskipslab5 787 788voxbegslab5: 789 mov ebp, ebx 790 add ebx, edx 791 shr ebp, 16 792 xor eax, eax 793 mov al, byte [esi+ebp] 794voxpal8: mov al, byte [eax+88888888h] 795 mov byte [edi], al 796voxbpl8: add edi, 88888888h 797 dec ecx 798 jnz voxbegslab5 799 800voxskipslab5: 801 pop edi 802 pop esi 803 pop ebp 804 pop ebx 805 ret 806 807align 16 808 809%ifdef M_TARGET_MACHO 810GLOBAL _rtext_a_end 811_rtext_a_end: 812%endif 813