comparison src/aa_wordprocessor.asm @ 432:929feb0da4f5

hunting a bug in the logbook (Day 2)
author heinrichsweikamp
date Wed, 22 Jun 2016 12:36:15 +0200
parents a5fc007634c5
children 95ee78f4a974
comparison
equal deleted inserted replaced
431:9500b2d3e32b 432:929feb0da4f5
419 ; Are we done ? 419 ; Are we done ?
420 movf TBLPTRL,W ; Compare TBLPTR to aa_end 420 movf TBLPTRL,W ; Compare TBLPTR to aa_end
421 cpfseq aa_end+0 421 cpfseq aa_end+0
422 bra aa_decode_1 ; Loop if LOW is different 422 bra aa_decode_1 ; Loop if LOW is different
423 movf TBLPTRH,W 423 movf TBLPTRH,W
424 cpfseq aa_end+1 ; Loop to if HIGH is different 424 cpfseq aa_end+1 ; Loop too if HIGH is different
425 bra aa_decode_1 425 bra aa_decode_1
426 426
427 return 427 return
428 428
429 ;------------------------------------------------------------------------------ 429 ;------------------------------------------------------------------------------
432 ; Output : TFT commands on port D + clocks. 432 ; Output : TFT commands on port D + clocks.
433 ; 433 ;
434 global aa_wordprocessor ; Callable from C-code. 434 global aa_wordprocessor ; Callable from C-code.
435 aa_wordprocessor: 435 aa_wordprocessor:
436 banksel win_font ; Bank1, just to be sure. 436 banksel win_font ; Bank1, just to be sure.
437 rcall aa_string_width ; Set win_height, compute win_width 437 rcall aa_string_width ; Set win_height, compute win_width:2
438 call TFT_box_write ; Use that for the box. 438 call TFT_box_write ; Use that for the box.
439 439
440 ; Restart the loop for each char to print 440 ; Restart the loop for each char to print
441 lfsr FSR2, buffer ; FSR2 pointer to start of string. 441 lfsr FSR2, buffer ; FSR2 pointer to start of string.
442 442
443 ; DATA bloc commande: 443 ; DATA block comand
444 Index_out 0x22 444 Index_out 0x22
445 445
446 aa_wordprocessor_1: 446 aa_wordprocessor_1:
447 movf POSTINC2,W ; WREG = *FSR2++ 447 movf POSTINC2,W ; WREG = *FSR2++
448 bz aa_wordprocessor_99 ; Exit if null byte encountered. 448 bz aa_wordprocessor_99 ; Exit if null byte encountered.