view code_part1/OSTC_code_asm_part1/wait.asm @ 124:4f9f477bb452

Rewrite display of decoplan: * Common stuff - fix clearing bottom of list, for fleecker-free updates. - fix "Wait..." topline_box while computing deco in planning - fix 'No Deco" std color and mark last page. - Allow stops up to 240' * ZHL-16c model: - 6 lines max (sim or dive) - Print exceed stops as "add: ddd'" * GF model - 6 lines in divemode, 8 in planning. - any suitable number of pages. - "more..." when not the last page displayed. - fix displaying special depth for last stop (CF#29). - fix 0-time stops: just skip display. - fix end of list when reached the deepest stop. - fix no need to buffer decoplan twice.
author JeanDo
date Sat, 01 Jan 2011 01:57:50 +0100
parents 96a35aeda5f2
children 42acd9316f7a
line wrap: on
line source

; OSTC - diving computer code
; Copyright (C) 2008 HeinrichsWeikamp GbR
;    This program 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 3 of the License, or
;    (at your option) any later version.
;    This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
; Wait routines
; written by: chsw, info@heinrichsweikamp.com
; written: 01/31/04
; last updated: 11/05/07
; known bugs:
; ToDo: 
	
; ==========================================================
; 	WAIT 10 MICROSECONDS  -  16 MHZ
; ==========================================================
WAIT10US 	macro	wait_temp
			movlw	wait_temp
			call	WAIT10USX
			endm

WAIT10USX	movwf	wait_temp
			goto	JumpIn10us
WAIT10USX2	nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
JumpIn10us:
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			decfsz	wait_temp,1
			goto	WAIT10USX2
			return
; ==========================================================
; 	WAIT 1 MILLISECOND  -  16 MHZ
; ==========================================================
WAITMS		macro	waitms_temp
			movlw	waitms_temp
			call WAITMSX
			endm
WAITMSX		movwf	waitms_temp
			goto	JumpInMSX
WAITMSX2	nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
JumpInMSX:
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			nop
			WAIT10US d'99'
			decfsz	waitms_temp,1
			goto	WAITMSX2
			return