CN100380907C - Method of realizing handwriting information exchange for cmmunication terminal - Google Patents

Method of realizing handwriting information exchange for cmmunication terminal Download PDF

Info

Publication number
CN100380907C
CN100380907C CNB031227309A CN03122730A CN100380907C CN 100380907 C CN100380907 C CN 100380907C CN B031227309 A CNB031227309 A CN B031227309A CN 03122730 A CN03122730 A CN 03122730A CN 100380907 C CN100380907 C CN 100380907C
Authority
CN
China
Prior art keywords
mov
whl
handwriting
movg
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB031227309A
Other languages
Chinese (zh)
Other versions
CN1538722A (en
Inventor
张烂熳
刘丁阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Swift Information Communication Technology Co Ltd
Original Assignee
Xiamen Swift Information Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Swift Information Communication Technology Co Ltd filed Critical Xiamen Swift Information Communication Technology Co Ltd
Priority to CNB031227309A priority Critical patent/CN100380907C/en
Publication of CN1538722A publication Critical patent/CN1538722A/en
Application granted granted Critical
Publication of CN100380907C publication Critical patent/CN100380907C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Discrimination (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention discloses a method of realizing handwriting information exchange for communication terminals and relates to the input and the information exchange techniques of character and image information. The present invention is suitable for mobile communication terminals, fixed information telephones and novel communication terminals with the main function of handwriting exchange. The present invention adopts a touch screen for replacing photic material between the front surface of a displayer of the existing communication terminal and the outer part; the touch screen is controlled by a controller of the touch screen. When needed, the controller of the touch screen collects coordinates of handwriting for analyzing relationships among the coordinates to generate stroke vector data. Data which comprises the stroke vector data is transferred to a main controller of the communication terminal. The main controller of the communication terminal is used for saving and editing obtained handwriting vector data. When needed, the main controller of the communication terminal receives and transmits the data which comprises the handwriting vector data in the existing mode; when needed, the main controller of the communication terminal reproduces the received handwriting vector data.

Description

A kind of method that makes communication terminal realize the handwriting information interchange
Technical field
The present invention relates to the technology of the input and the information interchange of literal and image information, be a kind ofly to carry out handwriting input (comprising literal and figure) and send through communication terminal at communication terminal, receive and the reproduction handwriting by other communication terminal, thus the method for realization information interchange.
Background technology
Existing communication terminal can be classified as two classes by the literal input mode, and a class has the stroke handwriting of using input mode, such as: 388 type mobile phones of Motorola Inc., the CECTE698 commercial mobile phone of instant translator company.Another kind of is with the button input, such as: 3610 type mobile phones of Nokia, 720 type mobile phones of Motorola Inc., the landline telephone short message telephone machine HCD007TSD of Bubukao.The communication terminal of existing available input characters is by hand-written word being discerned, then being chosen nearest word to realize the literal input.This literal input mode is identical with the coding of the final representative word content that forms of other literal input mode.Its advantage is to adopt stroke handwriting convenient.Its shortcoming is the information that need bigger screen shows the word relevant with handwriting, thereby the general volume of this communication terminal is bigger, and a large-screen is all arranged.And high discrimination can be realized in hand-written word comparatively rule, and can't transmit the figure that hand is drawn.This input mode has higher requirements to the controller of communication terminal, requires communication terminal controller to increase and finishes hand-written sampling and identification, and need a bigger handwriting recognition database with respect to the communication terminal of other non-handwriting recognition input.Because communication terminal controller (such as cell phone controller) needs the task of processing many mostly, and relevant with communication, is special-purpose controller therefore, realize that the function of newly-increased handwriting recognition is comparatively difficult.And will finish with the relevant control of communicating by letter in having the controller of handwriting recognition also is the thing of part difficulty.Existing most communication terminal is the mode of button input such as the mobile phone employing.The advantage of this mode is that volume is little, and cost is low, is easier to realize.Its shortcoming is that the Chinese character input is more loaded down with trivial details.The importance of existing communication terminal territory Word message promotes day by day.Such as SMS, become the young man and used one of most important a kind of mode of mobile phone.
Existing some kinds of palmtop PCs (also claiming personal digital assistant or PDA) have the function of notepaper record, such as e-commerce brainwave 822.The handwriting information that this mode writes down is similar to the drawing software in the Microsoft's Window, is to write down in the mode of drawing.A kind of information record that just is used for its machine itself there is no the function of this information of transceiver communication.Also and be not suitable for transmitting between the communication terminal handwriting information.
Summary of the invention
For communication terminal user tablet pattern and Word message more easily, and make the figure of input and Word message can be convenient to send to other communication terminal, and on the communication terminal different types of different structure or that the profile size is had higher requirements of other different manufacturers production, reappear these information.Also for communication terminal manufacturer can produce the communication terminal with person's handwriting input, transmission and reproduction capability with low cost and less change, the present invention proposes a kind of new method that makes communication terminal realize the handwriting information interchange.It is characterized in that: the touch-screen with printing opacity replaces at the display device front of existing communication terminal and the material of the printing opacity between the outside, by a touch screen controller control touch-screen, carry out the collection of handwriting data, and generate the stroke vector data, finish the real-time demonstration of hand-written process as required by touch screen controller or main controller of communication terminals; The information that will be included the person's handwriting vector data of stroke vector data and existing voice or image or literal or other data by main controller of communication terminals is carried out the mixed editorial storage; When needs were sent to other communication terminal with handwriting information, the existing transmitted image that the data that will include the person's handwriting vector data under the control of main controller of communication terminals are deferred to via this communication terminal or the method for sound or literal or other data sent; After communication terminal is received the data that include the person's handwriting vector data according to the method for its existing reception image of deferring to or sound or literal or other data, store this information in existing mode; When needs show the handwriting information that these data comprise,, and amplify and dwindle each person's handwriting according to needs according to each person's handwriting vector data each person's handwriting that draws again.
The touch-screen of described printing opacity is as the transducer of handwriting, comprised when pen when touch screen surface moves, to the material of the mobile component sensitivity of horizontal direction and vertical direction.
Described touch screen controller have related circuit by certain sequential to touch-screen provide drive signal be used to detect when pen when touch screen surface moves in the horizontal direction with the mobile component of vertical direction, and obtain the horizontal direction of corresponding person's handwriting point and the coordinate components of vertical direction; Described touch screen controller is analyzed the displacement vector of pen trace motion, produces stroke data.When described touch-screen was resistance-type printing opacity touch-screen, described touch screen controller included two-way analog to digital change-over circuit (A/D circuit) at least; Have and when each pen begins to write, produce the mechanism of interrupting; At least have 4 pins and be used for controlling separately respectively the level of the touch-screen of being controlled and a pin of vertical direction; When pen is just write on touch-screen, at least include such flow process twice in the sequential of described touch screen controller collection any point coordinate: in the moment 1, touch screen controller connects fixing known high level with a certain pin 1 of the direction 1 (horizontal direction or vertical direction) of touch-screen, and another pin 2 of this direction 1 connects same fixing known high level or connects high impedance; Touch screen controller connects high impedance with two pins of touch panel direction 2 (direction of non-direction 1); In the moment 2, touch screen controller is by the level of a pin 3 of the transition detection touch panel direction 2 of analog to digital; Constantly 3, touch screen controller is obtained the level pairing numerical value of pin 3 after the converting of analog to digital; In the moment 4, judge whether the pairing numerical value of level of pin 3 is the pairing pin 3 due values of the complete conducting of horizontal direction and vertical direction at this moment; If condition satisfies: continue to gather if this point coordinates has not also been gathered, the coordinate figure of having gathered if this point coordinates has been gathered is effective; If condition does not satisfy: this value of gathering this point coordinates is invalid; Must wait for after default a period of time at interval and gathering again.
The generation method of described stroke vector data is: when touch screen controller gather during two point coordinates of priority of person's handwriting, store away earlier, and second point coordinates saved as last coordinate; When gather thirdly behind the coordinate, calculate the displacement vector 2 that the displacement vector 1 that first point coordinates and coordinate thirdly constitute and first point coordinates and last coordinate constitute; Judge whether to satisfy condition 1: the angular separation of vector 1 and vector 2 is not less than the length of vector 2 less than the length of default scope and vector 1; If satisfy this condition 1 then three-dimensional saves as last coordinate, continue to gather a new point coordinates after waiting default a period of time again as coordinate thirdly; If do not satisfy this condition 1 then gather the 4th point coordinates after a period of time, obtain the 4th point coordinates after, calculate the displacement vector 3 that first point coordinates and the 4th point coordinates constitute; Judge whether to satisfy condition 2: the angular separation of vector 3 and vector 1 is not less than the length of vector 3 less than the length of default scope and vector 1; If satisfy condition 2 then cast out thirdly that coordinate saves as last coordinate with the 4th point coordinates, gather a new point coordinates excessively after Yu She a period of time more again as coordinate thirdly; If do not satisfy condition 2 then vector that first point coordinates and last coordinate are constituted as the vector data of a stroke that has generated, with coordinate thirdly as first point coordinates of a new stroke, with second point coordinates and the last coordinate of the 4th point coordinates as a new stroke; If collecting the touch-screen horizontal direction does not contact with vertical direction, then add up continuous not time of contact, if the vector that should the time surpasses default interval then first point coordinates and last coordinate are constituted is as the vector of a stroke that has generated, and establish a sign and represent that the next coordinate of adopting is first point coordinates, if greater than the interval of another setting then illustrate that this writes end, repeating said process continuous not time of contact can realize the vector data of each stroke of a writing process is collected.
Described stroke vector data has comprised the starting point coordinate and the terminal point coordinate of this stroke at least.
Described each person's handwriting vector data includes the data length of the person's handwriting that expression once writes or the data segment of stroke number, includes the stroke vector data of this each stroke of writing; Represent the more shared coordinate time of former and later two strokes when described person's handwriting vector data with same data segment position, then also include stroke that the plurality of data section is used to represent each back whether with the shared same point coordinate of the stroke of front; Then said person's handwriting vector data includes a data segment at least and is used to represent that this is new special literal code when the existing literal code of described person's handwriting vector data and the input of existing alternate manner mixes mutually, still is new complete person's handwriting vector data so that distinguish existing literal code when reading the data of this mixing successively; When the described person's handwriting vector data and the data of existing image or sound or other form are mixed mutually so that send to other communication terminal, when perhaps sending the person's handwriting vector data with the method for existing transmission data, described each person's handwriting vector data includes a data segment at least and is used for distinguishing mutually with existing other data structure.
Described according to each person's handwriting vector data each person's handwriting that draws again, its method is to read each stroke vector data that each person's handwriting vector data is comprised successively, starting point and terminal point coordinate according to each stroke vector data, foundation needs size and the life size of whole person's handwriting or the corresponding relation on former border of demonstration on the position that will show, calculate the starting point and the pairing position of terminal point of this stroke, and between this starting point and the pairing position of terminal point, draw a straight line, each stroke vector data that each person's handwriting vector data is comprised draws till all painting successively in the same way.
Because the present invention need not through identifying the person's handwriting of being write, what need demonstration is hand-written person's handwriting, the alternative word that need not show needs when identification, therefore communication terminal displays screen size is had no special requirements, be convenient in existing mobile communication terminal, implement, satisfied people's requirement the smaller the better the mobile communication terminal volume.Again because saved complicated identifying, so speed is fast.The present invention adopts touch-screen to replace the protectiveness material of existing communication terminal existing one deck printing opacity between display front and outside.Structurally identical with the existing communication terminal, easier enforcement.Touch screen controller specific at least flow performing in gathering any point coordinate can prevent that general touch-screen from occurring easily for twice when at pen contact touch-screen when the contacting appearance and shake of the horizontal direction of touch-screen and vertical direction, the inaccurate phenomenon of the coordinate figure that touch screen controller collects.The advantage of person's handwriting vector data structure of the present invention is: (1) is irrelevant with the lattice structure of the display screen of communication terminal.The display screen of input and the size of touch-screen there is not specific requirement.Be convenient to the correct reproduction person's handwriting between the product that different manufacturers produces.The lattice structure of display screen has horizontal and vertical branch.If data structure is relevant with lattice structure, it is very difficult general.(2) when reappearing person's handwriting, can amplify easily and dwindle person's handwriting and drop-out not.Word or picture to complexity have only the details that could see person's handwriting in this way at the reproduction end clearly.(3) not only can pass text handwriting, but also blit as person's handwriting.(4) data volume minimum.Because only pass the point coordinates at the two ends of a straight line stroke, and ignore the data of point-to-point transmission, therefore significantly reduced data volume.(5) person's handwriting vector data of the present invention's writing process generation each time, making the word code that one section pairing each word of handwriting can similar standard equally is the corresponding person's handwriting vector data of a word, because the person's handwriting vector data is convenient to amplify and dwindles and shows, so make word code that the handwriting data can the image scale standard equally edit and show again.
Description of drawings
Fig. 1: the circuit diagram that example 1 is increased on existing mobile communication terminal.
Specific embodiment 1
With resistive touch screen as the transducer of gathering handwriting, with NEC single-chip microcomputer UPD78F4216 as touch screen controller.Circuit diagram is seen Fig. 1.
UPD78F4316 links to each other with the master controller of cell phone terminal by the 40th, 41,42 pins.When the needs handwriting was imported, master controller was by UPD78F4216 the 40th, 41,42 pins notice UPD78F4216.UPD78F4216 enters the image data standby condition.When handwriting began, UPD78F4216 began to gather.After having write a person's handwriting, UPD78F4216 passes to master controller with the person's handwriting vector data that generates at every turn.Master controller then dwindles in the mode of similar grapholect and shows that institute's person's handwriting of being write also can edit.After whole needed person's handwritings have been write, resulting all the person's handwriting vector datas of master controller storage.When needs sent handwriting information with short message, master controller was packed resulting all the person's handwriting vector datas of this time of deposit and is sent with the form of short message.When the data of required transmission surpass the length of short message defined, read each complete person's handwriting vector data successively, send with the length gradation that short message was allowed.Store away when the cell phone terminal is received the short message that includes the person's handwriting vector data, when needs were seen, the sequencing of data-driven showed grapholect or standard picture or person's handwriting vector data that note comprised.Each person's handwriting vector data also shows with the size of standard word.When needing, amplify or dwindle certain or a plurality of complete person's handwriting.
The software of UPD78F4216 following (totally 15):
1, the address setting of interrupt service routine:
NAME?aaaa
extrn?intst1a,intp06,inttm6,
inttm7,inttm8,intad
verp14h?cseg?at?14h
dw?tointp06
verp1ch?cseg?at?1ch
dw?intst1
verp2eh?cseg?at?2eh
dw?tointad
verp32h?cseg?at?32h
dw?tointtm6
verp34h?cseg?at?34h
dw?tointtm7
verp36h?cseg?at?36h
dw?tointtm8
cseg
tointp06:mov?!!0ffe3fh,#14h
br?!!intp06
reti
intst1:br?!!intst1a
reti
tointad:mov!!0ffe3fh,#2eh
br?!!intad
reti
tointtm6:mov?!!0ffe3fh,#32h
br?!!inttm6
reti
tointtm7:mov?!!0ffe3fh,#34h
br?!!inttm7
reti
tointtm8:mov?!!0ffe3fh,#36h
br?!!inttm8
reti
tEND
2, generate hand-written data boundary program:
name?abh8n
public?abh8z
extrn?inter1,inter4
extrn?hxmax,hxmax2,hymax
,hymax2,hxmin,hxmin2,hymin
,hymin2,h1x0,h1y0
abh8f equ?0ffd80h
abh8xs equ?0ffd81h
abh8ys equ?0ffd82h
abh8px equ?0ffd83h
abh8ax equ?0ffd84h
abh8py equ?0ffd85h
ahh8ay equ?0ffd86h
abh8xe equ?0ffd87h
abh8ye equ?0ffd88h
abh8fn equ?0ffd89h
abh8k equ?0ffd8ah
abh8x1 equ?0ffd8bh
abh8x2 equ?0ffd8ch
abh8y1 equ?0ffd8dh
abh8y2 equ?0ffd8eh
cseg
abh8z:pushpsw
sel?rb2
mov?a,#00h
mov?[%inter4],a
call$!anz
cmp?x,#03h
bnc?$abh8_3
mov?a,!!hxmax
mov?!!hxmax2,a
mov?a,!!hxmin
mov?!!hxmin2,a
mov?a,!!hymax
mov?!!hymax2,a
mov?a,!!hymin
mov?!!hymin2,a
br $!abh8_4
abh8_3:mov?a,!!hxmax
sub?a,!!hxmax2
mov?x,a
mov?c,#03h
call$!divm
mov?a,x
add?!!hxmax2,a
mov?a,!!hxmin2
sub?a,!!hxmin
mov?x,a
mov?c,#03h
call$!divm
mov?a,x
sub?!!hxmin2,a
mov?a,!!hymax
sub?a,!!hymax2
mov?x,a
mov?c,#03h
call$!divm
mov?a,x
add?!!hymax2,a
mov?a,!!hymin2
sub?a,!!hymin
mov?x,a
mov?c,#03h
call$!divm
mov?a,x
sub?!!hymin2,a
abh8_4:mov?a,!!hxmax2
sub?a,!!hxmin2
mov?!!h1x0,a
mov?a,!!hymax2
sub?a,!!hymin2
mov?!!h1y0,a
mov?abh8k,#01h
call$!aqk
call$!anz
cmp?x,#00h
bnz?$abh8_1
mov?a,#01h
mov?[%inter4],a
br $!abh8?ret
abh8_1:mov?r6,abh8xs
mov?r7,abh8ys
call$!abh8_t1
mov?a,abh8f
and?a,x
movgwhl,uup
mov?[whl],a
mov?r6,abh8xe
mov?r7,abh8ye
call$!abh8_t1
mov?a,abh8fn
and?a,x
movgwhl,uup
addgwhl,#09h
mov?[whl],a
call$?!anz
cmp?abh8?k,x
bc $abh8_29
abh8_ret:pop?psw
ret
abh8_29:inc?abh8k
call$!aqk
br $!abh8_1
abh8_t1:mov?r4,!!hxmin2
cmp?r6,r4
bc $abh8_24
mov?r5,!!hxmax2
cmp?r6,r5
bnc?$abh8_25
mov?x,r6
sub?x,r4
mov?a,#03h
mulu?x
mov c,!!h1x0
divuw c
inc x
mov b,#04h
sub b,x
br $!abh8_2b
abh8_24:mov?b,#03h
br $!abh8_2b
abh8_25:mov b,#01h
abh8_2b:mov?r4,!!hymin2
cmp r7,r4
bc $abh8_26
mov r5,!!hymax2
cmp r7,r5
bnc $abh8_27
mov x,r7
sub x,r4
mov a,#03h
mulu?x
mov c,!!h1y0
divuw c
br$!abh8_28
abh8_26:mov?x,#00h
br $abh8_28
abh8_27:mov x,#02h
abh8_28:mov a,#03h
mulux
add x,b
or x,#0f0h
ret
aqk:movgwhl,inter1
movwax,[whl]
cmpwax,#0200h
bnc$aqk1
movg?vvp,#00h
mov a,abh8k
dec a
mov x,#0ah
mulux
movw?vp,ax
addg?whl,#02h
addg?whl,vvp
movg?uup,whl
movg?tde,#0ffd80h
mov c,#0ah
movbk [tde+],[whl+]
aqk1:ret
anz:movgtde,inter1
movw?ax,[tde]
mov c,#0ah
divum c
ret
divm:mov?a,#00h
divuw c
ret
End
3, stroke feature routine analyzer:
name?abh7n
public?abh7z
extrn?hwall,handwv2,lintprog
,wordsv,mintsp,handback,
handwend
extrn?hxmax,hxmax2,hymax
,hymax2,hxmin,hxmin2
,hymin,hymin2
extrn?hxmaxk,hxmax2k
,hxmink,hxmin2k,hymaxk
,hymax2k,hymink,hymin2k
abh7f equ 0ffd80h
abh7xs equ 0ffd81h
abh7ys equ 0ffd82h
abh7px equ 0ffd83h
abh7ax equ 0ffd84h
abh7py equ 0ffd85h
abh7ay equ 0ffd86h
abh7xe equ 0ffd87h
abh7ye equ 0ffd88h
abh7fn equ 0ffd89h
cseg
abh7z:push?psw
sel?rb2
mov?!!hxmax,#00h
mov?!!hxmax2,#00h
mov?!!hymax,#00h
mov?!!hymax2,#00h
mov?!!hxmin,#0ffh
mov?!!hxmin2,#0ffh
mov?!!hymin,#0ffh
mov?!!hymin2,#0ffh
abh7_1:br $!abh7_2
mov?a,!!handwend
cmp?a,#00h
bnz?$abh7_1z
mov?a,#02h
mov?!!handback,a
movwax,!!hwall
cmpwax,#14h
bc $abh7_1y
mov?a,#01h
mov?!!handback,a
abh7_1y:call?!!pulp2
br !!abh7_ret
abh7_1z:movg?whl,#abh7_2
call!!pulp
br !!abh7_ret
abh7_2:push?psw
sel rb2
call?!!aqn
cmp abh7f,#0ffh
bnz $abh7_1
cmp abh7px,#00h
bnz $abh7_21
cmp abh7py,#00h
bnz $abh7_22
mov x,abh7ay
mov c,#05h
call?$!divm
cmp abh7ax,x
bc $abh7_23
mov x,abh7ax
mov c,#05h
call?$!divm
cmp abh7ay,x
bnc $abh7_24
mov a,#0cfh
br $!abh7_25
abh7_24:mov?a,#3fh
br $!abh7_25
abh7_23:mov?a,#4fh
br $!abh7_25
abh7_22:mov a,#0efh
br $!abh7_25
abh7_21:cmp?abh7py,#00h
bnz $abh7_26
mov x,abh7ay
mov c,#05h
call?$!divm
cmp?abh7ax,x
bc $abh7_23
mov x,abh7ax
mov c,#05h
call?$!divm
cmp abh7ay,x
bc $abh7_27
mov a,#5fh
br $!abh7_25
abh7_27:mov a,#2fh
br $!abh7_25
abh7_26:mov?x,abh7ay
mov c,#05h
call?$!divm
cmp abh7ax,x
bnc $abh7_27
mov a,#0dfh
abh7_25:movgwhl,uup
mov [whl],a
abh7_2a:mov r4,!!hxmax
mov r5,!!hxmax2
cmp abh7px,#00h
bnz $abh7_28
mov r6,abh7xs
mov r7,abh7xe
br $!abh7_214
abh7_28:mov?r6,abh7xe
mov r7,abh7xs
abh7_214:cmp?r4,r7
bc $abh7_29
cmp r5,r7
bnc $abh7_210
mov r5,r7
mov !!hxmax2,r5
call?$!anz
mov !!hxmax2k,x
br $!abh7_210
abh7_29:mov?r5,r4
mov !!hxmax2,r5
mov a,!!hxmaxk
mov !!hxmax2k,a
mov r4,r7
mov !!hxmax,r4
cal1?$!anz
mov !!hxmaxk,x
cmp r5,r6
bnc $abh7_210
mov r5,r6
mov !!hxmax2,r5
call?$!anz
mov !!hxmax2k,x
abh7_210:mov?r4,!!hxmin
mov r5,!!hxmin2
cmp r6,r4
bc $abh7_211
cmp r6,r5
bnc $abh7_212
mov r5,r6
mov !!hxmin2,r5
call?$!anz
mov !!hxmin2k,x
br $!abh7_212
abh7_211:mov?r5,r4
mov !!hxmin2,r5
mov a,!!hxmink
mov !!hxmin2k,a
mov r4,r6
mov !!hxmin,r4
call?$!anz
mov !!hxmink,x
cmp r7,r5
bnc $abh7_212
mov r5,r7
mov !!hxmin2,r5
call?$!anz
mov!!hxmin2k,x
abh7_212:
mov r4,!!hymax
mov r5,!!hymax2
cmp abh7py,#00h
bnz $abh7_213
mov r6,abh7ys
mov r7,abh7ye
br $!abh7_215
abh7_213:mov?r6,abh7ye
mov r7,abh7ys
abh7_215:cmp?r4,r7
bc $abh7_216
cmp r5,r7
bnc $abh7_217
mov r5,r7
mov !!hymax2,r5
call?$!anz
mov !!hymax2k,x
br $!abh7_217
abh7_216:mov?r5,r4
mov !!hymax2,r5
mov a,!!hymaxk
mov !!hymax2k,a
mov r4,r7
mov !!hymax,r4
call?$!anz
mov !!hymaxk,x
cmp r5,r6
bnc $abh7_217
mov r5,r6
mov !!hymax2,r5
call?$!anz
mov !!hymax2k,x
abh7_217:mov?r4,!!hymin
mov r5,!!hymin2
cmp r6,r4
bc $abh7_218
cmp r6,r5
bnc $abh_73a
mov r5,r6
mov !!hymin2,r5
call?$!anz
mov !!hymin2k,x
br $!abh7_3a
abh7_218:mov r5,r4
mov !!hymin2,r5
mov a,!!hymink
mov !!hymin2k,a
mov r4,r6
mov !!hymin,r4
call?$!anz
mov !!hymink,x
cmp r7,r5
bnc $abh7_3a
mov r5,r7
mov !!hymin2,r5
call?$!anz
mov !!hymin2k,x
abh7_3a:movgwhl,uup
addg?whl,#09h
mov a,[whl]
and a,#0f0h
cmp a,#40h
bz $abh7_31
mov a,!!handwend
cmp a,#00h
bnz $abh7_1a
mov a,#01h
mov !!handback,a
br !!abh7_32
abh7_1a:br $!abh7_1
abh7_31:mov?a,#00h
mov !!handback,a
abh7_32:call?!!pulp2
abh7_ret:pop?psw
ret
pulp:movg tde,#lintprog
movgvvp,#00h
mov r8,#handwv2
addg?tde,vvp
mov a,[tde]
mov x,a
inc a
mov [tde],a
mov a,#03h
mulu?x
movw?rp4,ax
addg?tde,#02h
addg?tde,vvp
movg?[tde],whl
ret
pulp2:
movg?tde,#mintsp
mov a,[tde]
movg?vvp,#00h
mov r8,a
inc a
mov [tde],a
incg?tde
addg?tde,vvp
mov a,#wordsv
mov [tde],a
ret
aqn:movg?whl,#hwall
movw?ax,[whl]
cmpw?ax,#0200h
bnc $aqn2
movg?vvp,#00h
movw?vp,ax
addg?whl,#02h
addg?whl,vvp
subg?whl,#0ah
movg?uup,whl
movg?tde,#0ffd80h
mov c,#0ah
movbk [tde+],[whl+]
aqn2:ret
anz:movg?tde,#hwall
movw?ax,[tde]
mov?c,#0ah
divuw c
ret
divm:mov?a,#00h
divuw c
ret
End
4, AD sampling routine:
name?adonen
public?adonez
extrn
addrad,z_syslflag,z_intflg3
cseg
adoncz:push?psw
sel rb7
push?tde
mov?tmic7,#01000011b
mov?tmc7,#00000111b
clr1?pm0.4
set1?pm0.6
set1?pm9.4
clr1?pm0.3
clr1?pm0.5
clr1?p0.5
clr1?p0.4
clr1?p0.3
set1?z_intflg3.1
clr1?z_intflg3.2
mov?adis,#00000110b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov?adic,#00000000b
mov?adm,#10100000b
movg?tde,#0ffd57h
movg?addrad,tde
set1?z_syslflag.0
pop?tde
toret:pop?psw
ret
totm7:mov?mic7,#0000000b
mov?tmc7,#10000000b
mov?prm7,#00000111b
mov?cr70,#3ah
br?!!toret
end
5, handwriting packing program:
NAME?apakn
PUBLIC?apakz
extrn hwall
apakjsq?equ?0ffd8ah
CSEG
apakz:push?psw
sel rb2
mov apakjsq,#00h
movg?whl,#hwall
movw?ax,[whl]
movw?rp2,ax
cmpw?rp2,#0ah
bnc $apak_4
br $!apak_ret
apak_4:addg?whl,#02h
movg?tde,#0ffd80h
mov?c,#0ah
movbk [tde+],[whl+]
movg?vvp,whl
subw?rp2,#0ah
movg?uup,#hwall
incg?uup
movg?whl,#0ffcaffh
movg?[uup],whl
addg?uup,#04h
mov a,#70h
mov [uup],a
incg?uup
movg?whl,#0ffd81h
movg?tde,uup
mov c,#02h
movbk [tde+],[whl+]
addg?whl,#04h
mov c,#02h
movbk [tde+],[whl+]
add?apakjsq,#04h
cmpwrp2,#0ah
bc $apak_1
incg?vvp
apak_2:movgwhl,vvp
subw?rp2,#0ah
add apakjsq,#04h
mov c,#02h
movbk [tde+],[whl+]
addg?whl,#04h
mov c,#02h
movbk [tde+],[whl+]
cmpw?rp2,#0ah
bc $apak_1
addg?vvp,#0ah
br $!apak_2
apak_1:add?apakjsq,#09h
mov a,apakjsq
movg?whl,#hwall
mov [whl],a
addg?whl,#04h
sub a,#05h
mov [whl],a
mov r6,a
mov b,#00h
mov c,a
apak_3:incg?whl
mov a,[whl]
mov x,a
mov a,#00h
addw?bc,ax
dec r6
cmp r6,#03h
bnz $apak_3
incg?whl
movw?ax,bc
movw?[whl],ax
addg?whl,#02h
movw?ax,#0ffffh
movw?[whl],ax
apak_ret:
pop psw
ret
END
6, ask vector programs:
name?asln
public?aslz
extrn?inget1,inget4,inget7
cseg
aslz:push?psw
sel?rb3
movg?whl,inget1
movg?tde,inget4
movg?uup,inget7
mov a,[whl]
mov b,a
mov a,[tde]
mov c,a
mov a,[whl+1]
mov x,a
mov a,[tde+1]
mov r4,a
cmp c,b
bc $asl_1
bnz $asl_2
cmp x,r4
bnc $asl_2
asl_1:mov?a,#01h
mov [uup],a
mov a,h
sub a,c
incg?uup
mov [uup],a
br !!asl_5
asl_2:mov?a,#00h
mov [uup],a
mov a,c
sub a,b
incg?uup
mov [uup],a
asl_5:cmp?r4,x
bc $asl_3
bnz $asl_4
cmp c,b
bnc $asl_4
asl_3:mov?a,#01h
incg?uup
mov [uup],a
mov a,x
sub a,r4
incg?uup
mov [uup],a
br !!asl_ret
asl_4:mov?a,#00h
incg?uup
mov [uup],a
mov a,r4
sub a,x
incg?uup
mov [uup],a
asl_ret:pop?psw
ret
End
7, serial ports sends data program:
NAME sendln
public?sendlz,intst1a
extrn?inter1,z_intflg4
,z_intflg2,portnum,z_intflg1
senadd1?equ?0fe200h
sencnt1?equ?0fe203h
senflg equ?0fe204h
cseg
sendlz:push?psw
sel?rb2
set1?z_intflg2.0
clr1?z_intflg2.1
clr1?pm2.2
set1?p2.2
clr1?z_intflg1.5
add portnum,#1
mov brgcl,#00011010b
mov csiml,#00000000b
mov sticl,#00000011b
movg?whl,inter1
mov a,[whl]
mov !!sencnt1,a
incg?whl
set1?pm2.1
clr1?p2.1
clr1?pm2.1
mov a,[whl]
incg?whl
movg?!!senadd1,whl
mov txsl,a
pop psw
ret
intst1a:sel?rb7
push?whl
push?ax
push?bc
set1?pm2.1
clr1?p2.1
clr1?pm2.1
movg?whl,!!senadd1
mov a,[whl]
incg?whl
movg?!!senadd1,whl
mov c,!!sencnt1
dbnz?c,$intst12
mov sticl,#01000011b
set1?z_intflg1.5
clr1?p2.2
sub portnum,#1
mov !!senflg,#0ffh
intst11:mov?!!sencnt1,c
pop?bc
pop?ax
pop?whl
reti
intst12:mov?txsl,a
br?!intst11
END
8, hand-written real-time display program,
NAME xhwd2n
PUBLIC xhwd2z
extrn inget1,inget2
,inget3,inget4,inget5
,lulz,lukz,xcldotz
extrn hlcdx1,hlcdy1
,hlcdx2,hlcdy2,lcdxyx
,hax1,hax2,hay1,hay2
,htx1,hty1,htx2,hty2
extrn?lcd_dotlinmax
,lcd_dotvolmax,lintprog
,dothpv,oldlcdflag,x0,y0
CSEG
xhwd2z:push psw
sel rb2
mov !!inget1,#00h
mov !!inget3,#hlcdx1
mov !!inget2,#hlcdy1
mov !!inget5,#hlcdx2
mov !!inget4,#hlcdy2
call?!!xcldotz
mov a,#lcd_dotlinmax
sub a,#hlcdy1
bnc $xhl
br!!out
xhl:inc a
mov !!inget1,a
mov a,#hlcdx1
cmp a,#lcd_dotvolmax
bc$xh2
br!!out
xh2:mov a,#hlcdx2
cmp a,#lcd_dotvolmax
bz$xh3
bc$xh3
br!!out
xh3:mov a,#hlcdy2
cmp a,#lcd_dotlinmax
bz$xh4
bc$xh4
br!!out
xh4:mov a,#hlcdx1
mov x,a
add a,#03h
xhloop1:cmp x,#hlcdx2
bc$xh9
br!!xh7
xh9:cmp a,#hlcdx2
bc$xh10
br!!xh5
xh10:mov inget2,x
mov inget3,a
call?!!lukz
add x,#06h
add a,#04h
cmp x,#hlcdx2
bc$xh6
br!!xh7
xh6:cmp a,#hlcdx2
bc$xh8
br!!xh5
xh8:mov inget2,x
mov inget3,a
call?!!lukz
add x,#04h
add a,#06h
br!!xhloop1
xh5:mov inget2,x
mov inget3,#hlcdx2
call?!!lukz
xh7:mov?a,#lcd_dotlinmax
sub a,#hlcdy2
inc a
mov inget1,a
mov a,#hlcdx1
mov x,a
add a,#03h
xhloop2:cmp x,#hlcdx2
bc$xh79
br!!xh77
xh79:cmp a,#hlcdx2
bc$xh710
br!!xh75
xh710:mov inget2,x
mov inget3,a
call?!!lukz
add x,#06h
add a,#04h
cmp x,#hlcdx2
bc$xh76
br!!xh77
xh76:cmp?a,#hlcdx2
bc$xh78
br!!xh75
xh78:mov inget2,x
mov inget3,a
call?!!lukz
add x,#04h
add a,#06h
br!!xhloop2
xh75:mov inget2,x
mov inget3,#hlcdx2
call?!!lukz
xh77:mov inget3,#hlcdx1
mov a,#lcd_dotlinmax
sub a,#hlcdy1
inc a
mov r7,a
mov a,#lcd_dotlinmax
sub a,#hlcdy2
inc a
mov x,a
add x,#03h
xhloop3:cmp a,r7
bc$xh31
br!!xh32
xh31:cmp x,r7
bc$xh33
br!!xh34
xh33:mov inget1,a
mov inget2,x
call?!!lulz
add a,#06h
add x,#04h
cmp a,r7
bc$xh35
br!!xh32
xh35:cmp x,r7
bc$xh36
br!!xh34
xh36:mov inget1,a
mov inget2,x
call?!!lulz
add a,#04h
add x,#06h
br!!xhloop3
xh34:mov inget1,a
mov inget2,r7
call !!lulz
xh32:mov inget3,#hlcdx2
mov a,#lcd_dotlinmax
sub a,#hlcdy2
inc a
mov x,a
add x,#03h
xhloop4:cmp a,r7
bc$xh41
br!!out
xh41:cmp x,r7
bc$xh43
br!!xh44
xh43:mov inget1,a
mov inget2,x
call?!!lulz
add a,#06h
add x,#04h
cmp a,r7
bc$xh45
br!!xhd2
xh45:cmp x,r7
bc$xh46
br!!xh44
xh46:mov inget1,a
mov inget2,x
call !!lulz
add a,#04h
add x,#06h
br!!xhloop4
xh44:mov inget1,a
mov inget2,r7
call?!!lulz
xhd2:movg tde,#lintprog
movg?vvp,#00h
mov r8,#dothpv
addg?tde,vvp
mov a,[tde]
mov x,a
inc a
mov [tde],a
mov a,#03h
mulu x
movw rp4,ax
addg tde,#02h
addg tde,vvp
movg whl,#xhd3
movg [tde],whl
br!!out
xhd3:push psw
sel rb2
movw?ax,!!lcdxyx
movw?rp3,ax
cmp a,#hty1
bc$xpt5
cmp a,#hty2
bz$xpt3
bnc $xpt5
xpt3:cmp x,#htx2
bc$xpt5
cmp x,#htx1
bz$xpt4
bnc $xpt5
br!!xpt4
xpt5:br !!xhd2
xpt4:mov a,#htx1
sub a,r6
mov x,#hax2
mulu x
mov c,#hax1
divuw c
add x,#hlcdx1
cmp x,#hlcdx1
bc$xpt6
cmp x,#hlcdx2
bz$xpt1
bnc $xpt6
xpt1:mov r5,x
mov a,r7
sub a,#hty1
mov x,#hay2
mulu x
mov c,#hay1
divuw c
add x,#hlcdy1
cmp x,#hlcdy1
bc$xpt6
cmpx,#hlcdy2
bz$xpt2
bc$xpt2
xpt6:br !!xhd2
xpt2:mov a,!!oldlcdflag
cmp a,#00h
bnz $xhdx1
call !!pdisp
inc r5
call !!pdisp
dec r5
mov !!x0,r5
mov !!y0,x
mov !!oldlcdflag,#0ffh
br!!xhd2
xhdx1:mov?a,!!x0
cmp r5,a
bnz $xhdx11
mov a,!!y0
cmp x,a
bnz $xhdx11
br!!xhd2
xhdx11:mov r6,x
mov r7,r5
mov x,!!y0
;mov r5,!!x0
;call?!!pdisp
;inc r5
;call?!!pdisp
mov a,!!x0
cmp r7,a
bc$xhdx2
mov b,r7
sub b,a
br!!xhdx3
xhdx2:mov b,!!x0
sub b,r7
xhdx3:mov?a,!!y0
cmp r6,a
bc$xhdx4
mov c,r6
sub c,a
br!!xhdx5
xhdx4:mov c,!!y0
sub c,r6
xhdx5:cmp b,c
bnc $xhdx6
br!!xhd3a
xhdx6:mov a,!!x0
cmp a,r7
bnc $xhd2c
xhd2a:mov r4,#01h
xhd2b:mov r5,!!x0
add r5,r4
mov a,!!y0
cmp a,r6
bc$xhd2b1
mov x,!!y0
sub x,r6
mov c,r7
mov a,!!x0
sub c,a
mov a,r4
mulu x
divuw c
mov a,!!y0
sub a,x
mov x,a
br!!xhd2b2
xhd2b1:mov?x,r6
mov a,!!y0
sub x,a
mov c,r7
mov a,!!x0
sub c,a
mov a,r4
mulu x
divuw c
mov a,!!y0
add a,x
mov x,a
xhd2b2:call !!pdisp
inc r5
call !!pdisp
dec r5
cmp r7,r5
bc$xhd2b3
inc r4
br!!xhd2b
xhd2b3:mov!!x0,r7
mov !!y0,r6
br!!xhd2
xhd2c:mov?r4,#01h
xhd2d:mov r5,!!x0
sub r5,r4
mov a,!!y0
cmp a,r6
bc$xhd2c1
mov x,!!y0
sub x,r6
mov c,!!x0
sub c,r7
mov a,r4
mulu x
divuw c
mov a,!!y0
sub a,x
mov x,a
br!!xhd2c2
xhd2c1:mov x,r6
mov a,!!y0
sub x,a
mov c,!!x0
sub c,r7
mov a,r4
mulu x
divuw c
mov a,!!y0
add a,x
mov x,a
xhd2c2:call !!pdisp
inc r5
call !!pdisp
dec r5
cmp r5,r7
bc$xhd2c3
inc r4
br!!xhd2d
xhd2c3:mov!!x0,r7
mov !!y0,r6
br!!xhd2
xhd3a:mov a,!!y0
cmp a,r6
bc$xhd3a1
br!!xhd3c
xhd3a1:mov?r4,#01h
xhd3b:mov b,!!y0
add b,r4
mov a,!!x0
cmp a,r7
bc$xhd3b1
mov x,!!x0
sub x,r7
mov c,r6
mov a,!!y0
sub c,a
mov a,r4
mulu x
divuw c
mov r5,!!x0
sub r5,x
br!!xhd3b2
xhd3b1:mov?x,r7
mov a,!!x0
sub x,a
mov c,r6
mov a,!!y0
sub c,a
mov a,r4
mulu x
divuw c
mov r5,!!x0
add r5,x
xhd3b2:mov?x,b
call !!pdisp
inc r5
call !!pdisp
cmp r6,x
bc$xhd3b3
inc r4
br!!xhd3b
xhd3b3:mov!!x0,r7
mov !!y0,r6
br!!xhd2
xhd3c:mov?r4,#01h
xhd3d:mov?b,!!y0
sub b,r4
mov a,!!x0
cmp a,r7
bc$xhd3c1
mov x,!!x0
sub x,r7
mov c,!!y0
sub c,r6
mov a,r4
mulu x
divuw c
mov r5,!!x0
sub r5,x
br!!xhd3c2
xhd3c1:mov?x,r7
mov a,!!x0
sub x,a
mov c,!!y0
sub c,r6
mov a,r4
mulu x
divuw c
mov r5,!!x0
add r5,x
xhd3c2:mov?x,b
call !!pdisp
inc r5
call !!pdisp
cmp x,r6
bc$xhd3c3
inc r4
br!!xhd3d
xhd3c3:mov!!x0,r7
mov !!y0,r6
br!!xhd2
out:pop psw
ret
pdisp:
mov a,#lcd_dotlinmax
sub a,x
inc a
mov inget1,a
mov inget2,r5
mov inget3,r5
call !!lukz
ret
END
9, coordinate disjunction program:
NAME xod1n
PUBLIC xod1z
extrn lintprog,lintsp
extrn hwbuffer1,
hwbuffer2,hwbuffer3,
hwbuffer4,hwbuffer5,
hwbuffer6,hwbuffer7,
hwbuffer8,hwbuffer9,
hwbuffer10,hwbuffer11,
hwbuffer12,hwbuffer13,
hwbuffer14,hwbuffer15,
hwbuffer16,hwbuffer17,
hwbuffer18,hwbuffer19,
hwbuffer20,hwbuffer21
extrn hwbuffer22,
hwbuffer23,hwbuffer24,
hwbuffer25,hwbuffer26,
hwbuffer27,hwbuffer28
extrn hwbuffer29,
hwbuffer30,hwbuffer31,
hwbuffer32,hwbuffer33
,hwbuffer34,hwbuffer35
extrn hwbuffer36,
hwbuffer37,hwbuffer38,
hwbuffer39,hwbuffer40
extrn inget1,inget2,
inget4,inget7
extrn handwv,bdx0,
bdx2,bdy0,bdy2,handwv2,
xmax1,ymax1,xmax2
,ymax2,hwall,dothpv,
handwv3
extrn z_intflg1,lcdxyx,
z_intflg3
extrn?abh7z,adonez,aslz,
xtm6z,xtm8z,xvtcz,xvtmz,
xhwd2z,oldlcdflag
extrn hwtm1,hwtm2,
handwend,ang30min,
xmax3,ymax3,z_sys4flag
CSEG
xod1z:push?psw
sel rb5
xd1:set1?z_intflg3.4
set1z_sys4flag.2
clr1 egp0.6
clr1 egn0.6
set1 pm0.6
mov pic6,#40h
movw !!hwall,#0000h
movg whl,#lintprog
mov a,#dothpv
mov b,a
mov a,#00h
mov [whl+b],a
mov !!hwbuffer36,#00h
mov !!hwbuffer1,#00h
mov !!hwbuffer2,#0fdh
mov !!hwbuffer3,#0ffh
mov !!oldlcdflag,#00h
mov !!handwend,#0ffh
call !!abh7z
call !!xhwd2z
movg whl,#xd2
call !!pulp
set1 egp0.6
clr1 egn0.6
set1 pm0.6
mov pic6,#00h
br!!out
xd12:br !!xdbb5
xd2:push psw
sel?rb5
movw?ax,!!lcdxyx
cmpw ax,#0ffffh
bz$xd12
cmp?a,#bdy0
bc$xdi1
cmp a,#bdy2
bz$xdi2
bnc $xdi1
xdi2:cmp x,#bdx0
bc$xdi1
cmp x,#bdx2
bz$xdi3
bnc $xdi1
br!!xdi3
xdi1:mov a,#0fdh
cmp?a,!!hwbuffer2
bz$xdi122
mov?a,#0f9h
cmp a,!!hwbuffer2
bnz $xdi12
br!!xd13
xdi122:
mov!!hwbuffer2,#0f9h
br!!xdbb5
xdi12:cmp hwtm2,#0ffh
bz$xdi11
br?!!xdbb5
xdi11:
bf!!hwbuffer2.0,$xdi111
clrl !!hwbuffer2.0
br!!xdbb5
xdi111:br !!xd13
xdi3:setl !!hwbuffer2.0
mov !!hwbuffer1,#08h
mov !!hwhuffer2,#0ffh
mov !!hwbuffer8,x
mov !!hwbuffer9,a
call !!pdot
xdaa2:mov!!hwbuffer36,#00h
xdaa:mov !!inget1,#01h
movg whl,#xd3
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xd3:push psw
sel rb5
bfp0.6,$xdaa1
movg whl,#xd4
call !!pulp
call !!adonez:
br!!out
xdaa1:mov a,!!hwbuffer36
inc a
mov !!hwbuffer36,a
mov x,#hwtml
inc x
cmp a,x
bc$xdaalil
br!!xdbb5
xdaalil:cmp a,#hwtml
bc$xdi31
mov a,!!hwbuffer1
cmp a,#09h
bnc $xdaa3
mov r7,#0fh
call !!hwset
mov !!oldlcdflag,#00h
br!!xdaa5
xdi31:mov !!inget1,#01h
movg whl,#xd3
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xdaa3:mov r7,#0ffh
mov r6,#0fh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer14
movw rp1,ax
movg whl,#hwbuffer4
call !!phwa11
mov !!oldlcdflag,#00h
xdaa5:mov!!hwbuffer1,#00h
mov !!hwbuffer2,#0ffh;
mov !!hwbuffer3,#0ffh;
call !!phw3
call !!phw2
br!!xdbb5
xdaa4:mov a,!!hwbuffer36
cmp a,hwtm2
bnc $xdaa4i1
mov !!inget1,#01h
movg whl,#xd3
movg !!inget2,whl
call !!xtm8z
call !!phw3
br!!out
xdaa4i1:mov?a,!!hwbuffer1
cmp a,#09h
bnc $xdaa41
movg whl,#hwall
movw ax,[whl]
cmpw ax,#00h
bnz $xdaa42
br!!xd1
xdaa42:mov?r7,#04fh
call !!hwset
br!!xdaa43
xdaa41:mov?r7,#0ffh
mov r6,#4fh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer14
mmovw?rp1,ax
movg whl,#hwbuffer4
call !!phwa11
mov !!oldlcdflag,#00h
xdaa43:call!!phw3
call !!phw2
br!!out
xldaa:br!!xdaa
xd4:push?psw
sel rb5
movw ax,!!lcdxyx
cmpw ax,#0ffffh
bz$xldaa
cmp a,#bdy0
bc$xd41
cmp a,#bdy2
bz$xd42
bnc $xd41
xd42:cmp x,#bdx0
bc$xd41
cmp x,#bdx2
bz$xd43
bnc $xd41
br!!xd43
xd41:cmp hwtm2,#0ffh
bnz $xd411
bf?!!hwbuffer2.0,$xd412
clrl !!hwbuffer2.0
br!!xdaa
xd412:br !!xd13
xd411:br !!xdaa
xd43:setl !!hwbuffer2.0
movg whl,#hwbuffer8
movg inget1,whl
movg whl,#lcdxyx
movg inget4,whl
movg whl,#hwbuffer37
movg inget7,whl
call !!aslz
movg whl,#hwbuffer37
movg tde,#hwbuffer4
mov c,#04h
movbk?[tde+],[whl+]
movw ax,!!lcdxyx
movw !!hwbuffer14,ax
mov a,!!hwbuffer38
cmp a,#xmax1
bnc $xd44
mov a,!!hwbuffer40
cmp a,#ymax1
bnc $xd44
br?!!xdaa2
xd44:mov a,!!hwbuffer38
cmp a,#xmax3
bnh $xd441
br!!xdaa2
xd441:mov a,!!hwbuffer40
cmp a,#ymax3
bnh $xdaa7
br!!xdaa2
xdaa7:movw?ax,!!lcdxyx
movw !!hwbuffer14,ax
mov !!hwbuffer1,#0eh
call !!pdot
movg tde,#hwbuffer?10
movg whl,#hwbuffer37
mov c,#04h
movbk?[tde+],[whl+]
mov a,!!hwbuffer38
cmp a,#xmax2
bnc $xdaa71
mov a,!!hwbuffer40
cmp a,#ymax2
bnc $xdaa71
br!!xdaa2
xdaa71:clrl?!!hwbuffer2.7
movg tde,#hwbuffer4
movg whl,#hwbuffer37
mov c,#04h
movbk?[tde+],[whl+]
xdbb2:
mov !!hwbuffer36,#00h
xdbb:mov !!inget1,#01h
movg whl,#xd5
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xd5:push?psw
sel rb5
bfp0.6,$xdbb1
movg whl,#xd6
call !!pulp
call !!adonez
br!!out
xdbbl:mov a,!!hwbuffer36
inc a
mov !!hwbuffer36,a
cmp a,#hwtm1
bc$xd51
mov r7,#0ffh
mov r6,#0fh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer14
movw rp1,ax
movg whl,#hwbuffer4
call !!phwa11
mov !!oldlcdflag,#00h
mov !!hwbuffer1,#00h
mov !!hwbuffer2,#0ffh
mov !!hwbuffer3,#0ffh
call !!phw3
call !!phw2
xdbb5:mov!!inget1,#01h
movg whl,#xd52
movg !!inget2,whl
call !!xtm8z
call !!phw3
br!!out
xd51:mov !!inget1,#01h
movg whl,#xd5
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xd52:push?psw
sel rb5
bfp0.6,$xd521
movg whl,#xd2
call !!pulp
call !!adonez;
br?!!out
xd521:cmp hwtm2,#0fh
bnz $xd5211
br!!xdbb5
xd5211:mov?a,!!hwbuffer36
inc a
mov !!hwbuffer36,a
cmp a,hwtm2
bnc $xd522
br!!xdbb5
xd522:movg?tde,#hwall
movw ax,[tde]
cmpw ax,#00h
bnz $xd5221
br!!xd5222
xd5221:movg vvp,#00h
movw rp4,ax
addg tde,#02h
addg tde,vvp
decg tde
mov a,[tde]
and a,#3fh
add a,#40h
mov [tde],a
xd5222:
mov !!oldlcdflag,#00h
mov !!handwend,#00h
call !!phw3
call !!phw2
br!!out
xldbb:br !!xdbb
xd6:push psw
sel rb5
movw ax,!!lcdxyx
cmpw ax,#0ffffh
bz$xldbb
cmp a,#bdy0
bc$xd61
cmp a,#bdy2
bz$xd62
bnc $xd61
xd62:cmp x,#bdx0
bc$xd61
cmp x,#bdx2
bz$xd63
bnc $xd61
br!!xd63
xd61:cmp hwtm2,#0ffh
bz$xd611
br!!xdbb
xd611:
bf!!hwbuffer2.0,$xd6111
clrl !!hwbuffer2.0
br!!xdbb
xd6111:br!!xd13
xd63:setl!!hwbuffer2.0
movg whl,#hwbuffer14
movg inget1,whl
movg whl,#lcdxyx
movg inget4,whl
movg whl,#hwbuffer37
movg inget7,whl
call !!aslz
mov a,!!hwbuffer38
cmp a,#xmax1
bnc $xd64
mov a,!!hwbuffer40
cmp a,#ymax1
bnc $xd64
br!!xdbb2
xd64:mov a,!!hwbuffer38
cmp a,#xmax3
bnh $xd641
br!!xdbb2
xd641:mov a,!!hwbuffer40
cmp a,#ymax3
bnh $xdbb6
br!!xdbb2
xdbb6:call?!!pdot
movw ax,!!lcdxyx
movw !!hwbuffer20,ax
movg tde,#hwbuffer16
movg whl,#hwbuffer37
mov c,#04h
movbk [tde+],[whl+]mov
a,!!hwbuffer1
add a,#06h
mov !!hwbuffer1,a
movg whl,#hwbuffer4
movg !!inget1,whl
movg whl,#hwbuffer16
movg !!inget4,whl
movg whl,#hwbuffer35
movg !!inget7,whl
call !!xvtcz
mov a,!!hwbuffer35
cmp a,#00h
bz?$xdbb61
cmp a,#01h
bnz $xdbb62
clr1 !!hwbuffer3.0
br!!xdcc2
xdbb62:cmp?a,#0e1h
bnz $xdbb63
clr1 !!hwbuffer3.7
br!!xdbb61
xdbb63:cmp?a,#0e2h
bnz $xdbb6i1
clr1 !!hwbuffer3.6
br!!xdbb61
xdbb6i1:cmp?a,#0e8h
bnz $xdbb6i2
bt!!hwbuffer2.6,$xdbb61
bf!!hwbuffer2.5,$xdbb61
clr1 !!hwbuffer3.0
br!!xdbb61
xdbb6i2:cmp?a,#0e3h
bnz $xdbb61
clr1 !!hwbuffer3.0
xdbb61:
movg whl,#hwbuffer8
movg inget1,whl
movg whl,#hwbuffer20
movg inget4,whl
movg whl,#hwbuffer10
movg inget7,whl
call !!aslz
movg whl,#hwbuffer4
movg !!inget1,whl
movg whl,#hwbuffer10
movg !!inget4,whl
movg whl,#hwbuffer35
movg !!inget7,whl
call !!xvtmz
mov a,!!hwbuffer35
cmp a,#00h
bz$xdcc2
cmp a,#01h
bnz $xdbb66
set1 !!hwbuffer2.5
clr1 !!hwbuffer2.6
br!!xdcc2
xdbb66:cmp?a,#02h
bnz $xdbb67
set1 !!hwbuffer2.6
clr1 !!hwbuffer2.5
br!!xdcc2
xdbb67:cmp a,#03h
bnz $xdcc2
clr1 !!hwbuffer3.0
xdcc2:
mov !!hwbuffer36,#00h
xdcc:mov !!inget1,#01h
movg whl,#xd7
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xd7:push psw
sel rb5
bfp0.6,$xdcc1
movg whl,#xd8
call!!pulp
call !!adonez;
br!!out
xdcc1:mov a,!!hwbuffer36
inc a
mov !!hwbuffer36,a
cmp a,#hwtm1
bc$xdcc11
mov r7,#0ffh
mov r6,#0fh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer20
movw rp1,ax
movg whl,#hwbuffer10
call !!phwa11
mov !!oldlcdflag,#00h
mov !!hwbuffer1,#00h
mov !!hwbuffer2,#0ffh
mov !!hwbuffer3,#0ffh
call !!phw3
call !!phw2
br!!xdbb5
xdcc11:mov !!inget1,#01h
movg whl,#xd7
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xldcc:br !!xdcc
xd8:push psw
sel rb5
movw ax,!!lcdxyx
cmpw ax,#0ffffh
bz$xldcc
cmp a,#bdy0
bc$xd81
cmp a,#bdy2
bz$xd82
bnc $xd81
xd82:cmp x,#bdx0
bc$xd81
cmp?x,#bdx2
bz$xd83
bnc $xd81
br!!xd83
xd81:cmp?hwtm2,#0ffh
bnz $xd811
bf!!hwbuffer2,0,$xd812
clr1 !!hwbuffer2.0
br!!xdcc
xd812:br !!xd14
xd811:br !!xdcc
xd83:set1 !!hwbuffer2.0
movg whl,#hwbuffer20
movg inget1,whl
movg whl,#lcdxyx
movg inget4,whl
movg whl,#hwbuffer37
movg inget7,whl
call !!aslz
mov a,!!hwbuffer38
cmp?a,#xmax1
bnc $xd84
mov a,!!hwbuffer40
cmp a,#ymax1
bnc $xd84
br!!xdcc
xd84:mov a,!!hwbuffer38
cmp a,#xmax3
bnh $xd841
br?!!xdcc
xd841:mov a,!!hwbuffer40
cmp a,#hmax3
bnh $xd831
br!!xdcc
xd831:movg tde,#hwbuffer22
movg whl,#hwbuffer37
mov c,#04h
movbk [tde+],[whl+]
call !!pdot
movw ax,!!lcdxyx
movw !!hwbuffer26,ax
mov a,!!hwbuffer1
add a,#06h
mov !!hwbuffer1,a
bt !!hwbuffer3.0,$xdcc4
br!!xde1
xdcc4:movg whl,#hwbuffer8
movg inget1,whl
movg whl,#hwbuffer26
movg inget4,whl
movg whl,#hwbuffer37
movg inget7,whl
call !!aslz
movg whl,#hwbuffer10
movg !!inget1,whl
movg whl,#hwbuffer37
movg !!inget4,whl
movg whl,#hwbuffer35
movg !!inget7,whl
call !!xvtmz
mov a,!!hwbuffer35
cmp a,#00h
bnz $xdcc41
xdcc42:br !!xddd3
xdcc41:cmp?a,#01h
bnz $xddd1
bf!!hwbuffer2.4,$xdcc42
xddd2:
bt !!hwbuffer2.6,$xdcc43
xdcc44:clrl?!!hwbuffer2.6
set1 !!hwbuffer2.5
br!!xddd3
xdcc43:
bt !!hwbuffer2.5,$xdcc44
clr1 !!hwbuffer2.4
br!!xddd3
xddd1:cmp a,#02h
bnz $xddd3i1
bt !!hwbuffer2.4,$xddd11
br!!xddd3
xddd11:
bf!!hwbuffer2.6,$xddd12
xddd13:setl?!!hwbuffer2.6
clr1 !!hwbuffer2.5
br!!xddd3
xddd12:
bf!!hwbuffer2.5,$xddd13
clr1 !!hwbuffer2.4
br!!xddd3
xddd3i1:
clr1 !!hwbuffer3.0
xddd3:
movg whl,#hwbuffer10
movg !!inget1,whl
movg whl,#hwbuffer22
movg !!inget4,whl
movg whl,#hwbuffer35;
movg !!inget7,whl
call !!xvtcz
mov a,!!hwbuffer35
cmp a,#00h
bnz $xddd31
movg tde,#hwbuffer10
movg whl,#hwbuffer37
mov c,#04h
movbk?[tde+],[whl+]
br!!xddd4
xddd31:cmp?a,#01h
bnz $xddd32
clr1 !!hwbuffer3.0
br!!xde2
xddd32:
movg tde,#hwbuffer10
movg whl,#hwbuffer37
mov c,#04h
movbk?[tde+],[whl+]
cmp a,#0e1h
bnz $xddd33
clr1 !!hwbuffer3.7
br!!xddd5
xddd33:cmp?a,#0e2h
bnz $xddd34
clr1 !!hwbuffer3.6
br!!xddd5
xddd34:cmp a,#0f3h
bnz $xddd35
bf!!hwbuffer3.7,$xddd36
bf!!hwbuffer3.1,$xddd36
br!!xddd5
xddd36:clrl!!hwbuffer3.3
br!!xddd5
xddd35:cmp a,#0f4h
bnz $xdp8a
bf?!!hwbuffer3.6,$xddd37
bf!!hwbuffer3.2,$xddd37
br!!xddd5
xdp8a:cmp a,#0e8h
bnz $xdp8a1
bt !!hwbuffer2.6,$xddd5
bf !!hwbuffer2.5,$xddd5
clr1 !!hwbuffer3.0
br!!xde2
xdp8a1:cmp?a,#0e3h
bnz $xddd5
clr1 !!hwbuffer3.0
br!!xde2
xddd37:clrl?!!hwbuffer3.3
br!!xddd5
xddd4:
bt!!hwbuffer3.7,$xddd41
clr1 !!hwbuffer3.1
br!!xddd5
xddd41:
bt!!hwbuffer3.6,$xddd5
clr1 !!hwbuffer3.2
xddd5:movg?tde,#hwbuffer14
call !!hbde1
br?!!xdcc2
xde1:movg?whl,#hwbuffer14
movg inget1,whl
movg?whl,#hwbuffer26
movg inget4,whl
movg whl,#hwbuffer37
movg inget7,whl
call !!aslz
movg whl,#hwbuffer4
movg !!inget1,whl
movg whl,#hwbuffer22
movg !!inget4,whl
movg whl,#hwbuffer35
movg !!inget7,whl
call !!xvtcz
mov a,!!hwbuffer35
cmp a,#01h
bz$xde1l
cmp a,#0e1h
bnz $xde12
clr1 !!hwbuffer3.7
br!!xde13
xde12:cmp a,#Oe2h
bz$xde14
cmp a,#0e8h
bz?$xde112
cmp a,#0e3h
bz?$xde112
br!!xde13
xde14:clrl !!hwbuffer3.6
br!!xde13
xde11:
bf!!hwbuffer2.6,$xde111
xde112:mov?r7,#0ffh
br!!xde113
xde111:
bf !!hwbuffer2.5,$xde112
bf !!hwbuffer2.4,$xde112
bf !!hwbuffer3.3,$xde112
bf !!hwbuffer3.1,$xde114
bt !!hwbuffer3.2,$xde112
mov r7,#0ffh
br !!xde113
xde114:mov?r7,#0ffh
xde113:mov?r6,#0cfh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer14
movw rp1,ax
movg whl,#hwbuffer4
call !!phwa11
br!!xddd6
xde13:setl !!hwbuffer3.0
movw ax,!!hwbuffer26
movw !!hwbuffer20,ax
movg tde,#hwbuffer?16
movg whl,#hwbuffer22
mov c,#04h
movbk?[tde+],[whl+]
mov a,!!hwbuffer1
sub a,#06h
mov !!hwbuffer1,a
br!!xdcc2
xddd6:call !!phw3
call !!phw2
mov !!hwbuffer2,#0ffh
mov !!hwbuffer3,#0ffh
movw ax,!!hwbuffer14
movw !!hwbuffer8,ax
movw ax,!!hwbuffer26
movw !!hwbuffer14,ax
movg tde,#hwbuffer4
movg whl,#hwbuffcr37
mov c,#04h
movbk [tde+],[whl+]
movg tde,#hwbuffer10
movg whl,#hwbuffer37
mov c,#04h
movbk [tde+],[whl+]
mov !!hwbuffer1,#0eh
mov a,!!hwbu?ffer38
cmp a,#xmax2
bnc $xddd61
mov a,!!hwbuffer40
cmp a,#ymax2
bnc $xddd61
br!!xdaa2
xddd61:clr1 !!hwbuffer2.7
br!!xdbb2
xde2:mov !!hwbuffer36,#00h
xde4:mov !!inget1,#01h
movg whl,#xd9
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xd9:push psw
sel rb5
bfp0.6,$xde5
movg whl,#xd10
call !!pulp
call !!adonez;
br!!out
xde5:mov a,!!hwbuffer36
inc a
mov !!hwbuffer36,a
cmp a,#hwtm1
bnc $xde6
mov !!inget1,#01h
movg whl,#xd9
movg !!inget2,whl
call !!xtm6z
call !!phw3
br!!out
xde6:bf !!hwbuffer2.6,$xde61
xde62:mov r7,#0ffh
br!!xde63
xde61:
xde63:mov r6,#0fh
xd164:movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer20
movw rp1,ax
movg whl,#hwbuffer10;
call !!phwa11
call !!phw3
call !!phw2
mov !!oldlcdflag,#00h
mov !!hwbuffer1,#00h
mov !!hwbuffer2,#0ffh
xd163:mov!!hwbuffer3,#0ffh
br!!xdbb5
xlde4:br !!xde4
xd10:push psw
sel rb5
movw ax,!!lcdxyx
cmpw ax,#0ffffh
bz$xlde4
cmp a,#bdy0
bc$xd101
cmp a,#bdy2
bz$xd102
bnc $xd101
xd102:cmp x,#bdx0
bc$xd101
cmp x,#bdx2
bz$xd103
bnc $xd101
br!!xd103
xd101:cmp hwtm2,#0ffh;
bnz $xd1011
bf!!hwbuffer2.0,$xd1012
clr1 !!hwbuffer2.0
br!!xde2
xd1012:br !!xd14
xd1011:br !!xde2
xd103:setl?!!hwbuffer2.0
movg whl,#hwbuffer26
movg inget1,whl
movgwhl,#lcdxyx
movg inget4,whl
movg whl,#hwbuffer37
movg inget7,whl
call !!aslz
mov a,!!hwbuffer38
cmp a,#xmax1
bnc $xd104
mov a,!!hwbuffer40
cmp a,#ymax1
hnc $xd104
br!!xdo2
xd104:mov a,!!hwbuffer38
cmp a,#xmax3
bnh $xd1041
br!!xde2
xd1041:mov a,!!hwbuffer40
cmp a,#ymax3
bnh $xd1031
br!!xde2
xd1031:mov a,!!hwbuffer1
add a,#06h
mov !!hwbuffer1,a
movw ax,!!lcdxyx
movw !!hwbuffer32,ax
movg tde,#hwbuffer28
movg whl,#hwbuffer37
mov c,#04h
movbk [tde+],[whl+]
call !!pdot
xde7:movg?whl,#hwbuffer20
movg inget1,whl
movg whl,#hwbuffer32
movg inget4,whl
movg whl,#hwbuffer37
movg inget7,whl
call !!aslz
movg whl,#hwbuffer10
movg !!inget1,whl
movg whl,#hwbuffer37
movg !!inget4,whl
movg whl,#hwbuffer35
movg !!inget7,whl
call !!xvtcz
mov a,!!hwbuffer35
cmp a,#00h
bnz $xd10i1
xd10i8:setl!!hwbuffer3.0
movm ax,!!hwbuffer32
movw !!hwbuffer26,ax
movg tde,#hwbuffer22
movg whl,#hwbuffer37;
mov c,#04h
movbk [tde+],[whl+]
mov a,!!hwbuffer1
sub a,#06h
mov !!hwbuffer1,a
br!!xdcc4
xd10i1:cmp?a,#01h
bz$xd10i7
cmp a,#0e8h
bnz $xd10i11
bt!!hwbuffer2.6,$xd10i8
bf!!hwbuffer2.5,$xd10i8
br!!xd10i3
xd10i11:cmp?a,#0e3h
bnz $xd10i8
br!!xd10i3;
xd10i7:bf !!hwbuffer2.6,$xd10
i2
xd10i3:mov?r7,#0ffh
br!!xd10i5;ldy020501
xd10i2:bf !!hwbuffer2.5,$xd10
i3
bf !!hwbuffer2.4,$xd10i3
bf !!hwbuffer3.3,$xd10i3
bf !!hwbuffer3.1,$xd10i4
bt !!hwbuffer3.2,$xd10i3
mov r7,#0ffh
br!!xd10i5
xd10i4:mov?r7,#0ffh
xd10i5:mov?r6,#0cfh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer20
movw rp1,ax
movg whl,#hwbuffer10
call !!phwa11
call!!phw3
call !!phw2
mov !!hwbuffer2,#0ffh
mov !!hwbuffer3,#0ffh
movw ax,!!hwbuffer20
movw !!hwbuffer8,ax
movw ax,!!hwbuffer32
movw !!hwbuffer14,ax
movg tde,#hwbuffer4
movg whl,#hwbuffer37
mov c,#04h
movbk [tde+],[whl+]
movg tde,#hwbuffer10
movg whl,#hwbuffer37
mov c,#04h
movbk [tde+],[whl+]
mov !!hwbuffer1,#0eh
mov a,!!hwbuffer38
cmp a,#xmax2
bnc $xd10i6
mov a,!!hwbuffer40
cmp a,#ymax2
bnc $xd10i6
br!!xdaa2
xd10i6:clrl!!hwbuffer2.7
br!!xdbb2
xd13:mov a,!!hwbuffer1
cmp a,#09h
bnc $xd131
movw ax,!!hwall
cmpw ax,#00h
bz?$xd132
movg vvp,#00h
movw rp4,ax
movg tde,#hwall
addg tde,#02h
addg tde,vvp
decg tde
mov a,[tde]
cmp a,#0cfh
bz$xd133
and a,#3fh
add a,#40h
br!!xd132
xd133:mov?a,#4fh
mov [tde],a
xd132:setl!!z_intflg1.0
mov !!handwend,#00h
call !!phw3
call !!phw2
br!!out
xd131:mov r7,#0ffh
mov?r6,#4fh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer14
movw rp1,ax
movg whl,#hwbuffer4
call !!phwa11
xd1311:
mov !!hwbuffer1,#00h
mov !!hwbuffer2,#0ffh
mov !!hwbuffer3,#0ffh
br!!xd132
xd14:mov r7,#0ffh
moov r6,#4fh
movw ax,!!hwbuffer8
movw rp2,ax
movw ax,!!hwbuffer14
movw rp1,ax
movg whl,#hwbuffer10
call !!phwa11
mov !!oldlcdflag,#00h
br!!xd1311
out:pop psw
ret
pulp:movg tde,#lintprog
movg vvp,#00h
mov r8,#handwv
addg tde,vvp
mov a,[tde]
mov x,a
inc a
mov [tde],a
mov a,#03h
mulu x
movw rp4,ax
addg tde,#02h
addg tde,vvp
movg [tde],whl
ret
hwset:movg?tde,#hwall
movw ax,[tde]
cmpw?ax,#00h
bnz $ht2
br!!htout
ht2:movg vvp,#00h
movw rp4,ax
addg tde,#02h
addg tde,vvp
decg tde
mov a,r7
mov [tde],a
htout:
ret
phwa11:movg tde,#hwall
movw ax,[tde]
cmpw ax,#0200h
bnc $phwa112
movg vvp,#00h
movw rp4,ax
addw ax,#0ah
movw [tde],ax;
addg tde,#02h
addg tde,vvp
mov a,r7
mov [tde],a
incg tde
movw ax,rp2
movw [tde],ax
addg tde,#02h
movw ax,rp1
mov c,#04h
movbk [tde+],[whl+]
movw [tde],ax
addg tde,#02h
mov a,r6
mov [tde],a
ret
phwa112:ret
rhw2:movg?tde,#lintsp
mov a,[tde]
movg vvp,#00h
mov r8,a
inc a
mov [tde],a
incg tde
addg tde,vvp
mov a,#handwv2
mov [tde],a
ret
pdot:movg?tde,#lintsp
mov a,[tde]
movg vvp,#00h
mov r8,a
inc a
mov [tde],a
incg tde
addg tde,vvp
mov a,#dothpv
mov [tde],a
ret
hbde1:mov?a,!!hwbuffer1
movg vvp,#00h
mov r8,a
sub a,#06h
mov !!hwbuffer1,a
movg whl,#hwbuffer2
addg vvp,whl
movg whl,tde
addg whl,#06h
subg vvp,whl
mov c,r8
movbk [tde+],[whl+]
ret
phw3:movg tde,#lintsp
mov a,[tde]
movg vvp,#00h
mov r8,a
inc a
mov [tde],a
incg tde
addg tde,vvp
mov a,#handwv3;
mov [tde],a ;
ret
END
10, TM6 interrupt service routine:
NAME xtm6n
PUBLIC xtm6z,inttm6
extrn inget1,tm6hpv,
tm6prog,lintprog,lintsp,
tm6flag
CSEG
xtm6z:push?psw
sel rb3
push ax
push rp1
push tde
push vvp
push whl
call !!ptp
mov a,!!tm6flag
cmp a,#0ffh
bnz $out
mov !!tm6flag,#00h
mov cr60,#3ah
mov prm6,#07h
mov?tmic6,#00h
mov tmc6,#80h
out:pop?whl
pop vvp
pop tde
pop rp1
pop ax
pop psw
ret
intm6:sel?rb7
push ax
push rp1
push rp2
push rp3
push whl
push vvp
push tde
push uup
movg whl,sp
addg whl,#14h
movg tde,#0ffaa0h
mov c,#04h
movbk [tde+],[whl+]
movg uup,#tm6prog
mov a,[uup]
cmp a,#00h
bnz $t8
br!!t2
t8:mov?r7,a
mov r6,#00h
mov r5,#00h
incg uup
t7:mov?a,[uup]
dec a
cmp a,#00h
bnz $t3
incg uup
movg whl,[uup]
call !!plp
decg uup
movg tde,uup
call !!del
mov r5,#0ffh;
call !!pls
br!!t4
t3:mov [uup],a
addg uup,#04h
dec r7
t4:cmpr7,#00h
bz$t5
br!!t7
t5:movg whl,#tm6prog
mov a,[whl]
sub a,r6
mov [whl],a
cmp r5,#0ffh
bz$t6
br!!tout
t6:movg uup,#tm6prog
mov a,[uup]
cmp a,#00h
bz$t2
br!!tout
t2:mov!!tm6flag,#0ffh
clr1 tmc6.7
set1 tmic6.6
tout:pop uup
pop tde
pop vvp
pop whl
pop rp3
pop rp2
pop rp1
pop ax
rcti
ptp:movg tde,#tm6prog
mov a,[tde]
mov x,a
inc a
mov [tde],a
mov a,#04h
mulu x
movg vvp,#00h
movw rp4,ax
incg tde
addg tde,vvp
mov c,#04h
movg whl,#inget1
movbk [tde+],[whl+]
ret
del:dec r7
cmp r7,#00h
bz$dout
mov a,r7;
mov x,#04h
mulu x
movg whl,tde
addg whl,#04h
mov c,x
cmp c,#00h
bz$dl
movbk [tde+],[whl+]
dl:cmp?a,#00h
bz$dout
mov c,#0ffh
movbk [tde+],[whl+]
dec a
br!!dl
dout:inc?r6
ret
plp:movg tde,#lintprog
movg vvp,#00h
mov a,#tm6hpv
mov r8,a
addg tde,vvp
mov a,[tde]
inc a ;
mov [tde],a
dec a
mov x,#03h
mulu x
movw rp4,ax
addg tde,vvp
addg tde,#02h;
movg vvp,whl
movg whl,[tde]
addg tde,#03h;
movg [tde],whl
movg whl,vvp
subg tde,#03h
movg [tde],whl
ret
pls:movg tde,#lintsp
movg vvp,#00h
mov a,[tde]
mov r8,a
inc a
mov [tde],a
incg tde
addg tde,vvp
mov a,[tde]
incg tde
mov [tde],a
decg tde
mov a,#tm6hpv
mov [tde],a
ret
END
11, TM8 interrupt service routine:
NAME xtm8n
PUBLIC xtm8z,inttm8
extrn inget1,tm8hpv
,tm8prog,lintprog,lintsp,tm8f
lag
CSEG
xtm8z:push psw
sel rb3
push ax
push rp1
push tde
push vvp
push whl
call !!ptp
mov a,!!tm8flag
cmp a,#0ffh
bnz $out
mov !!tm8flag,#00h
mov cr80,#80h
mov prm8,#07h
mov tmic8,#00h
mov tmc8,#80h
out:pop whl
pop vvp
pop tde
pop rp1
pop ax
pop psw
ret
inttm8:sel?rb7
push ax
push rp1
push rp2
push rp3
push whl
push vvp
push tde
push uup
movg whl,sp
addg whl,#14h
movg tde,#0ffaa0h
mov c,#04h
movbk [tde+],[whl+]
movg uup,#tm8prog
mov a,[uup]
cmp a,#00h
bnz $t8
br!!t2
t8:mov?r7,a
mov r6,#00h
mov r5,#00h
incg uup
t7:mova,[uup]
dec a
cmp a,#00h
bnz $t3
incg uup
movg whl,[uup]
call !!plp
decg uup
movg tde,uup
call !!del
mov r5,#0ffh
call !!pls
brt4
t3:mov[uup],a
addg uup,#04h
dec r7
t4:cmpr7,#00h
bz$t5
brt7
t5:movg whl,#tm8prog
mov a,[whl]
sub a,r6
mov [whl],a
cmp r5,#0ffh
bz$t6
brtout
t6:movg uup,#tm8prog
mov a,[uup]
cmp a,#00h
bz$t2
brtout
t2:mov?!!tm8flag,#0ffh
clr1 tmc8.7
set1 tmic8.6
dout:pop uup
pop tde
pop vvp
pop whl
pop rp3
pop rp2
pop rp1
pop ax
reti
ptp:movg tde,#tm8prog
mov a,[tde]
mov x,a
inc a
mov [tde],a
mov a,#04h
mulu x
movg vvp,#00h
movw rp4,ax
incg tde
addg tde,vvp
mov c,#04h
movg whl,#inget1
movbk [tde+],[whl+]
ret
del:dec r7
cmp r7,#00h
bz$dout
mov a,r7
mov x,#04h
mulu x
movg whl,tde
addg whl,#04h
mov c,x
cmp c,#00h
bz$dl
movbk?[tde+],[whl+]
dl:cmp?a,#00h
bz$dout
mov c,#0ffh
movbk [tde+],[whl+]
dcc a
brdl
dout:inc r6
ret
plp:movg tde,#lintprog
movg vvp,#00h
mov a,#tm8hpv
mov r8,a
addg tde,vvp
mov a,[tde]
inc a
mov [tde],a
dec a
mov x,#03h
mulu x
movw rp4,ax
addg tde,vvp
addg tde,#02h;t
movg vvp,whl
movg whl,[tde]
addg tde,#03h;
movg [tde],whl
movg whl,vvp
subg tde,#03h;tde-3
movg [tde],whl
ret
pls:movg tde,#lintsp
movg vvp,#00h
mov a,[tde]
mov r8,a
inc a
mov [tde],a
incg tde
addg tde,vvp
mov a,[tde]
incg tde
mov [tde],a
decg tde
mov a,#tm8hpv
mov [tde],a
ret
END
12, vector change-detection program:
NAME xvtcn
PUBLIC xvtcz
extrn inget1,inget4,
inget7,xcon1,ycon1,xcon2
,ycon2
extrn xcon3,xcon4
,ycon3,ycon4,ycon6,ang30min
CSEG
xvtcz:push psw
sel rb3
movg whl,inget1
movg uup,inget4
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bz$xv1
addg whl,#02h
addg uup,#02h
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bnz $xv2
br!!xv3
xv2:mov a,#01h
mov [%inget7],a
br!!out
xv1:addg whl,#02h
addg?uup,#02h
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bz$xv4
br!!xv5
xv4:decg whl
decg uup
mov a,[whl]
mov x,a
cmp x,#00h
bnz $xv42
mov a,[uup]
cmp a,x
bnz $xv42
xv43:mov a,#00h
mov [%inget7],a
br!!out
xv42:addg?whl,#02h
addg uup,#02h
mov a,[whl]
mov x,a;
cmp x,#00h
bnz $xv41
mov a,[uup]
cmp a,x
bnz $xv4i
br!!xv43
xv41:movg whl,inget1
movg uup,inget4
mov a,[whl]
cmp a,#01
bz$xv44;
br!!xv45;
xv44:addg whl,#02h
mov a,[whl]
cmp a,#00h
bz$xv46
br!!xv47
xv46:incg?whl
mov a,[whl]
cmp a,#00h
bnz $xv48
mov a,#01h
xv48:mov c,a?;
subg whl,#02h
addg uup,#03h
mov a,[whl]
mov x,a
mov a,[uup]
mulu x
divuw c
movw rp1,ax
subg uup,#02h
mov a,[uup]
mov x,a
mov a,#00h
cmpw ax,rp1
bnz $xv49
br!!xv43
xv49:bc $xv410
br!!xv411
xv410:movg?whl,inget1
incg whl
mov a,[whl]
mov x,#xcon1
mulu x
movw rp1,ax
addg whl,#02h
mov a,[whl]
mov x,#ycon1
mulu x
cmpw ax,rp1
bnc $xv4101
movg uup,inget4
incg uup
mov a,[uup]
mov x,#xcon4
mulu x
movw rp1,ax
addg uup,#02h
mov a,[uup]
mov x,#11h
mulu x
cmpw rp,ax
bnc $xv4101
mov a,#01h
mov [%inget7],a
br!!out
xv4101:br !!xv43
xv411:movg?whl,inget1
incg whl
mov a,[whl]
mov x,#ang30min;
mulu x
movw rp1,ax
addg whl,#02h
mov a,[whl]
mov x,#0ah
mulu x
cmpw ax,rp1
bc$xv4111
movg uup,inget4
incg uup
mov a,[uup]
mov x,#0ah
mulu x
movw rp1,ax
addg uup,#02h
mov a,[uup]
mov x,#ang30min
mulu x
cmpw ax,rp1
bnc $xv4111
mov a,#01h
mov [%inget7],a
br!!out
xv4111:br !!xv43
xv47:incg whl
mov a,[whl]
cmp a,#00h
bnz $xv471
mov a,#01h
xv471:mov c,a
subg whl,#02h
addg uup,#03h
mov a,[whl]
mov x,a
mov a,[uup]
mulu x
divuw c
movw rp1,ax
subg uup,#02h
mov a,[uup]
mov x,a
mov a,#00h
cmpw ax,rp1
bnz $xv472
br!!xv43
xv472:bc $xv473
br!!xv474
xv473:br !!xv410
xv474:movg?whl,inget1
incg whl
mov a,[whl]
mov x,#ycon6
mulu x
movw rp1,ax
addg whl,#02h
mov a,[whl]
mov x,#0eh
mulu x
cmpw rp1,ax
bnc $xv475
movg uup,inget4
addg uup,#03h
mov a,[uup]
mov x,#0eh
mulu x
movw rp1,ax
subg uup,#02h
mov a,[uup]
mov x,#ycon6
mulu x
cmpw rp1,ax
bnc $xv475
mov a,#01h
mov [%inget7],a
br!!out
xv475:br !!xv43
xv45:addg whl,#02h
mov a,[whl]
cmp a,#00h
bz$xv451
br!!xv43
xv451:movg?whl,inget1
addg whl,#03h
mov a,[whl]
cmp a,#00h
bnz $xv452
mov a,#01h
xv452:mov c,a
subg whl,#02h
movg uup,inget4
addg uup,#03h
mov a,[whl]
mov x,a
mov a,[uup]
mulu x
divuw c
movw rp1,ax
subg uup,#02h
mov a,[uup]
mov x,a
mov a,#00h
cmpw ax,rp1
bc$xv453
mov a,[whl]
mov x,#ang30min
mulu x
mov c,#08h
divuw?c
movw rp1,ax
addg whl,#02h
mov a,[whl]
mov x,a
mov a,#00h
cmpw rp1,ax
bnc $xv454
mov a,[uup]
mov x,a
mov a,#00h
movw rp2,ax
addg uup,#02h
mov a,[uup]
mov x,#ang30min
mulu x
mov c,#0ch
divuw?c
cmpw ax,rp2
bnc $xv454
mov a,#01h
mov [%inget7],a
br!!out
xv454:br !!xv43
xv14101:br!!xv4i01
xv453:movg?whl,inget1
incg whl
mov a,[whl]
mov x,#18h
mulu x
movw rp1,ax
addg whl,#02h
mov a,[whl]
mov x,#ycon1
mulu x
cmpw ax,rp1
bnc $xv14101
movg uup,inget4
incg uup
mov a,[uup]
mov x,#xcon4
mulu x
movw rp1,ax
addg uup,#02h
mov a,[uup]
mov x,#07h
mulu x
cmpw rp1,ax
bnc $xv14101
mov a,#01h
mov [%inget7],a
br!!out
xv3:incg whl
incg uup
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bnc $xv31
mov r6,x
mov r4,a
subg whl,#02h
subg uup,#02h
mov a,[whl]
mov r7,a
mov a,[uup]
mov r5,a
br!!xv32
xv31:mov r6,a
mov r4,x
subg whl,#02h
subg uup,#02h
mov a,[uup]
mov r7,a
mov a,[whl]
mov r5,a
xv32:cmp r4,#00h
bnz $xv34
br!!xv33
xv131:br?!!xv132
xv34:movg whl,inget1
mov a,[whl]
cmp a,#00h
bz$xv13a
movg whl,inget4
mov a,[whl]
cmp a,#00h
bnz $xv131
xv13a:mov a,r6
mulu r5
divuw r4
mov c,r7
mov b,#00h
addw ax,bc
mov c,#xcon2
muluw rp1
cmp x,#00h
bnz $xv33
mov a,#10h
mulu r6
cmpw ax,bc
bc$xv33
movg whl,inget1
addg whl,#02h
mov a,[whl]
cmp a,#00h
bnz $xv35
subg whl,#02h
mov a,[whl]
cmp a,#00h
bz$xv36
mov a,#0e2h
mov [%inget7],a
br!!out
xv36:mov a,#0f4h
mov [%inget7],a
br!!out
xv35:subg whl,#02h
mov a,[whl]
cmp a,#00h
bz$xv37
mov a,#0f2h
mov [%inget7],a
br!!out
xv37:mov a,#0e4h
movv [%inget7],a
br!!out
xv33:mov a,#01h
mov [%inget7],a
br!!out
xv132:mov a,r6
mulu r5
divuw r4
mov c,r7
mov b,#00h
addw ax,bc
mov c,#xcon2
muluw rp1
cmp x,#00h
bnz $xv33
mov a,#xcon2
mulu r6
cmpw ax,bc
bc$xv33
movg whl,inget1
addg whl,#02h
mov a,[whl]
cmp a,#00h
bnz $xv35
subg whl,#02h
mov a,[whl]
cmp a,#00h
bz$xv36
mov a,#0e2h
mov [%inget7],a
br!!out
xv5:decg whl
decg uup
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bnc $xv51
mov r7,x
mov r5,a
addg whl,#02h
addg uup,#02h
mov a,[whl]
mov r6,a
mov a,[uup]
mov r4,a
br!!xv52
xv51:mov r7,a
mov r5,x
addg whl,#02h
addg uup,#02h
mov a,[uup]
mov r6,a
mov a,[whl]
mov r4,a
xv52:cmp r5,#00h
bnz $xv54
br!!xv53
xv54:mov a,r7
mulu r4
divuw?r5
mov c,r6
mov b,#00h
addw ax,bc
mov c,#ycon1
muluw?rp1
cmp x,#00h
bnz $xv53
moov a,#ycon1
mulu r7
cmpw ax,bc
bc$xv53
movg?whl,inget1
moov a,[whl]
cmp a,#00h
bnz $xv55
addg whl,#02h
mov a,[whl]
cmp a,#00h
bz$xv56
mov a,#0f1h
mov [%inget7],a
br!!out
xv56:mov a,#0e3h
mov [%inget7],a
br!!out
xv55:addg whl,#02h
mov a,[whl]
cmp a,#00h
bz$xv57
mov a,#0e1h
mov [%inget7],a
br!!out
xv57:mov a,#0f3h
mov [%inget7],a
br!!out
xv53:mov a,#01h
mov [%inget7],a
out:pop psw
ret
END
13, survey the movement tendency of vector:
NAME xvtmn
PUBLIC xvtmz,xvtm2z
extrn inget1,inget4,inget7
CSEG
xvtmz:push psw
sel rb3
movg whl,inget1
movg uup,inget4
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bz$xv1
addg whl,#02h
addg uup,#02h
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bnz $xv2
br!!xv3
xv2:mov a,#03h
mov [%inget7],a
br!!out
xvl:addg whl,#02h
addg uup,#02h
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bz$xv4
br?!!xv5
xv4:subg whl,#02h
mov a,[whl]
cmp a,x
bnz $xv41
incg whl
mov a,[whl]
mov x,a
incg uup
mov a,[uup]
mulu x
movw rp1,ax
addg whl,#02h
subg uup,#02h
mov a,[whl]
mov x,a
mov a,[uup]
mulu x
cmpw ax,rp1
bnz $xv42
xv44:mov a,#00h
mov [%inget7],a
br!!out
xv42:bnc $xv43
mov a,#02h
mov [%inget7],a
br!!out
xv43:mov a,#01h
mov [%inget7],a
br!!out
xv41:incg whl
mov a,[whl]
mov x,a
incg uup
mov a,[uup]
mulu x
movw rp1,ax
addg whl,#02h
subg uup,#02h
mov a,[whl]
mov x,a
mov a,[uup]
mulu x
cmpw ax,rp1
bnz $xv45
br!!xv44
xv45:bc $xv43
br!!xv42
xv3:cmp a,#00h
bnz $xv31
subg whl,#02h
mov a,[whl]
cmp a,#00h
bnz $xv32
xv33:mov a,#02h
mov [%inget7],a
br!!out
xv32:mov a,#01h
mov [%inget7],a
br!!out
xv31:subg?whl,#02h
mov a,[whl]
cmp a,#00h
bnz $xv33
br!!xv32
xv5:subg whl,#02h
mov a,[whl]
cmp a,#00h
bnz $xv51
addg whl,#02h
mov a,[whl]
cmp a,#00h
bnz $xv52
xv53:
mov a,#01h
mov [%inget7],a
br!!out
xv52:mov a,#02h
mov [%inget7],a
br!!out
xv51:addg whl,#02h
mov a,[whl]
cmp a,#00h
bnz $xv53
br!!xv52
xvtm2z:push psw
sel rb3
movg whl,inget1
movg uup,inget4
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bnz $xvt1
br!!xv1
xvt1:addg whl,#02h
addg uup,#02h
mov a,[whl]
mov x,a
mov a,[uup]
cmp a,x
bnz $xvt2
br!!xv3
xvt2:incg whl
mov a,[whl]
cmp a,#00h
bnz $xvt3
mov a,#01h
xvt3:mov c,a
subg whl,#02h
incg uup
mov a,[whl]
moov x,a
mov a,[uup]
mulu x
divuw?c
movw rp1,ax
subg uup,#02h
mov a,[uup]
mov x,a
mov a,#00h
movw rp2,ax
decg whl
mov a,[whl]
cmp a,#00h
bnz $xvt4
cmpw rp1,rp2
bnc $xvt5
xvt6:
mov a,#01h
mov [%inget7],a
br!!out
xvt5:mov a,#02h
mov [%inget7],a
br!!out
xvt4:cmpw rp1,rp2
bnc $xvt6
br!!xvt5
out:pop psw
ret
END
14, AD Interrupt Process, P06 port interrupt
Processing, TM7 time Interrupt Process supervisor
NAME?zpubn
public?readfend,readfinit,
writf,get_data,ztoabs,
disp_key,disp_one,
disp_addr,readlcd,rprsl,
prs1,prs0
public?disp_word,ini_1,
ini_2,clrram,clear,disp_line,
get_datamn
public?intp01,intp06,inttm2,
inttm7,intad,rprs2
extrn?aqs2z,aqslz,indexallin,
lcd_lin,lcd_vol,lcd_data,
key_code,disp_code,z_syslflag
infindl,zf,hz
extrn?sptemp,indexallout,
infind5,infind8,z_sysflag,
infind2,lcd_linmax,lcd_vol?max
z_mtemp,z_offtemp
extrn
addrad,hzword,z_intflg1,
z_intflg4,z_actbtemp,z_ltcmp,
z_maddtcmp,infind6,z_offabs
extrn?z_sys4flag,lintsp,
handwv,adonez,picbytes,
getdataaddr,lcdxy,z_intflg3,
lcdxyx,lcdxyy,x00,y00,xmax,
ymax
extrn luqd860z
cseg
intp06:sel?rb6
clr1?z_intflg3.4
bt?z_sys4flag.2,$handp06
intp060:
mov?pic6,#01000011b
clr1?egp0.6
clr1?egn0.6
mov?tmic7,#00000011b
mov?tmc7,#10000000b
mov?prm7,#00000111b
mov?cr70,#7fh
set1?z_syslflag.1
clr1?z_syslflag.2
clr1?z_syslflag.3
clr1?z_syslflag.4
reti
handp06:
mov?pic6,#01000011b
clr1?egp0.6
clr1?egn0.6
mov?tmic7,#00000011b
mov?tmc7,#10000000b
mov?prm7,#00000111b
mov?cr70,#3ah
reti
handtm7:
bf?z_syslflag.4,$inttm70
bf?p0.6,$torethand
call?!!adonez
br!!toret
torethand:push?vvp
movw !!lcdxy,#0ffffh
movg tde,#lintsp
movg vvp,#00h
mov a,[tde]
mov r8,a
inc a
mov [tde],a
incg tde
addg tde,vvp
mov a,[tde]
incg tde
mov [tde],a
decg tde
mov a,#handwv
mov [tde],a
mov tmic7,#01000011b
mov tmc7,#00000111b
pop vvp
pop tde
pop ax
reti
inttm7:sel?rb7
push?ax
push?tde
bt?z_sys4flag.2,$handtm7
set1?z_intflg3.2
inttm70:
bt?z_syslflag.2,$multm1
mov?a,p0
bf?p0.6,$toerr
set1?pm0.4
clr1?pm0.4
clr1?p0.4
set1?pm0.6
clc1?pm9.4
set1?pm0.3
clr1?pm0.5
set1?p0.5
clr1p9.4
mov?adic,#00000011b
mov?adm,#10100000b
mov?adis,#00000111b
movg?tde,#0ffd57h
movg?addrad,tde
setl?z_syslflag.0
setl?z_syslflag.2
toret:pop?tde
pop?ax
reti
toerr:set1?pm0.3
set1?pm0.5
set1?pm0.4
set1?pm0.6
set1?pm9.4
clr1?pm0.5
clr1?pm0.4
clr1?p0.4
clr1?p0.5
mov?pic6,#0000001b
set1?egp0.6
clr1?egn0.6
mov?tmic7,#01000011b
mov?tmc7,#00000111b
setl?z_sysl?fiag.4
br!toret
multm1:bf?p0.6,$nopress
press:br!toret
sectml:set1 z_syslflag.3
br!toret
nopress:
bf?z_syslflag.3,$sectm1
set1?z_syslflag.4
mov?tmic7,#01000011b
mov?tmc7,#00000111b
mov?pic6,#00000000b
set1?egp0.6
clr1?egn0.6
clr1?z_syslflag.2
clr1?z_syslflag.3
set1?pm0.3
clr1?pm0.5
clr1?pm0.4
set1?pm9.4
clr1?p0.4
clr1?p0.5
set1?pm0.6
br!toret
intad:sel?rb6
push?whl
push?tde
push?ax
mov?a,adcr
mov?adic,#01000011b
mov?adm,#00100000b
bf
z_sys4flag2,$intap11
bf?z_intflg3.1,$intap12
cmp a,#Ofch
bc $intap13
clr1?pm0.4
clr1?pm0.5
set1?p0.5
clr1?p0.4
set1?pm0.3
clr1?pm9.4
clr1?p9.4
set1z_syslflag.0
clr1?z_intflg3.1
set1?z_intflg3.2
mov?adis,#00000111b
mov?adic,#00000011b
nop
nop
nop
nop
nop
nop
mov adm,#10100000b
br?!intadpret
intap13:
movw?!!lcdxyx,#0ffffh
br?!!adhand
intap12:bt
z_intflg3.2,$intap11
cmp a,#0fch
bc $intap13
br !!adhand
intap11:
bf?z_syslflag.0,$intad6p
set1?p9.4
nop
nop
nop
nop
nop
set1?pm0.6
clr1?pm0.5
clr1?pm0.4
set1?p0.4
clr1?p0.5
set1?pm9.4
nop
nop
nop
nop
clr1?pm0.3
clr1?p0.3
clr1?z_syslflag.0
movg?whl,addrad
bf?z_intflg3.3,$changey
savey:mov?[whl],a
mov !!lcdxyy,a
subg?whl,#1
movg?addrad,whl
mov adis,#00000110b
mov?adic,#00000011b?mov
adm,#10100000b
br !intadpret
changey:sub?a,y00
mov?x,#0ffh
mulu?x
mov?e,ymax
sub?e,y00
divuw?e
mov?a,x
br $!savey
changex:sub?a,x00
mov?x,#0ffh
mulu?x
mov?e,xmax
sub?e,x00
divuw?e
mov?a,x
br $!savex
intad6p:setl?p9.4
movg?whl,addrad
mov?x,#0ffh
sub?x,a
mov?a,x
bf?z_intflg3.3,$changex
savex:?mov?[whl],a
mov?!!lcdxyx,a
clr1?adm?7
mov?adic,#01000011b
set1?pm0.3
set1?pm0.6
clr1?pm0.5
clr1?pm0.4
clr1?p0.4
clr1?p0.5
set1?pm9.4
set1?z_intflg1.6
clr1?z_syslflag.1
bf
z_sys4flag.2,$intadpret2
clr1?pm0.3
clr1?p0.3
set1?z_syslflag.0
clr1?z_intflg3.1
clr1?z_intflg3.2
mov?adis,#00000110b
mov?adic,#00000011b
mov?adm,#10100000b
br?!!intadpret
intadpret2:set1?z_intflg4.7
br!!intadpret
adhand:push?tde
movg?whl,#lintsp
mov?a,[whl]
add?a,#1
mov?[whl],a
movg?tde,#0
mov?e,a
addg?whl,tde
mov?a,#handwv
mov?[whl],a
pop?tde
mov?tmic7,#01000011b?mov
tmc7,#00000111b?setl?pm0.3
clr1?pm0.5
clr1?pm0.4
clr1?p0.5
clr1?p0.4
set1?pm0.6
set1?pm9.4
intadpret:pop?ax
pop?tde
pop?whl
reti
END
15, main program:
manu?52h;
manuheader1
manu?52h?ffh;
#include″12.h″;
begin;define?at?0ffd00h
back?41?flagy?code
num1?data?d?3?tempadd
todata?2(1?binum1?1
binum2)binum?1?errnum
4?bdataaddr?1?f5num
at?0ffe57h?zsysflag?zintflgl
zintflg2?1?1?zsys4flag
at?0ffe7ah?tempcode
zsys2flag?2?1?user?zsyslflag
at?0ffdb6h?zsys5flag
at?0ffd56h?xx?yy
at?0fff0dh?p130
at?0ff400h?2?hwall
at?0ffd5fh?hwtm2
at?0ffdb7h?hwtm2copy
at?0ff370h?handdatal
at?0ffd20h?3?inter1
at?0ffaa0h?resend
at?0ffab0h?sendok
at?0ffac0h?senddata
at?0ff828h?num11?num12
at?0ff768h?num10?num20
at?0fe008h?3?record
at?0fe007h?send2;
fiagy=0;
let2(zsysflag(08h))=0;
start0:let2(flagy(40h))=0;
start:if?zsys4flag(80h)=0h
elsegoto?startin:
play
_to(0fe008h),_text(02h,07h,00
h,f1h,00h,f5h,00h,00h,00h,00h
);
num10=1,num20=1;
startin:clearscreena11;
displaycin(3,1)is?00dah;
displaycin(7,1)is?lebfh?lec0h
lec1h?lec2h;
displayin(4,14)is?3ah;
play
_to(0ff820h),_text(1,1,1,1,1,
42h,1,1,1,1,1,1);
num11=hum10,num12=num20,tempa
dd=0ff820h+6,{tempadd}=num10,
tempadd=0ff820h+7,{tempadd}=n
um20;
refresh
_from(record),_para(0ff820h),
_mode(2),_back(back);
dispcur
_from(record),_para(0ff820h),
_mode(0),_back(back);
play
_to(senddata),_text(00h,ffh,c
ah,ffh);
d=1,todata=0ff890h+1,{todata}
=0;
ishand:if?flagy(40h)=40h?goto
start0;
hwall=0;
play
_to(0ff370h),_text(0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
,0);
let2(zsys4flag(04h))=04h;
let2(zintflg1(01))=0;
coor?dinate;
waitnew_name(70),_line(t1);
t1;if?zintflg1(01)=01goto
iskey;
ishand1:cmk8
_data($hwall),_back(back);
handbag;
goto?tosend3;
ifhand:switch?zsys5flag={1
ishand,3ishand,4ifishand};
goto?ifkey;
ifishahd:if?flagy(20h)=20h
goto?ifkey;
goto?ishand;
ifkey:keywait;
iskey:ad
_from(xx,yy),_to(tempcode),_m
anu(78h),_line(0ah);
if?tempcode=0?goto?ad2;
let2(flagy(80h))=0;
code=tempcode;
switch?code={9fh?esc,a3h
csncel,89h?enter,83h?left,84h
right};
if?zsys5flag=3?goto?ishand1;
goto?ishand;
left:dispcur
_from(record),_para(0ff820h),
_mode(1),_back(back);
toleft:switch?back={2?left3,3
right5,5right5};
goto?ifhand;
left3:refresh
_from(record),_para(0ff820h),
_mode(3),_back(back);
dispcur
_from(record),_para(0ff820h),
_mode(0),_back(back);
goto?ifhand;
right5:refresh
_from(record),_para(0ff820h),
_mode(1),_back(back);
dispcur
_from(record),_para(0ff820h),
_mode(0),_back(back);
goto?ifhand;
right:dispcur
_from(record),_para(0ff820h),
_mode(2),_back(back);
goto?toleft;
csncel:tempadd=0ff888h,{tempa
dd}=num11,tempadd=tempadd+1,{
tempadd}=num12;
delete
_from(record),_text(0ff888h),
_back(back);
refresh
_from(record),_para(0ff820h),
_mode(2),_back(back);
dispcur
_from(record),_para(0ff820h),
_mode(0),_back(back);
goto?ifhand;
function:clearscreenall;
num1=1;
Displaycin 1,1, and is " refreshes " automatically
Nextline 1 " semi-automatic refreshing ";
Displaycin 5,1, is " manual refreshing "
Nextline 1 " speed setting ";
displayin(2,65)is
3ah,(4,81)is?3ah,(6,65)is
3ah,(8,65)is?3ah;
call?funcset;
functionl:displayinflag?52h
flagl?zsys5flag?is?e5h;
inputa:keywait;
ad
_from(xx,yy),_to(tempcode),_m
anu(78h),_line(0ah);
if?tempcode=0?goto?ad2a;
getkeyto
back,code,data,zsys5flag,num1
,1,4,1;
switch?data={7?entera,8esca,1
movea};
goto?inputa;
entera:goto?funcret;
esca:goto?funcret;
toinputa:let2(flagy(08h))=0;
goto?inputa;
movea:clearscreenfrom
(2,70)to(2,77),(4,86)to(4,93)
,(6,70)to(6,77),(8,70)to(8,77
);
displayinflag?52h?flag1
zsys5flag?is?e5h;
call?funcset;
goto?inputa;
flag1:dbcur
(2,70),(4,86),(6,70),(8,70);
ad2a:ad
_from(xx,yy),_to(data),_manu(
78h),_line(21h);
switch?data={5?suba,6?adda};
zsys5flag=data;
goto?movea;
suba:if?flagy(08h)=08h
elsegoto?inputa;
if?hwtm2>=32h?elaegoto?inputa;
hwtm2=hwtm2-19h,hwtm2copy=hwt
m2;
goto?dispa;
adda:if?flagy(08h)=08h
elsegoto?inputa;
if?hwtm2<=elh?elsegoto?inputa;
hwtm2=hwtm2+19h,hwtm2copy=hwt
m2;
goto?dispa;
funcret:goto?start;
funcset:switch?zsys5flag={1
set1,2set2,3set3,4set4};
return;
set1:hwtm2=hwtm2copy;
let2(flagy(20h))=0h;
return;
set2:hwtm2=hwtm2copy;
let2(flagy(20h))=20h;
return;
set3:hwtm2=ffh;
return;
set4:hwtm2=hwtm2copy;
displaycin(7,84)is?lebfh?move
16lec0h;
let2(flagy(08h))=08h;
num1=hwtm2/
19h-1,num1=num1+30h,code=8,da
ta=105;
displayin(code,data)is?num1;
return;
dispa:num1=hwtm2/
19h-1,num1=num1+30h,code=8,da
ta=105;
displayin(code,data)is?num1;
goto?inputa;
tosend3:binum=hwall,tempadd=0
ffa00h,errnum=0;
if?binum1=0?goto?ishand;
sendl _from(#hwall);
goto?wait3;
send:tempadd=0ffa00h,errnum=0
main2:sendl_from(#senddata);
wait3:if?zintflg1(20h)=20h
elsegoto?wait3;
resend21:download3
_to(tempadd),_back(dara);
waitnew_name(84),_line(t2);
t2:if?data=0?elsegoto
toresend2;
todata=tempadd+4,data={todata
};
switch?data={2?tomain2,3
ifhand,14h?nodata};
goto?nodata;
tomain2:clearscreenall;
Displaycin (3,34) is " miscommunication "
00bch nextline 6 " please returns by any key
Return ";
keywait;
goto?start;
toresend2:play
_to(resend),_text(09h,ffh,cah
,ffh,04h,57h,5bh,00h,ffh,ffh)
sendl_from(#resend);
wait5:if?zintflg1(20h)=20h
elsegoto?wait5;
goto?resend21;
nodata:clearscreenfrom(3,17)t
o(4,64),(5,1)to(6,64);
Displaycin (3,1) is 00dah is " countless
According to ";
goto?ifhand;
sendret:goto?ishand;
enter:if?zsys4flag(80h)=80h
goto?iscall;
ispcbj:goto?tosend3;
iscall:return;
esc:return;
ad2:ad
_from(xx,yy),_to(num1),_manu(
78h),_line(20h);
revlcdfrom
_line(revlcd),_num(num1);
adwait:if?zsyslflag(10h)=10h
elsegoto?adwait;
revlcdfrom
_line(revlcd),_num(num1);
let2(flagy(80h))=00h;
switch?num1={0bh?funnction};
if?zsys5flag=3?goto?ishand1;
goto?ishand;
revlcd:db
(3,17,4,32),(3,33,4,48),(3,49
,4,64),(5,1,6,16),(5,17,6,32)
,(5,33,6,48),(5,49,6,64),(7,1
,8,16),(7,17,8,32),(7,33,8,48
),(7,49,8,64),(0,0,0,0);
end;

Claims (8)

1. method that makes communication terminal realize the handwriting information interchange, it is characterized in that: the touch-screen with printing opacity replaces at the display device front of existing communication terminal and the material of the printing opacity between the outside, by a touch screen controller control touch-screen, carry out the collection of handwriting data, and generate the stroke vector data, finish the real-time demonstration of hand-written process as required by touch screen controller or main controller of communication terminals; To include the person's handwriting vector data of stroke vector data and the information of existing voice or image or literal or other data is edited storage by main controller of communication terminals; When needs were sent to other communication terminal with handwriting information, the existing transmitted image that the data that will include the person's handwriting vector data under the control of main controller of communication terminals are deferred to via this communication terminal or the method for sound or literal or other data sent; After communication terminal is received the data that include the person's handwriting vector data according to the method for its existing reception image of deferring to or sound or literal or other data, store this information in existing mode; When needs show the handwriting information that these data comprise,, and amplify and dwindle each person's handwriting according to needs according to each person's handwriting vector data each person's handwriting that draws again.
2. a kind of method that makes communication terminal realize the handwriting information interchange as claimed in claim 1, it is characterized in that: the touch-screen of described printing opacity is as the transducer of handwriting, comprised when pen when touch screen surface moves, to the material of the mobile component sensitivity of horizontal direction and vertical direction.
3. a kind of method that makes communication terminal realize the handwriting information interchange as claimed in claim 1 is characterized in that: described touch screen controller have related circuit by certain sequential to touch-screen provide drive signal detect when when touch screen surface moves in the horizontal direction with the mobile component of vertical direction and obtain the horizontal direction of corresponding person's handwriting point and the coordinate components of vertical direction; Described touch screen controller is analyzed the displacement vector of pen trace motion, produces the stroke vector data.
4. a kind of method that makes communication terminal realize the handwriting information interchange as claimed in claim 3, it is characterized in that: when described touch-screen was resistance-type printing opacity touch-screen, described touch screen controller included two-way analog to digital change-over circuit (A/D circuit) at least; Have and when each pen begins to write, produce the mechanism of interrupting; At least have 4 pins and be used for controlling separately respectively the level of the touch-screen of being controlled and a pin of vertical direction; When pen is just write on touch-screen, at least include such flow process twice in the sequential of described touch screen controller collection any point coordinate: in the moment 1, touch screen controller connects fixing known high level with a certain pin 1 of the direction 1 (horizontal direction or vertical direction) of touch-screen, and another pin 2 of this direction 1 connects same fixing known high level or connects high impedance; Touch screen controller connects high impedance with two pins of touch panel direction 2 (direction of non-direction 1); In the moment 2, touch screen controller is by the level of a pin 3 of the transition detection touch panel direction 2 of analog to digital; Constantly 3, touch screen controller is obtained the level pairing numerical value of pin 3 after the converting of analog to digital; In the moment 4, judge whether the pairing numerical value of level of pin 3 is the pairing pin 3 due values of the complete conducting of horizontal direction and vertical direction at this moment; If condition satisfies: continue to gather if this point coordinates has not also been gathered, the coordinate figure of having gathered if this point coordinates has been gathered is effective; If condition does not satisfy: this value of gathering this point coordinates is invalid; Must wait for after default a period of time at interval and gathering again.
5. a kind of method that makes communication terminal realize the handwriting information interchange as claimed in claim 1, it is characterized in that: the generation method of described stroke vector data be when touch screen controller gather during two point coordinates of priority of person's handwriting, store away earlier, and second point coordinates is saved as last coordinate; When gather thirdly behind the coordinate, calculate the displacement vector 2 that the displacement vector 1 that first point coordinates and coordinate thirdly constitute and first point coordinates and last coordinate constitute; Judge whether to satisfy condition 1: the angular separation of vector 1 and vector 2 is not less than the length of vector 2 less than the length of default scope and vector 1; If satisfied this condition 1 thirdly coordinate save as last coordinate, continue to gather a new point coordinates after waiting default a period of time again as coordinate thirdly; If do not satisfy this condition 1 then gather the 4th point coordinates after a period of time, obtain the 4th point coordinates after, calculate the displacement vector 3 that first point coordinates and the 4th point coordinates constitute; Judge whether to satisfy condition 2: the angular separation of vector 3 and vector 1 is not less than the length of vector 3 less than the length of default scope and vector 1; If satisfy condition 2 then cast out thirdly that coordinate saves as last coordinate with the 4th point coordinates, gather a new point coordinates excessively after Yu She a period of time more again as coordinate thirdly; If do not satisfy condition 2 then vector that first point coordinates and last coordinate are constituted as the vector data of a stroke that has generated, with coordinate thirdly as first point coordinates of a new stroke, with second point coordinates and the last coordinate of the 4th point coordinates as a new stroke; If collecting the touch-screen horizontal direction does not contact with vertical direction, then add up continuous not time of contact, if the vector that should the time surpasses the interval set then first point coordinates and last coordinate are constituted is as the vector of a stroke that has generated, and establish a sign and represent that the next coordinate of adopting is first point coordinates, if greater than the interval of another setting then illustrate that this writes end, repeating said process continuous not time of contact can realize the vector data of each stroke of a writing process is collected.
6. a kind of method that makes communication terminal realize the handwriting information interchange as claimed in claim 1, it is characterized in that: described stroke vector data has comprised the starting point coordinate and the terminal point coordinate of this stroke at least.
7. a kind of method that makes communication terminal realize the handwriting information interchange as claimed in claim 1, it is characterized in that: described each person's handwriting vector data includes the data length of the person's handwriting that expression once writes or the data segment of stroke number, includes the stroke vector data of this each stroke of writing; Represent the more shared coordinate time of former and later two strokes when described person's handwriting vector data with same data segment position, then also include stroke that the plurality of data section is used to represent each back whether with the shared same point coordinate of the stroke of front; Then said person's handwriting vector data includes a data segment at least and is used to represent that this is new special literal code when the existing literal code of described person's handwriting vector data and the input of existing alternate manner mixes mutually, still is new complete person's handwriting vector data so that distinguish existing literal code when reading the data of this mixing successively; When the described person's handwriting vector data and the data of existing image or sound or other form are mixed mutually so that send to other communication terminal, when perhaps sending the person's handwriting vector data with the method for existing transmission data, described each person's handwriting vector data includes a data segment at least and is used for distinguishing mutually with existing other data structure.
8. a kind of method that makes communication terminal realize the handwriting information interchange as claimed in claim 1, it is characterized in that: read each stroke vector data that each person's handwriting vector data is comprised successively, starting point and terminal point coordinate according to each stroke vector data, foundation needs size and the life size of whole person's handwriting or the corresponding relation on former border of demonstration on the position that will show, calculate the starting point and the pairing position of terminal point of this stroke, and between this starting point and the pairing position of terminal point, draw a straight line, each stroke vector data that each person's handwriting vector data is comprised draws till all painting successively in the same way.
CNB031227309A 2003-04-18 2003-04-18 Method of realizing handwriting information exchange for cmmunication terminal Expired - Fee Related CN100380907C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031227309A CN100380907C (en) 2003-04-18 2003-04-18 Method of realizing handwriting information exchange for cmmunication terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031227309A CN100380907C (en) 2003-04-18 2003-04-18 Method of realizing handwriting information exchange for cmmunication terminal

Publications (2)

Publication Number Publication Date
CN1538722A CN1538722A (en) 2004-10-20
CN100380907C true CN100380907C (en) 2008-04-09

Family

ID=34321071

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031227309A Expired - Fee Related CN100380907C (en) 2003-04-18 2003-04-18 Method of realizing handwriting information exchange for cmmunication terminal

Country Status (1)

Country Link
CN (1) CN100380907C (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101396974B1 (en) 2007-07-23 2014-05-20 엘지전자 주식회사 Portable terminal and method for processing call signal in the portable terminal
CN101533469A (en) * 2009-04-27 2009-09-16 萧如宣 Touch panel system and operating method thereof
CN102081505A (en) * 2011-01-28 2011-06-01 广东九联科技股份有限公司 Hand input processing method for touch screen
CN102761495B (en) * 2011-04-29 2015-12-16 北京壹人壹本信息科技有限公司 A kind of instant communicating method based on original handwriting, communication terminal and system
CN102929534A (en) * 2011-09-30 2013-02-13 北京大学深圳研究生院 Blind write information input system and method
CN102566812B (en) * 2011-09-30 2015-02-18 北京壹人壹本信息科技有限公司 Method and device for implementation of handwriting notepad
CN102663667B (en) * 2012-03-28 2014-12-24 华为技术有限公司 Storage method and display method for handwritten content on touch screen, terminal equipment
CN102902475B (en) * 2012-08-15 2015-09-16 中国联合网络通信集团有限公司 Numerical value input method and device
JP2014067148A (en) * 2012-09-25 2014-04-17 Toshiba Corp Handwritten document processor and handwritten document processing method and program
CN102937848B (en) * 2012-12-04 2015-07-22 上海合合信息科技发展有限公司 Method for editing handwritings and electronic equipment
KR102286589B1 (en) * 2014-10-17 2021-08-05 주식회사 네오랩컨버전스 Electronic pen
CN104932814A (en) * 2015-04-29 2015-09-23 萌宝信息技术(上海)有限公司 Data transmission method and system and electronic terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1191441A (en) * 1998-01-15 1998-08-26 张伟东 Pen drawing input telefacsimile machine
CN1250902A (en) * 1998-08-13 2000-04-19 摩托罗拉公司 Equipment and method for touch screen to display simultaneously text character and its original hand writing
CN1346200A (en) * 2000-09-27 2002-04-24 北京汉王科技有限公司 Intelligent network telephone
WO2002058376A1 (en) * 2000-12-21 2002-07-25 I-Com Systems Co., Ltd. Method of synchronizing multiple communication terminal apparatus having the graphic functions
US20030063067A1 (en) * 2001-10-02 2003-04-03 Ping-Yang Chuang Real-time handwritten communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1191441A (en) * 1998-01-15 1998-08-26 张伟东 Pen drawing input telefacsimile machine
CN1250902A (en) * 1998-08-13 2000-04-19 摩托罗拉公司 Equipment and method for touch screen to display simultaneously text character and its original hand writing
CN1346200A (en) * 2000-09-27 2002-04-24 北京汉王科技有限公司 Intelligent network telephone
WO2002058376A1 (en) * 2000-12-21 2002-07-25 I-Com Systems Co., Ltd. Method of synchronizing multiple communication terminal apparatus having the graphic functions
US20030063067A1 (en) * 2001-10-02 2003-04-03 Ping-Yang Chuang Real-time handwritten communication system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
触摸屏技术及应用. 杨邦朝,张治安.电子世界,第2期. 2003 *

Also Published As

Publication number Publication date
CN1538722A (en) 2004-10-20

Similar Documents

Publication Publication Date Title
CN100380907C (en) Method of realizing handwriting information exchange for cmmunication terminal
CN104424358B (en) Be used for the multidate information adaptation of the computing equipment with many power modes
CN102045157B (en) Methods and systems for updating a buffer
CN103440116B (en) A kind of interactive electronic demonstration system
CN1613045B (en) Personal computer system based on wireless man machine interacting device and its data transmitting method
CN102109971A (en) Slide projector showing system capable of wirelessly transmitting plotting information
CN101256457A (en) Wireless control laser pen with user identification as well as multiuser light spot recognition system
CN103890744B (en) Multi-touch interface method, system and equipment
CN110795007B (en) Method and device for acquiring screenshot information
CN102681658A (en) Display apparatus controlled by motion and motion control method thereof
CN104951263A (en) Avoiding sending unchanged regions to display
CN101504791A (en) Remote control device for multifunctional intelligent terminal
CN202120198U (en) Mobile touch system
WO2009074278A1 (en) Device and method for inputting combined characters
CN103309437A (en) Buffering mechanism for camera-based gesturing
CN111491208A (en) Video processing method and device, electronic equipment and computer readable medium
CN103616963A (en) System achieving mouse function through smart phone touch technology
CN106503067A (en) The exhibiting method and device of electronic chart
WO2012105792A2 (en) System and method for providing a service for sending a text message by using a background image based on prediction information on a field of interest
CN100524179C (en) Method for inputting letter using pointer for portable device and the portable device
CN2932477Y (en) A mobile phone operation and control system
Rohs Linking physical and virtual worlds with visual markers and handheld devices
CN103854203A (en) Marketing method for cloud system and computer system thereof
CN102929541A (en) Touch-screen-based handwriting processing method and device
CN215895352U (en) Portable display supporting electromagnetic handwriting drawing function

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Zhang Lanman

Document name: Notification of Termination of Patent Right

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080409