Mercurial > public > hwos_code
comparison src/simulator.asm @ 148:022b886eddaf
some cleanup
author | heinrichsweikamp |
---|---|
date | Wed, 06 Aug 2014 17:38:31 +0200 |
parents | 9a637c9bb19a |
children | 932e91074bdb |
comparison
equal
deleted
inserted
replaced
147:fdd4e30846ae | 148:022b886eddaf |
---|---|
37 ;---- Private temp variables ------------------------------------------------- | 37 ;---- Private temp variables ------------------------------------------------- |
38 CBLOCK tmp+0x10 ; Reserved space for wordprocessor and convert | 38 CBLOCK tmp+0x10 ; Reserved space for wordprocessor and convert |
39 decoplan_index ; within each page | 39 decoplan_index ; within each page |
40 decoplan_gindex ; global index | 40 decoplan_gindex ; global index |
41 decoplan_last ; Depth of last stop (CF#29) | 41 decoplan_last ; Depth of last stop (CF#29) |
42 decoplan_max ; Number of lines per page. | |
43 decoplan_flags ; Various private flags. | 42 decoplan_flags ; Various private flags. |
44 decoplan_CNS:2 ; Backup CNS before vault restore | 43 decoplan_CNS:2 ; Backup CNS before vault restore |
45 ; Reserved to tmp+0x1F... | 44 ; Reserved to tmp+0x1F... |
46 ENDC | 45 ENDC |
47 #define decoplan_last_ceiling_shown decoplan_flags,0 | 46 #define decoplan_last_ceiling_shown decoplan_flags,0 |
532 | 531 |
533 deco_plan_show_1: | 532 deco_plan_show_1: |
534 lfsr FSR0,char_O_deco_depth ; Initialize indexed addressing. | 533 lfsr FSR0,char_O_deco_depth ; Initialize indexed addressing. |
535 lfsr FSR1,char_O_deco_time | 534 lfsr FSR1,char_O_deco_time |
536 | 535 |
537 movlw .8 ; 8 lines/page in decoplan | |
538 btfsc divemode | |
539 movlw .6 ; 6 lines/page in divemode. | |
540 movwf decoplan_max | |
541 | |
542 clrf decoplan_index ; Start with index = 0 | 536 clrf decoplan_index ; Start with index = 0 |
543 clrf win_top ; and row = 0 | 537 clrf win_top ; and row = 0 |
544 | 538 |
545 ; Read stop parameters, indexed by decoplan_index and decoplan_page | 539 ; Read stop parameters, indexed by decoplan_index and decoplan_page |
546 movf decoplan_page,W ; decoplan_gindex = 6*decoplan_page + decoplan_index | 540 movf decoplan_page,W ; decoplan_gindex = 6*decoplan_page + decoplan_index |
547 mulwf decoplan_max | 541 mullw .8 ; 8 lines/page in decoplan |
548 movf decoplan_index,W | 542 movf decoplan_index,W |
549 addwf PRODL,W | 543 addwf PRODL,W |
550 movwf decoplan_gindex ; --> decoplan_gindex | 544 movwf decoplan_gindex ; --> decoplan_gindex |
551 | 545 |
552 bcf decoplan_last_ceiling_shown ; Not finished yet... | 546 bcf decoplan_last_ceiling_shown ; Not finished yet... |
570 addwf win_top,F ; row: += 24 | 564 addwf win_top,F ; row: += 24 |
571 incf decoplan_index,F ; local index += 1 | 565 incf decoplan_index,F ; local index += 1 |
572 incf decoplan_gindex,F ; global index += 1 | 566 incf decoplan_gindex,F ; global index += 1 |
573 | 567 |
574 ; Max number of lines/page reached ? | 568 ; Max number of lines/page reached ? |
575 movf decoplan_max,W ; index+1 == max ? | 569 movlw .8 ; 8 lines/page in decoplan |
576 cpfseq decoplan_index | 570 cpfseq decoplan_index |
577 bra deco_plan_show_2 ; NO: loop | 571 bra deco_plan_show_2 ; NO: loop |
578 | 572 |
579 ; Check if next stop if end-of-list ? | 573 ; Check if next stop if end-of-list ? |
580 movf decoplan_gindex,W | 574 movf decoplan_gindex,W |