Tandy 1000 Programmer's Reference Manual page 59

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 1 I System Calls
Example:
The following program deletes each file on the disk in Drive B
that was last written before December 31, 1982.
y e a r
m o n t h
f i l e s
t e n
message
d a y
f c b
b u f f e r
f u n c - 1 3 H :
compare
:
n e x t :
a 1 1-done
:
dw
db
db
db
d b
db
db
db
db
1 9 8 2
1 2
31
0
1 0
"NO
F I L E S DELETED.
2
,
" 7
7
7 7 7 7 7 7 7 7 7 "
2 5 dup
( 7 )
1 2 8 dup
( 7 )
s e t - d t a
b u f f e r
s e a r c h - f i r s t
f c b
CmP
a1 ,FFH
l e
a l l - d o n e
c o n v e r t - d a t e b u f f e r
CmP
c x , y e a r
1 9
n e x t
CmP
d l
, m o n t h
1 9
n e x t
CmP
dh , d a y
1 9 e
n e x t
d e l e t e
b u f f e r
i n c
f i l e 5
search-next fcb
C m P
a l , 0 0 H
le
c o m p a r e
C m P
f
I
l e 5 , B
l e
a l l - d o n e
c o n v e r t f i l e s , t e n , m e 5 5 a g e
d i s p l a y
message
"
,
1
3 , l 0
,
" 0 "
; s e e F u n c t i o n 0 9 H f o r
; e x p l a n a t i o n o f
$
; 5 e e F u n c t i o n 1 A H
; 5 e e F u n c t i o n l l H
; d i r e c t o r y e n t r y f o u n d 7
; n o , n o f i l e 5 o n d i s k
; s e e e n d o f c h a p t e r
; n e x t s e v e r a l l i n e s
; c h e c k d a t e i n d i r e c t o r y
; e n t r y a g a i n s t d a t e
; a b o v e b c h e c k n e x t f i l e
; i f d a t e i n d i r e c t o r y
; e n t r y i s n ' t e a r l i e r .
;THISFUNCTION
;bump d e l e t e d - f i l e s
; c o u n t e r
; s e e
F u n c t i o n l Z H
; d i r e c t o r y e n t r y f o u n d ?
; y e s , c h e c k d a t e
; a n y f i l e s d e l e t e d ?
; n o ,
d i s p l a y N O F I L E S
; m e s s a g e .
; s e e e n d o f c h a p t e r
; s e e
F u n c t i o n 09H
57

Advertisement

Table of Contents
loading

Table of Contents