CN1538722A - 一种使通信终端实现手写笔迹信息交流的方法 - Google Patents
一种使通信终端实现手写笔迹信息交流的方法 Download PDFInfo
- Publication number
- CN1538722A CN1538722A CNA031227309A CN03122730A CN1538722A CN 1538722 A CN1538722 A CN 1538722A CN A031227309 A CNA031227309 A CN A031227309A CN 03122730 A CN03122730 A CN 03122730A CN 1538722 A CN1538722 A CN 1538722A
- Authority
- CN
- China
- Prior art keywords
- mov
- whl
- handwriting
- movg
- person
- 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.)
- Granted
Links
Images
Landscapes
- Character Discrimination (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
一种使通信终端实现手写笔迹信息交流的方法。涉及文字及图像信息的输入及信息交流的技术。本发明适用于移动通讯终端、固定信息电话机、新型的以笔迹交流为主的通讯终端。本发明采用触摸屏代替现有通信终端的显示器正面与外部之间的透光材料,以一个触摸屏控制器来控制触摸屏,当需要时该触摸屏控制器采集手写笔迹的坐标,分析坐标之间的关系生成笔划矢量数据。将包含有笔划矢量数据的数据传送给通信终端的主控制器。通信终端的主控制器存贮、编辑所得到的笔迹矢量数据。当需要时,通信终端的主控制器以现有方式收发包含有笔迹矢量数据的数据。当需要时,通信终端的主控制器重现所收到的笔迹矢量数据。
Description
技术领域
本发明涉及文字及图像信息的输入及信息交流的技术,是一种在通信终端进行手写笔迹输入(包括文字和图形)并经通信终端发送,由其它通信终端接收并重现手写笔迹,从而实现信息交流的方法。
背景技术
现有的通信终端按文字输入方式可归为两类,一类具有用笔手写输入方式,比如:摩托罗拉公司的388型手机,快译通公司的CECTE698商务手机。另一类为用按键输入,比如:诺基亚的3610型手机,摩托罗拉公司的720型手机,步步高的固定电话短信电话机HCD007TSD。现有的可用笔输入文字的通信终端,是通过对手写的字进行识别,而后选中最近的字来实现文字输入。这种文字输入方式与其它文字输入方式最终形成的代表文字内容的编码相同。其优点是采用笔手写方便。其缺点是需要较大的屏幕来显示与手写文字相关的字的信息,因而这种通信终端一般体积较大,都有一个大屏幕。并且手写的字要较为规矩方能实现高识别率,并且无法传送手画的图形。这种输入方式对通信终端的控制器有较高要求,要求通信终端控制器需增加完成手写的采样及识别,并需要一个相对于其它非手写识别输入的通信终端来说较大的手写识别数据库。由于通信终端控制器(比如手机控制器)大多需要处理的任务多,且与通信有关,因此是专用的控制器,要实现新增手写识别的功能较为困难。而要在具有手写识别的控制器中完成与通信有关的控制也是件困难的事情。现有大多数的通信终端比如手机采用的是按键输入的方式。这种方式的优点是体积小,成本低,较容易实现。其缺点是汉字输入比较烦琐。现有的通信终端舆文字信息的重要性日益提升。比如手机短信,已经成为年轻人使用手机的最重要的一种方式之一。
现有的若干种掌上电脑(也称个人数字助理或PDA)具有便笺记录的功能,比如商务通闪念822。这种方式记录的笔迹信息类似于微软视窗中的画图软件,是以画图的方式来记录的。只是用于其机器本身的一种信息记录,并无通信收发该信息的功能。也并不适合用于通信终端之间传送笔迹信息。
发明内容
为了通信终端用户更加方便地输入图形及文字信息,并使输入的图形及文字信息能方便于发送给其它通信终端,并在其它不同厂家生产的不同种类的不同结构的或对外形尺寸大小有较高要求的通信终端上重现这些信息。也为了通信终端制造商能以低的成本及较少的改动制造出具有笔迹输入、传送及重现功能的通信终端,本发明提出一种使通信终端实现手写笔迹信息交流的新方法。其特征在于:用透光的触摸屏代替在现有的通信终端的显示器件正面与外部之间的透光的材料,由一个触摸屏控制器控制触摸屏,进行手写笔迹数据的采集,并生成笔划矢量数据,根据需要由触摸屏控制器或通信终端的主控制器完成手写过程的实时显示;由通信终端的主控制器将包含有笔划矢量数据的笔迹矢量数据与现有的语音或图像或文字或其它数据的信息进行混合编辑存贮;当需要将笔迹信息传送到其它通信终端时,在通信终端的主控制器的控制下将包含有笔迹矢量数据的数据经由该通信终端所遵从的现有的传送图像或声音或文字或其它数据的方法发送出去;当通信终端依其所遵从的现有的接收图像或声音或文字或其它数据的方法收到包含有笔迹矢量数据的数据后,以现有方式存贮该信息;在需要显示该数据所包含的笔迹信息时,依据每个笔迹矢量数据重新画出每个笔迹,并据需要放大和缩小各个笔迹。
所述的透光的触摸屏作为手写笔迹的传感器,包含了当笔在触摸屏表面移动时,对水平方向和垂直方向的移动分量敏感的材料。
所述的触摸屏控制器具有相应电路通过一定时序给触摸屏提供驱动信号用于检测当笔在触摸屏表面移动时在水平方向和垂直方向的移动分量,并取得相应的笔迹某点的水平方向和垂直方向的坐标分量。所说的触摸屏控制器分析笔迹运动的位移矢量,产生笔划数据。当所述的触摸屏为电阻式透光触摸屏时,所述的触摸屏控制器至少包含有两路模拟到数字转换电路(A/D电路);具有当每次笔开始书写时产生中断的机制;至少具有4个引脚用于分别单独控制所控制的触摸屏的水平和垂直方向的一个引脚;当笔正在触摸屏上书写时,所述的触摸屏控制器采集任一点坐标的时序中至少包含有两次这样的流程:在时刻1,触摸屏控制器将触摸屏的方向1(水平方向或垂直方向)的某一引脚(设为引脚1)接固定的已知的高电平,该方向1的另一引脚(设为引脚2)接同样的固定的已知的高电平或接高阻抗。触摸屏控制器将触摸屏方向2(非方向1的方向)的两个引脚接高阻抗;在时刻2,触摸屏控制器通过模拟到数字的转换检测触摸屏方向2的一个引脚(设为引脚3)的电平;在时刻3,触摸屏控制器取得引脚3经模拟到数字的转换完成后的电平所对应的数值;在时刻4,判断引脚3的电平所对应的数值为这时水平方向和垂直方向完全导通所对应的引脚3应有的值吗?如果条件满足则:如果本点坐标还未采集完则继续采集,如果本点坐标已采集完则采集的坐标值有效。如果条件不满足则:本次采集该点坐标的值无效。须等待预设的一段时间间隔后重新采集。
所述的笔划矢量数据的生成方法是:当触摸屏控制器采集得笔迹的先后的两点坐标时,先存起来,并将第2点坐标存为最后坐标。当采集得第三点笔迹坐标后,计算第三点笔迹坐标与第一点笔迹坐标构成的位移矢量(设为矢量1)和第一点坐标与第二点坐标构成的位移矢量(设为矢量2),判断是否满足条件1:矢量1与矢量2的方向夹角小于预设的范围且矢量1的长度不小于矢量2的长度;如果满足该条件1则第三坐标存为最后坐标,等过一段时间后再继续采集新的一点坐标作为第三点坐标;如果不满足该条件1则过一段时间后采集第4点坐标,得到第4点坐标后,计算第4点坐标与第1点坐标构成的位移矢量(设为矢量3);判断是否满足条件2:矢量3与矢量1的方向夹角小于预设的范围且矢量1的长度不小于矢量3的长度;如果满足条件2则舍去第三点坐标将第4点坐标存为最后坐标,过一段预定的时间后再重新采集新的一点坐标作为第三点坐标;如果不满足条件2则将第1点和最后坐标构成的矢量作为已生成的一个笔划的矢量数据,将第三点坐标作为新的一个笔划的第一点坐标,将第四点坐标作为新的一个笔划的第二点坐标和最后坐标。如果采集到触摸屏水平方向与垂直方向不接触,则统计连续的不接触时间,如果该时间超过预设的间隔则将第一点坐标和最后坐标构成的矢量作为已生成的一个笔划的矢量,并设一个标志表示下一个采到的坐标为第一点坐标,如果连续的不接触时间大于另一设定的间隔则说明本次书写结束,重复上述过程可实现将一次书写过程的每个笔划的矢量数据采集得到。
所述的笔划矢量数据至少包含了该笔划的起点坐标和终点坐标。
所述的每个笔迹矢量数据包含有表示一次书写的笔迹的数据长度或笔划个数的数据段,包含有本次书写的每个笔划的笔划矢量数据。当所述的笔迹矢量数据以同一个数据段位置来表示前后两个笔划共用一点坐标时,则还包含有若干数据段用于表示每个后面的笔划是否与前面的笔划共用同一点坐标。当所说的笔迹矢量数据与现有的其它方式输入的现有的文字编码相混合时则所说的笔迹矢量数据至少包含有一个数据段用于表示这是新的特殊的文字码,以便依次读取这种混合的数据时区分现有的文字编码还是新的完整的笔迹矢量数据。当所说的笔迹矢量数据与现有的图像或声音或其它格式的数据相混合以便发送给其它通信终端,或者以现有的发送数据的方法发送笔迹矢量数据时,所说的每个笔迹矢量数据至少包含有一个数据段用于与现有的其它数据结构相区别。
所述的依据每个笔迹矢量数据重新画出每个笔迹,其方法是依次读取每个笔迹矢量数据所包含的每个笔划矢量数据,依据每个笔划矢量数据的起点和终点坐标,在要显示的位置上依据需显示的大小与整个笔迹的原大小或原边界的对应关系,计算出该笔划的起点和终点所对应的位置,并在该起点和终点所对应的位置间画一直线,将每个笔迹矢量数据所包含的每个笔划矢量数据依次按同样的方法画出直到全部画完为止。
由于本发明对所写的笔迹无需经过识别过程,需要显示的只是手写的笔迹,不需显示当有识别时需要的备选字,因此对通信终端显示屏大小无特别要求,方便于在现有的移动通信终端中实施,满足了人们对移动通信终端体积越小越好的要求。又因为省去了复杂的识别过程,因此速度快。本发明采用触摸屏来代替现有通信终端在显示器正面与外部之间现有的一层透光的保护性材料。在结构上与现有通信终端相同,更容易实施。触摸屏控制器在采集任一点坐标中至少特定的流程执行两遍可以防止一般的触摸屏容易出现的当在笔接触触摸屏时当触摸屏的水平方向和垂直方向的接触出现抖动时,触摸屏控制器采集到的坐标值不准确的现象。本发明所采用的笔迹矢量数据结构的优点是:(1)与通信终端的显示屏的点阵结构无关。对输入端的显示屏和触摸屏的大小无具体要求。方便于不同厂家生产的产品之间的正确重现笔迹。显示屏的点阵结构有横向和纵向之分。如果数据结构与点阵结构有关,要通用是很困难的。(2)在重现笔迹时可以方便的放大和缩小笔迹而不丢失信息。对复杂的字或图画只有通过这种方式才能在重现端看清笔迹的细节。(3)不仅可传文字笔迹,还可传图像笔迹。(4)数据量最小。因为只传一个直线笔划的两端的点坐标,而忽略了两点间的数据,因此大大减少了数据量。(5)本发明将每一次书写过程生成一个笔迹矢量数据,使一段手写文字所对应的每一个字可以类似标准的字代码一样是一个字对应一个笔迹矢量数据,又由于笔迹矢量数据方便于放大和缩小及显示,因此使手写笔迹数据可以像标准的字代码一样进行编辑和显示。
附图说明
图1:实例1在现有移动通信终端上所增加的电路图。
具体实施例1
以电阻式触摸屏作为采集手写笔迹的传感器,以NEC单片机UPD78F4216作为触摸屏控制器。电路图见图1。
UPD78F4316通过第40,41,42引脚与移动手机终端的主控制器相连。当需要手写笔迹输入时,主控制器通过UPD78F4216第40,41,42引脚通知UPD78F4216。UPD78F4216进入采集数据准备状态。当手写笔迹开始时,UPD78F4216开始采集。每次写完一个笔迹后,UPD78F4216将生成的笔迹矢量数据传给主控制器。主控制器则以类似标准文字的方式缩小显示所写笔迹并可以编辑。当全部所需要的笔迹写完后,主控制器存贮所得到的所有笔迹矢量数据。当需要以短信息发出手写笔迹信息时,主控制器将所存该次所得到的所有笔迹矢量数据以短信息的格式打包并发出。当所需发送的数据超过短信息所规定的长度时,依次读取每个完整的笔迹矢量数据,以短信息所允许的长度分次发出。当移动手机终端收到包含有笔迹矢量数据的短信息时存起来,当需要看时,依照数据的先后顺序,显示短信所包含的标准文字或标准图像或笔迹矢量数据。每个笔迹矢量数据也以标准字的大小进行显示。当需要时放大或缩小某个或多个完整的笔迹。
UPD78F4216的软件如下(共15个):
1、中断服务程序的地址设置:NAME aaaaextrn intstla,intp06,inttm6,inttm7,inttm8,intadverp14h cseg at 14hdw tointp06verp1ch cseg at 1chdw intst1verp2eh cseg at 2ehdw tointadverp32h cseg at 32hdw tointtm6verp34h cseg at 34hdw tointtm7verp36h cseg at 36hdw tointtm8csegtointp06:mov !!0ffe3fh,#14hbr !!intp06retiintst1:br !!intstlaretitointad:mov !!0ffe3fh,#2ehbr !!intadretitointtm6:mov !!0ffe3fh,#32hbr !!inttm6retitointtm7:mov !!0ffe3fh,#34hbr !!inttm7retitointtm8:mov !!0ffe3fh,#36hbr !!inttm8retitEND2、生成手写边界数据程序:name abh8npublic abh8zextrn inter1,inter4extrn hxmax,hxmax2,hymax,hymax2,hxmin,hxmin2,hymin,hymin2,hlx0,hly0abh8f equ 0ffd80habh8xs equ 0ffd81habh8ys equ 0ffd82habh8px equ 0ffd83habh8ax equ 0ffd84habh8py equ 0ffd85habh8ay equ 0ffd86h | abh8xe equ 0ffd87habh8ye equ 0ffd88habh8fn equ 0ffd89habh8k equ 0ffd8ahabh8x1 equ 0ffd8bhabh8x2 equ 0ffd8chabh8y1 equ 0ffd8dhabh8y2 equ 0ffd8ehcsegabh8z:pushpswsel rb2mov a,#00hmov[%inter4],acall$!anzcmp x,#03hbnc $abh8_3mov a,!!hxmaxmov !!hxmax2,amov a,!!hxminmov !!hxmin2,amov a,!!hymaxmov !!hymax2,amov a,!!hyminmov !!hymin2,abr $!abh8_4abh8_3:mov a,!!hxmaxsub a,!!hxmax2mov x,amov c,#03hcall$!divmmov a,xadd !!hxmax2,amov a,!!hxmin2sub a,!!hxminmov x,amov c,#03hcall$!divmmov a,xsub !!hxmin2,amov a,!hymaxsub a,!!hymax2mov x,amov c,#03hcall$!divmmov a,xadd !!hymax2,amov a,!!hymin2sub a,!!hyminmov x,amov c,#03h | call$!divmmov a,xsub !!hymin2,aabh8_4:mov a,!!hxmax2sub a,!!hxmin2mov !!hlx0,amov a,!!hymax2sub a,!!hymin2mov !!hly0,amov abh8k,#01hcall$!aqkcall$!anzcmp x,#00hbnz $abh8_1mov a,#01hmov [%inter4],abr $!abh8_retabh8_1: mov r6,abh8xsmov r7,abh8yscall$!abh8_t1mov a,abh8fand a,xmovgwhl,uupmov [whl],amov r6,abh8xemov r7,abh8yecall$!abh8_t1mov a,abh8fnand a,xmovgwhl,uupaddgwhl,#09hmov [whl],acall$!anzcmp abh8k,xbc $abh8_29abh8_ret: pop pswretabh8_29:inc abh8kcall$!aqkbr $!abh8_1abh8_t1:mov r4,!!hxmin2cmp r6,r4bc $abh8_24mov r5,!!hxmax2cmp r6,r5bnc $abh8 25mov x,r6sub x,r4mov a,#03hmulux |
mov c,!!hlx0divuw cinc xmov b,#04hsub b,xbr $!abh8_2babh8_24:mov b,#03hbr $!abh8_2babh8_25:mov b,#01habh8_2b:mov r4,!!hymin2cmp r7,r4bc $abh8_26mov r5,!!hymax2cmp r7,r5bnc $abh8_27mov x,r7sub x,r4mov a,#03hmuluxmov c,!!hly0divuw cbr $!abh8_28abh8_26:mov x,#00hbr $abh8_28abh8_27:mov x,#02habh8_28:mov a,#03hmuluxadd x,bor x,#0f0hretaqk:movgwhl,inter1movwax,[whl]cmpwax,#0200hbnc $aqk1movgvvp,#00hmov a,abh8kdec amov x,#0ahmuluxmovwvp,axaddgwhl,#02haddgwhl,vvpmovguup,whlmovgtde,#0ffd80hmov c,#0ahmovbk [tde+],[whl+]aqk1: retanz: movgtde,inter1movwax,[tde]mov c,#0ah | divuw cretdivm: mov a,#00hdivuw cretEnd3、笔划特征分析程序:name abh7npublic abh7zextrn hwall,handwv2,lintprog,wordsv,mintsp,handback,handwendextrn hxmax,hxmax2,hymax,hymax2,hxmin,hxmin2,hymin,hymin2extrn hxmaxk,hxmax2k,hxmink,hxmin2k,hymaxk,hymax2k,hymink,hymin2kabh7f equ 0ffd80habh7xs equ 0ffd81habh7ys equ 0ffd82habh7px equ 0ffd83habh7ax equ 0ffd84habh7py equ 0ffd85habh7ay equ 0ffd86habh7xe equ 0ffd87habh7ye equ 0ffd88habh7fn equ 0ffd89hcsegabh7z: push pswsel rb2mov !!hxmax,#00hmov !!hxmax2,#00hmov !!hymax,#00hmov !!hymax2,#00hmov !!hxmin,#0ffhmov !!hxmin2,#0ffhmov !!hymin,#0ffhmov !!hymin2,#0ffhabh7_1: ; br $!abh7_2mov a,!!handwendcmp a,#00hbnz $abh7_1zmov a,#02hmov !!handback,amovwax,!!hwallcmpwax,#14hbc $abh7_1ymov a,#01h | mov !!handback,aabh7_1y:call !!pulp2br !!abh7_retabh7_1z:movg whl,#abh72call!!pulpbr !!abh7_retabh7_2: pushpswsel rb2call!!aqncmp abh7f,#0ffhbnz $abh7_1cmp abh7px,#00hbnz $abh7_21cmp abh7py,#00hbnz $abh7_22mov x,abh7aymov c,#05hcall$!divmcmp abh7ax,xbc $abh7_23mov x,abh7axmov c,#05hcall$!divmcmp abh7ay,xbnc$abh7_24mov a,#0cfhbr $!abh7_25abh7_24:mov a,#3fhbr $!abh7_25abh7_23:mov a,#4fhbr $!abh7_25abh7_22:mov a,#0efhbr $!abh7_25abh7_21:cmp abh7py,#00hbnz $abh7_26mov x,abh7aymov c,#05hcall$!divmcmp abh7ax,xbc $abh7_23mov x,abh7axmov c,#05hcall$!divmcmp abh7ay,xbc $abh7_27mov a,#5fhbr $!abh7_25abh7_27:mov a,#2fhbr $!abh7_25abh7_26:mov x,abh7ay |
mov c,#05hcall$!divmcmp abh7ax,xbnc $abh7_27mov a,#0dfhabh7_25:movgwhl,uupmov [whl],aabh7_2a:mov r4,!!hxmaxmov r5,!!hxmax2cmp abh7px,#00hbnz $abh7_28mov r6,abh7xsmov r7,abh7xebr $!abh7_214abh7_28:mov r6,abh7xemov r7,abh7xsabh7_214: cmp r4,r7bc $abh7_29cmp r5,r7bnc $abh7_210mov r5,r7mov !!hxmax2,r5call$!anzmov !!hxmax2k,xbr $!abh7_210abh7_29:mov r5,r4mov !!hxmax2,r5mov a,!!hxmaxkmov !!hxmax2k,amov r4,r7mov !!hxmax,r4call$!anzmov !!hxmaxk,xcmp r5,r6bnc $abh7_210mov r5,r6mov !!hxmax2,r5call$!anzmov !!hxmax2k,xabh7_210:mov r4,!!hxminmov r5,!!hxmin2cmp r6,r4bc $abh7_211cmp r6,r5bnc $abh7_212mov r5,r6mov !!hxmin2,r5call$!anzmov !!hxmin2k,xbr $!abh7_212 | abh7_211: mov r5,r4mov !!hxmin2,r5mov a,!!hxminkmov !!hxmin2k,amov r4,r6mov !!hxmin,r4call$!anzmov !!hxmink,xcmp r7,r5bnc $abh7_212mov r5,r7mov !!hxmin2,r5call$!anzmov !!hxmin2k,xabh7_212:mov r4,!!hymaxmov r5,!!hymax2cmp abh7py,#00hbnz $abh7_213mov r6,abh7ysmov r7,abh7yebr $!abh7_215abh7_213:mov r6,abh7yemov r7,abh7ysabh7_215: cmp r4,r7bc $abh7_216cmp r5,r7bnc $abh7_217mov r5,r7mov !!hymax2,r5call$!anzmov !!hymax2k,xbr $!abh7_217abh7_216:mov r5,r4mov !!hymax2,r5mov a,!!hymaxkmov !!hymax2k,amov r4,r7mov !!hymax,r4call$!anzmov !!hymaxk,xcmp r5,r6bnc $abh7_217mov r5,r6mov !!hymax2,r5call$!anzmov !!hymax2k,xabh7_217:mov r4,!!hyminmov r5,!!hymin2cmp r6,r4 | bc $abh7_218cmp r6,r5bnc $abh7_3amov r5,r6mov !!hymin2,r5call$!anzmov !!hymin2k,xbr $!abh7_3aabh7_218: mov r5,r4mov !!hymin2,r5mov a,!!hyminkmov !!hymin2k,amov r4,r6mov !!hymin,r4call$!anzmov !!hymink,xcmp r7,r5bnc $abh7_3amov r5,r7mov !!hymin2,r5call$!anzmov !!hymin2k,xabh7_3a:movgwhl,uupaddgwhl,#09hmov a,[whl]and a,#0f0hcmp a,#40hbz $abh7_31mov a,!!handwendcmp a,#00hbnz $abh7_1amov a,#01hmov !!handback,abr !!abh7_32abh7_1a:br $!abh7_1abh7_31:mov a,#00hmov !!handback,aabh7_32:call!!pulp2abh7_ret: pop pswretpulp:movg tde,#lintprogmovgvvp,#00hmov r8,#handwv2addg tde,vvpmov a,[tde]mov x,ainc amov [tde],amov a,#03h |
muluxmovw rp4,axaddg tde,#02haddg tde,vvpmovg[tde],whlretpulp2:movgtde,#mintspmov a,[tde]movgvvp,#00hmov r8,ainc amov [tde],aincgtdeaddgtde,vvpmov a,#wordsvmov [tde],aretaqn:movgwhl,#hwallmovwax,[whl]cmpwax,#0200hbnc $aqn2movgvvp,#00hmovwvp,axaddgwhl,#02haddgwhl,vvpsubgwhl,#0ahmovguup,whlmovgtde,#0ffd80hmov c,#0ahmovbk [tde+],[whl+]aqn2: retanz: movgtde,#hwallmovwax,[tde]mov c,#0ahdivuw cretdivm: mov a,#00hdivuw cretEnd4、AD采样程序:name adonenpublic adonezextrnaddrad,z_sys1flag,z_intflg3csegadonez:push pswsel rb7 | push tdemov tmic7,#01000011bmov tmc7,#00000111bclr1 pm0.4set1 pm0.6set1 pm9.4clr1 pm0.3clr1 pm0.5clr1 p0.5clr1 p0.4clr1 p0.3set1z_intflg3.1clr1z_intflg3.2mov adis,#00000110bnopnopnopnopnopnopnopnopnopnopmov adic,#00000000bmov adm,#10100000bmovg tde,#0ffd57hmovg addrad,tdeset1 z_sys1flag,0pop tdetoret:pop pswrettotm7:mov mic7,#00000000bmov tmc7,#10000000bmov prm7,#00000111bmov cr70,#3ahbr !!toretend5、手写笔迹打包程序:NAME apaknPUBLIC apakzextrn hwallapakjsq equ 0ffd8ahCSEGapakz: push pswsel rb2mov apakjsq,#00hmovgwhl,#hwallmovwax,[whl] | movwrp2,axcmpwrp2,#0ahbnc $apak_4br $!apak_retapak_4:addgwhl,#02hmovgtde,#0ffd80hmov c,#0ahmovbk [tde+],[whl+]movgvvp,whlsubwrp2,#0ahmovguup,#hwallincguupmovgwhl,#0ffcaffhmovg[uup],whladdguup,#04hmov a,#70hmov[uup],aincguupmovgwhl,#0ffd81hmovgtde,uupmov c,#02hmovbk [tde+],[whl+]addgwhl,#04hmov c,#02hmovbk [tde+],[whl+]add apakjsq,#04hcmpwrp2,#0ahbc $apak_1incgvvpapak_2: movgwhl,vvpsubwrp2,#0ahadd apakjsq,#04hmov c,#02hmovbk [tde+],[whl+]addgwhl,#04hmov c,#02hmovbk [tde+],[whl+]cmpwrp2,#0ahbc $apak_1addgvvp,#0ahbr $!apak_2apak_1:add apakjsq,#09hmov a,apakjsqmovgwhl,#hwallmov [whl],aaddgwhl,#04hsub a,#05hmov [whhl],amov r6,amov b,#00h |
mov c,aapak_3: incgwhlmov a,[whl]mov x,amov a,#00haddwbc,axdec r6cmp r6,#03hbnz $apak_3incgwhlmovwax,bcmovw[whl],axaddgwhl,#02hmovwax,#0ffffhmovw[whl],axapak_ret:pop pswretEND6、求矢量程序:name aslnpublic aslzextrn inget1,inget4,inget7csegaslz: push pswsel rb3movgwhl,inget1movgtde,inget4movguup,inget7mov a,[whl]mov b,amov a,[tde]mov c,amov a,[whl+1]mov x,amov a,[tde+1]mov r4,acmp c,bbc $asl_1bnz $asl_2cmp x,r4bnc $asl_2asl_1: mov a,#01hmov [uup],amov a,bsub a,cincguupmov [uup],abr !!asl_5 | asl_2: mov a,#00hmov [uup],amov a,csub a,bincguupmov [uup],aasl_5: cmp r4,xbc $asl_3bnz $asl_4cmp c,bbnc $asl_4asl_3:mov a,#01hincguupmov [uup],amov a,xsub a,r4incguupmov [uup],abr !!asl_retasl_4: mov a,#00hincguupmov[uup],amov a,r4sub a,xincguupmov [uup],aasl_ret:pop pswretEnd7、串口发送数据程序:NAME sendlnpublic send1z,intstlaextrn inter1,z_intflg4,z_intflg2,portnum,z_intflg1senadd1 equ 0fe200hsencnt1 equ 0fe203hsenflg equ 0fe204hcsegsendlz: push pswsel rb2set1 z_intflg2.0clrl z_intflg2.1clr1 pm2.2set1 p2.2clr1 z_intflg1.5add portnum,#1mov brgc1,#00011010bmov csiml,#00000000bmov stic1,#00000011b | movg whl,inter1mov a,[whl]mov !!sencnt1,aincg whlset1 pm2.1clr1 p2.1clr1 pm2.1mov a,[whl]incg whlmovg !!senadd1,whlmov txsl,apop pswretintstla: sel rb7push whlpush axpush bcset1 pm2.1clr1 p2.1clr1 pm2.1movg whl,!!senadd1mov a,[whl]incg whlmovg !!senaddl,whlmov c,!!sencnt1dbnz c,$intst12mov stic1,#01000011bset1 z_intflg1.5clr1 p2.2sub portnum,#1mov !!senflg,#0ffhintst11:mov !!sencnt1,cpop bcpop axpop whlretiintst12:mov txs1,abr !intst11END8、手写实时显示程序:NAME xhwd2nPUBLIC xhwd2zextrn inget1,inget2,inget3,inget4,inget5,lulz,lukz,xcldotzextrn hlcdx1,hlcdy1,hlcdx2,hlcdy2,lcdxyx,hax1,hax2,hay1,hay2,htx1,hty1,htx2,hty2 |
extrn lcd_dotlinmax,lcd_dotvolmax,lintprog,dothpv,oldlcdflag,x0,y0CSEGxhwd2z: push pswsel rb2mov !!inget1,#00hmov !!inget3,#hlcdx1mov !!inget2,#hlcdy1mov !!inget5,#hlcdx2mov !!inget4,#hlcdy2call !!xcldotzmov a,#lcd_dotlinmaxsub a,#hlcdy1bnc $xh1br!!outxh1: inc amov !!inget1,amov a,#hlcdx1cmp a,#lcd_dotvolmaxbc$xh2br!!outxh2: mov a,#hlcdx2cmp a,#lcd_dotvolmaxbz$xh3bc$xh3br!!outxh3:mov a,#hlcdy2cmp a,#lcd_dotlinmaxbz$xh4bc$xh4br!!outxh4:mov a,#hlcdx1mov x,aadd a,#03hxhloop1: cmp x,#hlcdx2bc$xh9br!!xh7xh9: cmp a,#hlcdx2bc$xh10br!!xh5xh10:mov inget2,xmov inget3,acall !!lukzadd x,#06hadd a,#04hcmp x,#h1cdx2bc$xh6br!!xh7xh6: cmp a,#hlcdx2 | bc$xh8br!!xh5xh8: mov inget2,xmov inget3,acall !!lukzadd x,#04hadd a,#06hbr!!xhloop1xh5: mov inget2,xmov inget3,#hlcdx2call !!lukzxh7:mov a,#lcd_dotlinmaxsub a,#hlcdy2inc amov inget1,amov a,#hlcdx1mov x,aadd a,#03hxh1oop2: cmp x,#hlcdx2bc$xh79br!!xh77xh79: cmp a,#hlcdx2bc$xh710br!!xh75xh710: mov inget2,xmov inget3,acall !!lukzadd x,#06hadd a,#04hcmp x,#hlcdx2bc$xh76br!!xh77xh76: cmp a,#hlcdx2bc$xh78br!!xh75xh78: mov inget2,xmov inget3,acall !!lukzadd x,#04hadd a,#06hbr!!xhloop2xh75: mov inget2,xmov inget3,#hlcdx2call !!lukzxh77: mov inget3,#hlcdx1mov a,#lcd_dotlinmaxsub a,#hlcdy1inc amov r7,amov a,#lcd_dotlinmax | sub a,#hlcdy2inc amov x,aadd x,#03hxhloop3: cmp a,r7bc$xh31hr!!xh32xh31: cmp x,r7bc$xh33br!!xh34xh33:mov ingetl,amov inget2,xcall !!lulzadd a,#06hadd x,#04hcmp a,r7bc$xh35br!!xh32xh35: cmp x,r7bc$xh36br!!xh34xh36: mov inget1,amov inget2,xcall !!lulzadd a,#04hadd x,#06hbr!!xhloop3xh34: mov inget1,amov inget2,r7call !!lulzxh32: mov inget3,#hmov a,#lcd_dotlinmsub a,#hlcdy2inc amov x,aadd x,#03hxhloop4: cmp a,r7bc$xh41br!!outxh41: cmp x,r7bc$xh43br!!xh44xh43: mov inget1,amov inget2,xcall !!lulzadd a,#06hadd x,#04hcmp a,r7bc$xh45br!!xhd2 |
xh45: cmp x,r7bc$xh46br!!xh44xh46: mov inget1,amov inget2,xcall !!lulzadd a,#04hadd x,#06hbr!!xhloop4xh44: mov inget1,amov inget2,r7call !!lulzxhd2: movg tde,#lintprogmovg vvp,#00hmov r8,#dothpvaddg tde,vvpmov a,[tde]mov x,ainc amov [tde],amov a,#03hmulu xmovw rp4,axaddg tde,#02haddg tde,vvpmovg whl,#xhd3movg [tde],whlbr!!outxhd3: push pswsel rb2movw ax,!!lcdxyxmovw rp3,axcmp a,#hty1bc$xpt5cmp a,#hty2bz$xpt3bnc $xpt5xpt3: cmp x,#htx2bc$xpt5cmp x,#htx1bz$xpt4bnc $xpt5br!!xpt4xpt5: br !!xhd2xpt4: mov a,#htx1sub a,r6mov x,#hax2mulu xmov c,#hax1 | divuw cadd x,#hlcdx1cmp x,#h1cdx1bc$xpt6cmp x,#hlcdx2bz$xpt1bnc $xpt6xpt1: mov r5,xmov a,r7sub a,#hty1mov x,#hay2mulu xmov c,#hay1divuw cadd x,#hlcdy1cmp x,#hlcdy1bc$xpt6cmp x,#hlcdy2bz$xpt2bc$xpt2xpt6: br !!xhd2xpt2: mov a,!!oldlcdflagcmp a,#00hbnz $xhdx1call !!pdispinc r5call !!pdispdec r5mov !!x0,r5mov !!y0,xmov !!oldlcdflag,#0ffhbr!!xhd2xhdx1:mov a,!!x0cmp r5,abnz $xhdx11mov a,!!y0cmp x,abnz $xhdxllbr!!xhd2xhdx11:mov r6,xmov r7,r5mov x,!!y0;mov r5,!!x0;call !!pdisp;inc r5;call !!pdispmov a,!!x0cmp r7,abc$xhdx2mov b,r7 | sub b,abr!!xhdx3xhdx2: mov b,!!x0sub b,r7xhdx3: mov a,!!y0cmp r6,abc$xhdx4mov c,r6sub c,abr!!xhdx5xhdx4:mov c,!!y0sub c,r6xhdx5: cmp b,cbnc $xhdx6br!!xhd3axhdx6: mov a,!!x0cmp a,r7bnc $xhd2cxhd2a: mov r4,#01hxhd2b: mov r5,!!x0add r5,r4mov a,!!y0cmp a,r6bc$xhd2b1mov x,!!y0sub x,r6mov c,r7mov a,!!x0sub c,amov a,r4mulu xdivuw cmov a,!!y0sub a,xmov x,abr!!xhd2b2xhd2b1: mov x,r6mov a,!!y0sub x,amov c,r7mov a,!!x0sub c,amov a,r4mulu xdivuw cmov a,!!y0add a,xmov x,axhd2b2: call !!pdispinc r5 |
call !!pdispdec r5cmp r7,r5bc$xhd2b3inc r4br!!xhd2bxhd2b3: mov !!x0,r7mov !!y0,r6br!!xhd2xhd2c: mov r4,#01hxhd2d: mov r5,!!x0sub r5,r4mov a,!!y0cmp a,r6bc$xhd2c1mov x,!!y0sub x,r6mov c,!!x0sub c,r7mov a,r4mulu xdivuw cmov a,!!y0sub a,xmov x,abr!!xhd2c2xhd2c1:mov x,r6mov a,!!y0sub x,amov c,!!x0sub c,r7mov a,r4mulu xdivuw cmov a,!!y0add a,xmov x,axhd2c2: call ! !pdispinc r5call !!pdispdec r5cmp r5,r7bc$xhd2c3inc r4br!!xhd2dxhd2c3:mov!!x0,r7mov !!y0,r6br!!xbd2xhd3a:mov a,!!y0cmp a,r6 | bc$xhd3a1br!!xhd3cxhd3a1: mov r4,#01hxhd3b: mov b,!!y0add b,r4mov a,!!x0cmp a,r7bc$xhd3b1mov x,!!x0sub x,r7mov c,r6mov a,!!y0sub c,amov a,r4mulu xdivuw cmov r5,!!x0sub r5,xbr!!xhd3b2xhd3b1: mov x,r7mov a,!!x0sub x,amov c,r6mov a,!!y0sub c,amov a,r4mulu xdivuw cmov r5,!!x0add r5,xxhd3b2: mov x,bcall !!pdispinc r5call !!pdispcmp r6,xbc$xhd3b3inc r4br!!xhd3bxhd3b3: mov!!x0,r7mov !!y0,r6br!!xhd2xhd3c: mov r4,#01hxhd3d: mov b,!!y0sub b,r4mov a,!!x0cmp a,r7bc$xhd3c1mov x,!!x0sub x,r7mov c,!!y0 | sub c,r6mov a,r4mulu xdivuw cmov r5,!!x0sub r5,xbr!!xhd3c2xhd3c1: mov x,r7mov a,!!x0sub x,amov c,!!y0sub c,r6mov a,r4mulu xdivuw cmov r5,!!x0add r5,xxhd3c2:mov x,bcall !!pdispinc r5call !!pdispcmp x,r6bc$xhd3c3inc r4br!!xhd3dxhd3c3:mov!!x0,r7mov !!y0,r6br!!xhd2out: pop pswretpdisp:mov a,#lcd_dotlinmaxsub a,xinc amov inget1,amov inget2,r5mov inget3,r5call !!lukzretEND9、坐标分断程序:NAME xodlnPUBLIC xodlzextrn lintprog,lintspextrn hwbuffer1,hwbuffer2,hwbuffer3,hwbuffer4,hwbuffer5,hwbuffer6,hwbuffer7,hwbuffer8,hwbuffer9,hwbuffer10,hwbuffer11, |
hwbuffer12,hwbuffer13,hwbuffer14,hwbuffer15,hwbuffer16,hwbuffer17,hwbuffer18,hwbuffer19,hwbuffer20,hwbuffer21extrn hwbuffer22,hwbuffer23,hwbuffer24,hwbuffer25,hwbuffer26,hwbuffer27,hwbuffer28extrn hwbuffer29,hwbuffer30,hwbuffer31,hwbuffer32,hwbuffer33,hwbuffer34,hwbuffer35extrn hwbuffer36,hwbuffer37,hwbuffer38,hwbuffer39,hwbuffer40extrn inget1,inget2,inget4,inget7extrn handwv,bdx0,bdx2,bdy0,bdy2,handwv2,xmax1,ymax1,xmax2,ymax2,hwall,dothpv,handwv3extrn z_intflg1,lcdxyx,z_intflg3extrn abh7z,adonez,aslz,xtm6z,xtm8z,xvtcz,xvtmz,xhwd2z,oldlcdflagextrn hwtm1,hwtm2,handwend,ang30min,xmax3,ymax3,z_sys4flagCSEGxod1z: push pswsel rb5xdl: set1 z_intflg3.4setlz_sys4flag.2clr1 egp0.6clr1 egn0.6set1 pm0.6mov pic6,#40hmovw !!hwall,#0000hmovg whl,#l intprogmov a,#dothpvmov b,amov a,#00hmov [whl+b],amov !!hwbu ffer36,#00hmov !!hwbuffer1,#00hmov !!hwbuffer2,#0fdhmov !!hwbuffer3,#0ffh | mov !!oldlcdflag,#00hmov !!handwend,#0ffhcall !!abh7zcall !!xhwd2zmovg whl,#xd2call !!pulpset1 egp0.6clr1 egn0.6set1 pm0.6mov pic6,#00hbr!!outxd12: br !!xdbb5xd2: push pswsel rb5movw ax,!!lcdxyxcmpw ax,#0ffffhbz$xd12cmp a,#bdy0bc$xdi1cmp a,#bdy2bz$xdi2bnc $xdi1xdi2: cmp c,#bdc0bc$xdi1cmp x,#bdx2bz$xdi3bnc $xdi1br!!xdi3xdi1: mov a,#0fdhcmp a,!!hwbuffer2bz$xdi122mov a,#0f9hcmp a,!!hwbuffer2bnz $xdi12br!!xd13xdi122:mov !!hwbuffer2,#0f9hbr !!xdbb5xdi12: cmp hwtm2,#0ffhbz$xdi11br!!xdbb5xdi11:bf !!hwbuffer2.0,$xdi111clr1 !!hwbuffer2.0br!!xdbb5xdi111: br !!xd13xdi3: set1 !!hwbuffer2.0mov !!hwbuffer1,#08hmov !!hwhuffer2,#0ffhmov !!hwbuffer8,x | mov !!hwbuffer9,acall !!pdotxdaa2:mov !!hwbuffer36,#00hxdaa:mov !!inget1,#01hmovg whl,#xd3movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxd3: push pswsel rb5bfp0.6,$xdaa1movg whl,#xd4call !!pulpcall !!adonez;br!!outxdaal: mov a,!!hwbuffer36inc amov !!hwbuffer36,amov x,#hwtm1inc xcmp a,xbc$xdaa1i1br!!xdbb5xdaa1i1: cmp a,#hwtm1bc$xdi31mov a,!!hwbuffer1cmp a,#09hbnc $xdaa3mov r7,#0fhcall !!hwsetmov !!oldlcdflag,#00hbr!!xdaa5xdi31:mov !!inget1,#01hmovg whl,#xd3movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxdaa3: mov r7,#0ffhmov r6,#0fhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer14movw rp1,axmovg whl,#hwbuffer4call !!phwallmov !!oldlcdflag,#00hxdaa5:mov!!hwbuffer1,#00h |
mov !!hwbuffer2,#0ffh;mov !!hwbuffer3,#0ffh;call !!phw3call !!phw2br!!xdbb5xdaa4: mov a,!!hwbuffer36cmp a,hwtm2bnc $xdaa4i1mov !!inget1,#01hmovg whl,#xd3movg !!inget2,whlcall !!xtm8zcall !!phw3br!!outxdaa4i1:mov a,!!hwbuffer1cmp a,#09hbnc $xdaa41movg whl,#hwallmovw ax,[whl]cmpw ax,#00hbnz $xdaa42br!!xd1xdaa42: mov r7,#04fhcall !!hwsetbr!!xdaa43xdaa41: mov r7,#0ffhmov r6,#4fhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer14movw rp1,axmovg whl,#hwbuffer4call !!phwallmov !!oldlcdflag,#00hxdaa43: call!!phw3call !!phw2br!!outxldaa:br !!xdaaxd4:push pswsel rb5movw ax,!!lcdxyxcmpw ax,#0ffffhbz$xldaacmp a,#bdy0bc$xd41cmp a,#bdy2bz$xd42bnc $xd11xd42: cmp x,#bdx0bc$xd41 | cmp x,#bdx2bz$xd43bnc $xd41br!!xd43xd41: cmp hwtm2,#0ffhbnz $xd411bf!!hwbuffer2.0,$xd412clr1 !!hwbuffer2.0br!!xdaaxd412: br !!xd13xd411: br !!xdaaxd43: set1 !!hwbuffer2.0movg whl,#hwbuffer8movg inget1,whlmovg whl,#lcdxyxmovg inget4,whlmovg whl,#hwbuffer37movg inget7,whlcall !!aslzmovg whl,#hwbuffer37movg tde,#hwbuffer4mov c,#04hmovbk [tde+],[whl+]movw ax,!!lcdxyxmovw !!hwbuffer14,axmov a,!!hwbuffer38cmp a,#xmax1bnc $xd44mov a,!!hwbuffer40cmp a,#ymax1bnc $xd44br !!xdaa2xd44:mov a,!!hwbuffer38cmp a,#xmax3bnh $xd441br!!xdaa2xd441:mov a,!!hwbuffer40cmp a,#ymax3bnh $xdaa7br!!xdaa2xdaa7: movw ax,!!lcdxyxmovw !!hwbuffer14,axmov !!hwbuffer1,#0ehcall !!pdotmovg tde,#hwbuffer10movg whl,#hwbuffer37mov c,#04hmovbk[tde+],[whl+]mov a,!!hwbu ffer38cmp a,#xmax2 | bnc $xdaa71mov a,!!hwbu ffer40cmp a,#ymax2bnc $xdaa71br!!xdaa2xdaa71:clr1!!hwbuffer2.7movg tde,#hwbu ffer4movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+]xdbb2:mov !!hwbuffer36,#00hxdbb:mov !!inget1,#01hmovg whl,#xd5movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxd5: push pswsel rb5bfp0.6,$xdbb1movg whl,#xd6call !!pulpcall !!adonezbr!!outxdbb1: mov a,!!hwbuffer36inc amov !!hwbuffer36,acmp a,#hwtm1bc$xd51mov r7,#0ffhmov r6,#0fhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer14movw rp1,axmovg whl,#hwbuffer4call !!phwallmov !!oldlcdflag,#00h;mov !!hwbuffer1,#00hmov !!hwbuffer2,#0ffhmov !!hwbuffer3,#0ffhcall !!phw3call !!phw2xdbb5:mov !!inget1,#01hmovg whl,#xd52movg !!inget2,whlcall !!xtm8zcall !!phw3 |
br!!outxd51: mov !!inget1,#01hmovg whl,#xd5movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxd52: push pswsel rb5bfp0.6,$xd521movg whl,#xd2call !!pulpcall !!adonez;br!!outxd521:cmp hwtm2,#0ffhbnz $xd5211br!!xdbb5xd5211: mov a,!!hwbuffer36inc amov !!hwbuffer36,acmp a,hwtm2bnc $xd522br!!xdbb5xd522: movg tde,#hwallmovw ax,[tde]cmpw ax,#00hbnz $xd5221br!!xd5222xd5221: movg vvp,#00hmovw rp4,axaddg tde,#02haddg tde,vvpdecg tdemov a,[tde]and a,#3fhadd a,#40hmov [tde],axd5222:mov !!oldlcdflag,#00hmov !!handwend,#00hcall !!phw3call !!phw2br!!outxldbb: br !!xdbbxd6: push pswsel rb5movw ax,!!lcdxyxcmpw ax,#0ffffhbz$xldbbcmp a,#bdy0 | bc$xd61cmp a,#bdy2bz$xd62bnc $xd61xd62: cmp x,#bdx0bc$xd61cmp x,#bdx2bz $xd63bnc $xd61br!!xd63xd61: cmp hwtm2,#0ffhbz$xd611br!!xdbbxd611:bf !!hwbuffer2.0,$xd6111clr1 !!hwbuffer2.0br!!xdbbxd6111: br !!xd13xd63: set1 !!hwbuffer2.0movg whl,#hwbuffer14movg inget1,whlmovg whl,#lcdxyxmovg inget4,whlmovg whl,#hwbuffer37movg inget7,whlcall !!aslzmov a,!!hwbuffer38cmp a,#xmax1bnc $xd64mov a,!!hwbuffer40cmp a,#ymax1bnc $xd64br!!xdbb2xd64: mov a,!!hwbuffer38cmp a,#xmax3bnh $xd641br!!xdbb2xd641: mov a,!!hwbuffer40cmp a,#ymax3bnh $xdbb6br !!xdbb2xdbb6:call!!pdotmovw ax,!!lcdxyxmovw !!hwbuffer20,axmovg tde,#hwbuffer16movg whl,#hwbuffer37mov c,#04hmovbk[tde+],[whl+] mova,!!hwbuffer1add a,#06h | mov !!hwbuffer1,amovg whl,#hwbuffer4movg !!inget1,whlmovg whl,#hwbuffer16movg !!inget4,whlmovg whl,#hwbuffer35movg !!inget7,whlcall !!xvtczmov a,!!hwbuffer35cmp a,#00hbz$xdbb61cmp a,#01hbnz $xdbb62clr1 !!hwbuffer3.0br!!xdcc2xdbb62: cmp a,#0e1hbnz $xdbb63clr1 !!hwbuffer3.7br!!xdbb61xdbb63: cmp a,#0e2hbnz $xdbb6i1clr1 !!hwbuffer3.6br!!xdbb61xdbb6i1:cmp a,#0e8hbnz $xdbb6i2bt !!hwbuffer2.6,$xdbb61bf !!hwbuffer2.5,$xdbb61clr1 !!hwbuffer3.0br!!xdbb61xdbb6i2:cmp a,#0e3hbnz $xdbb61clr1 !!hwbuffer3.0xdbb61:movg whl,#hwbuffer8movg inget1,whlmovg whl,#hwbuffer20movg inget4,whlmovg whl,#hwbuffer10movg inget7,w hlcall !!aslzmovg whl,#hwbuffer4movg !!inget1,whlmovg whl,#hwbuffer10movg !!inget4,whlmovg whl,#hwbuffer35movg !!inget7,whlcall !!xvtmzmov a,!!hwbuffer35cmp a,#00hbz$xdcc2 |
cmp a,#01hbnz $xdbb66set 1 !!hwbuffer2.5clr 1 !!hwbuffer2.6br!!xdcc2xdbb66:cmp a,#02hbnz $xdbb67set1 !!hwbuffer2.6clr1 !!hwbuffer2.5br!!xdcc2xdbb67:cmp a,#03hbnz $xdcc2clr1 !!hwbuffer3.0xdcc2:mov !!hwbuffer36,#00hxdcc: mov !!inget1,#01hmovg whl,#xd7movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxd7: push pswsel rb5bfp0.6,$xdcc1movg whl,#xd8call !!pulpcall !!adonez;br!!outxdcc1:mov a,!!hwbuffer36inc amov !!hwbuffer36,acmp a,#hwtm1bc$xdccllmov r7,#0ffhmov r6,#0fhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer20movw rp1,axmovg whl,#hwbuffer10call !!phwallmov !!oldlcdflag,#00hmov !!hwbuffer1,#00hmov !!hwbuffer2,#0ffhmov !!hwbuffer3,#0ffhcall !!phw3call !!phw2br!!xdbb5xdcc11:mov !!inget1,#01hmovg whl,#xd7 | movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxldcc: br !!xdccxd8: push pswsel rb5movw ax,!!lcdxyxcmpw ax,#0ffffhbz$xldcccmp a,#bdy0bc$xd81cmp a,#bdy2bz$xd82bnc $xd81xd82: cmp x,#bdx0bc$xd81cmp x,#bdx2bz$xd83bnc $xd81br!!xd83xd81:cmp hwtm2,#0ffhbnz $xd811bf!!hwbuffer2.0,$xd812clr1 !!hwbuffer2.0br !!xdccxd812: br !!xd14xd811: br !!xdccxd83: set1 !!hwbuffer2.0movg whl,#hwbuffer20movg inget1,whlmovg whl,#lcdxyxmovg inget4,whlmovg whl,#hwbuffer37movg inget7,whlcall !!aslzmov a,!!hwbuffer38cmp a,#xmax1bnc $xd84mov a,!!hwbuffer40cmp a,#ymax1bnc $xd84br!!xdccxd84:mov a,!!hwbuffer38cmp a,#xmax3bnh $xd841br!!xdccxd841:mov a,!!hwbuffer40cmp a,#ymax3bnh $xd831 | br!!xdccxd831: movg tde,#hwbuffer22movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+]call !!pdotmovw ax,!!lcdxyxmovw !!hwbuffer26,axmov a,!!hwbuffer1add a,#06hmov !!hwbuffer1,abt !!hwbuffer3.0,$xdcc4br !!xde1xdcc4:movg whl,#hwbuffer8movg inget1,whlmovg whl,#hwbuffer26movg inget4,whlmovg whl,#hwbuffer37movg inget7,whlcall !!aslzmovg whl,#hwbuffer10movg !!inget1,whlmovg whl,#hwbuffer37movg !!inget4,whlmovg whl,#hwbuffer35movg !!inget7,whlcall !!xvtmzmov a,!!hwbuffer35cmp a,#00hbnz $xdcc41xdcc42: br !!xddd3xdcc41:cmp a,#01hbnz $xddd1bf !!hwbuffer2.4,$xdcc42xddd2:bt !!hwbuffer2.6,$xdcc43xdcc44:clr1 !!hwbuffer2.6set1 !!hwbuffer2.5br!!xddd3xdcc43:bt !!hwbuffer2.5,$xdcc44clr1 !!hwbuffer2.4br!!xddd3xddd1:cmp a,#02hbnz $xddd3i1bt !!hwbuffer2.4,$xddd11br !!xddd3xddd11:bf !!hwbuffer2.6,$xddd12 |
xddd13:set1 !!hwbuffer2.6clr1 !!hwbuffer2.5br!!xddd3xddd12:bf !!hwbuffer2.5,$xddd13clr1 !!hwbuffer2.4br!!xddd3xddd3i1:clr1 !!hwbuffer3.0xddd3:movg whl,#hwbuffer10movg !!inget1,whlmovg whl,#hwbuffer22movg !!inget4,whlmovg whl,#hwbuffer35;movg !!inget7,whlcall !!xvtczmov a,!!hwbuffer35cmp a,#00hbnz $xddd31movg tde,#hwbuffer10movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+]br!!xddd4xddd31:cmp a,#01hbnz $xddd32clr1 !!hwbuffer3.0br!!xde2xddd32:movg tde,#hwbuffer10movg whl,#hwbuffer37mov c,#04hmovbk[tde+],[whl+]cmp a,#0e1hbnz $xddd33clr1 !!hwbuffer3.7br!!xddd5xddd33:cmp a,#0e2hbnz $xddd34clr1 !!hwbuffer3.6br!!xddd5xddd34:cmp a,#0f3hbnz $xddd35bf !!hwbuffer3.7,$xddd36bf !!hwbuffer3.1,$xddd36br!!xddd5xddd36:clr1 !!hwbuffer3.3br!!xddd5xddd35:cmp a,#0f4h | bnz $xdp8abf !!hwbuffer3.6,$xddd37bf !!hwbuffer3.2,$xddd37br!!xddd5xdp8a:cmp a,#0e8hbnz $xdp8a1bt !!hwbuffer2.6,$xddd5bf !!hwbuffer2.5,$xddd5clr1 !!hwbuffer3.0br!!xde2xdp8a1:cmp a,#0e3hbnz $xddd5clr1 !!hwbuffer3.0br!!xde2xddd37:clr1 !!hwbuffer3.3br!!xddd5xddd4:bt !!hwbuffer3.7,$xddd41clr1 !!hwbuffer3.1br!!xddd5xddd41:bt !!hwbuffer3.6,$xddd5clr1 !!hwbuffer3.2xddd5: movg tde,#hwbuffer14call !!hbdelbr!!xdcc2xde1:movg whl,#hwbuffer14movg inget1,whlmovg whl,#hwbuffer26movg inget4,whlmovg whl,#hwbuffer37movg inget7,whlcall !!aslzmovg whl,#hwbuffer4movg !!inget1,whlmovg whl,#hwbuffer22movg !!inget4,whlmovg whl,#hwbuffer35movg !!inget7,whlcall !!xvtczmov a,!!hwbuffer35cmp a,#01hbz$xdellcmp a,#0e1hbnz $xde12clr1 !!hwbuffer3.7br!!xde13xde12:cmp a,#0e2hbz$xde14cmp a,#0e8h | bz$xde112cmp a,#0e3hbz$xde112br!!xde13xde14:clr1 !!hwbuffer3.6br !!xde13xde11:bf !!hwbuffer2.6,$xde111xde112:mov r7,#0ffhbr!!xde113xde111:bf !!hwbuffer2.5,$xde112bf !!hwbuffer2.4,$xde112bf !!hwbuffer3.3,$xde112bf !!hwbuffer3.1,$xde114bt !!hwbuffer3.2,$xde112mov r7,#0ffhbr!!xde113xde114:mov r7,#0ffhxde113:mov r6,#0cfhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer14movw rp1,axmovg whl,#hwbuffer4call !!phwallbr!!xddd6xde13:set1 !!hwbuffer3.0movw ax,!!hwbuffer26movw !!hwbuffer20,axmovg tde,#hwbuffer16movg whl,#hwbuffer22mov c,#04hmovbk [tde+],[whl+]mov a,!!hwbuffer1sub a,#06hmov !!hwbuffer1,abr!!xdcc2xddd6: call !!phw3call !!phw2mov !!hwbuffer2,#0ffhmov !!hwbuffer3,#0ffhmovw ax,!!hwbuffer14movw !!hwbuffer8,axmovw ax,!!hwbuffer26movw !!hwhuffer14,axmovg tde,#hwbuffer4movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+] |
movg tde,#hwbuffer10movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+]mov !!hwbuffer1,#0ehmov a,!!hwbu ffer38cmp a,#xmax2bnc $xddd61mov a,!!hwbuffer40cmp a,#ymax2bnc $xddd61br!!xdaa2xddd61: clr1 !!hwbuffer2.7br!!xdbb2xde2:mov !!hwbuffer36,#00hxde4:mov !!inget1,#01hmovg whl,#xd9movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxd9:push pswsel rb5bfp0.6,$xde5movg whl,#xd10call !!pulpcall !!adonez;br!!outxde5:mov a,!!hwbuffer36inc amov !!hwbuffer36,acmp a,#hwtm1bnc $xde6mov !!inget1,#01hmovg whl,#xd9movg !!inget2,whlcall !!xtm6zcall !!phw3br!!outxde6:bf !!hwbuffer2.6,$xde61xde62:mov r7,#0ffhbr!!xde63xde61:xde63:mov r6,#0fhxd164: movw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer20movw rp1,axmovg whl,#hwbuffer10;call !!phwall | call !!phw3call !!phw2mov !!oldlcdflag,#00hmov !!hwbuffer1,#00hmov !!hwbuffer2,#0ffhxdl63:mov !!hwbuffer3,#0ffhbr!!xdbb5xlde4:br !!xde4xd10: push pswsel rb5movw ax,!!lcdxyxcmpw ax,#0ffffhbz$xlde4cmp a,#bdy0bc$xd101cmp a,#bdy2bz$xd102bnc $xd101xd102:cmp x,#bdx0bc$xd101cmp x,#bdx2bz$xd103bnc $xd101br!!xd103xd101:cmp hwtm2,#0ffh;bnz $xd1011bf!!hwbuffer2.0,$xd1012clr1 !!hwbuffer2.0br!!xde2xd1012: br !!xd14xd1011: br !!xde2xd103:set1 !!hwbuffer2.0movg whl,#hwbuffer26movg inget1,whlmovg whl,#lcdxyxmovg inget4,whlmovg whl,#hwbuffer37movg inget7,whlcall !!aslzmov a,!!hwbuffer38cmp a,#xmax1bnc $xd104mov a,!!hwbuffer40cmp a,#ymax1bnc $xd104br!!xde2xd104: mov a,!!hwbuffer38cmp a,#xmax3bnh $xd1041 | br!!xde2xd1041: mov a,!!hwbuffer40cmp a,#ymax3bnh $xd1031br!!xde2xd1031: mov a,!!hwbuffer1add a,#06hmov !!hwbuffer1,amovw ax,!!lcdxyxmovw !!hwbuffer32,axmovg tde,#hwbuffer28movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+]call !!pdotxde7:movg whl,#hwbuffer20movg inget1,whlmovg whl,#hwbuffer32movg inget4,whlmovg whl,#hwbuffer37movg inget7,whlcall !!aslzmovg whl,#hwbuffer10movg !!inget1,whlmovg whl,#hwbuffer37movg !!inget4,whlmovg whl,#hwbuffer35movg !!inget7,whlcall !!xvtczmov a,!!hwbuffer35cmp a,#00hbnz $xd10i1xd10i8:set1!!hwbuffer3.0movw ax,!!hwbuffer32movw !!hwbuffer26,axmovg tde,#hwbuffer22movg whl,#hwbuffer37;mov c,#04hmovbk [tde+],[whl+]mov a,!!hwbuffer1sub a,#06hmov !!hwbuffer1,abr!!xdcc4xd10i1: cmp a,#01hbz$xd10i7cmp a,#0e8hbnz $xd10i11bt !!hwbuffer2.6,$xd10i8bf !!hwbuffer2.5,$xd10i8br!!xd10i3 |
xd10i11:cmp a,#0e3hbnz $xd10i8br!!xd10i3:xd10i7:bf !!hwbuffer2.6,$xd10i2xd10i3:mov r7,#0ffhbr!!xd10i5;ldy020501xd10i2:bf !!hwbuffer2.5,$xd10i3bf !!hwbuffer2.4,$xd10i3bf !!hwbuffer3.3,$xd10i3bf !!hwbuffer3.1,$xd10i4bt !!hwbuffer3.2,$xd10i3mov r7,#0ffhbr!!xd10i5xd10i4: mov r7,#0ffhxd10i5: mov r6,#0cfhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer20movw rp1,axmovg whl,#hwbuffer10call !!phwallcall !!phw3call !!phw2mov !!hwbuffer2,#0ffhmov !!hwbuffer3,#0ffhmovw ax,!!hwbuffer20movw !!hwbuffer8,axmovw ax,!!hwbuffer32movw !!hwbuffer14,axmovg tde,#hwbuffer4movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+]movg tde,#hwbuffer10movg whl,#hwbuffer37mov c,#04hmovbk [tde+],[whl+]mov !!hwbuffer1,#0ehmov a,!!hwbuffer38cmp a,#xmax2bnc $xd10i6mov a,!!hwbuffer40cmp a,#ymax2bnc $xd10i6br!!xdaa2xd10i6:clr1 !!hwbuffer2.7br!!xdbb2xd13: mov a,!!hwbuffer1 | cmp a,#09hbnc $xd131movw ax,!!hwallcmpw ax,#00hbz$xd132movg vvp,#00hmovw rp4,axmovg tde,#hwalladdg tde,#02haddg tde,vvpdecg tdemov a,[tde]cmp a,#0cfhbz$xd133and a,#3fhadd a,#40hbr!!xd132xd133:mov a,#4fhmov [tde],axd132: set1!!z_intflg1.0mov !!handwend,#00hcall !!phw3call !!phw2br!!outxd131: mov r7,#0ffhmov r6,#4fhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer14movw rp1,axmovg whl,#hwbuffer4call !!phwallxd1311:mov !!hwbuffer1,#00hmov !!hwbuffer2,#0ffhmov !!hwbuffer3,#0ffhbr!!xd132xd14:mov r7,#0ffhmov r6,#4fhmovw ax,!!hwbuffer8movw rp2,axmovw ax,!!hwbuffer14movw rp1,axmovg whl,#hwbuffer10call !!phwa11mov !!oldlcdflag,#00hbr!!xd1311out: pop pswret | pulp: movg tde,#lintprogmovg vvp,#00hmov r8,#handwvaddg tde,vvpmov a[tde]mov x,ainc amov [tde],amcv a,#03hmulu xmovw rp4,axaddg tde,#02haddg tde,vvpmovg [tde],whlrethwset: movg tde,#hwallmovw ax,[tde]cmpw ax,#00hbnz $ht2br!!htoutht2: movg vvp,#00hmovw rp4,axaddg tde,#02haddg tde,vvpdecg tdemov a,r7mov [tde],ahtout:retphwall:movg tde,#hwallmovw ax,[tde]cmpw ax,#0200hbnc $phwall2movg vvp,#00hmovw rp4,axaddw ax,#0ahmovw [tde],ax;addg tde,#02haddg tde,vvpmov a,r7mov [tde],aincg tdemovw ax,rp2movw [tde],axaddg tde,#02hmovw ax,rp1mov c,#04hmovbk [tde+],[whl+]movw [tde],ax |
addg tde,#02hmov a,r6mov [tde],aretphwall2:retphw2:movg tde,#lintspmov a,[tde]movg vvp,#00hmov r8,ainc amov [tde],aincg tdeaddg tde,vvpmov a,#handwv2mov [tde],aretpdot: movg tde,#lintspmov a,[tde]movg vvp,#00hmov r8,ainc amov [tde],aincg tdeaddg tde,vvpmov a,#dothpvmov [tde],arethbdel: mov a,!!hwbuffer1movg vvp,#00hmov r8,asub a,#06hmov !!hwbuffer1,amovg whl,#hwbuffer2addg vvp,whlmovg whl,tdeaddg whl,#06hsubg vvp,whlmov c,r8movbk [tde+],[whl+]retphw3: movg tde,#lintspmov a,[tde]movg vvp,#00hmov r8,ainc amov [tde],aincg tdeaddg tde,vvpmov a,#handwv3;mov [tde],a; | retEND10、TM6中断服务程序:NAME xtm6nPUBLIC xtm6z,inttm6extrn inget1,tm6hpv,tm6prog,lintprog,lintsp,tm6flagCSEGxtm6z: push pswsel rb3push axpush rp1push tdepush vvppush whlcall !!ptpmov a,!!tm6flagcmp a,#0ffhbnz $outmov !!tm6flag,#00hmov cr60,#3ahmov prm6,#07hmov tmic6,#00hmov tmc6,#80hout: pop whlpop vvppop tdepop rp1pop axpop pswretinttm6: sel rb7push axpush rp1push rp2push rp3push whlpush vvppush tdepush uupmovg whl,spaddg whl,#14hmovg tde,#0ffaa0hmov c,#04hmovbk [tde+],[whl+]movg uup.#tm6progmov a,[uup]cmp a,#00hbnz $t8 | br!!t2t8: mov r7,amov r6,#00hmov r5,#00hincg uupt7:mov a,[uup]dec acmp a,#00hbnz $t3incg uupmovg whl,[uup]call !!plpdecg uupmovg tde,uupcall !!delmov r5,#0ffh;call !!plsbr!!t4t3: mov[uup],aaddg uup,#04hdec r7t4:cmpr7,#00hbz$t5br!!t7t5: movg whl,#tm6progmov a,[whl]sub a,r6mov [whl],acmp r5,#0ffhbz$t6br!!toutt6: movg uup,#tm6progmov a,[uup]cmp a,#00hbz$t2br!!toutt2: mov!!tm6flag,#0ffhclr1 tmc6.7set1 tmic6.6tout: pop uuppop tdepop vvppop whlpop rp3pop rp2pop rp1pop axretiptp: movg tde,#tm6progmov a,[tde] |
mov x,ainc amov [tde],amov a,#04hmulu xmovg vvp,#00hmovw rp4,axincg tdeaddg tde,vvpmov c,#04hmovg whl,#inget1movbk [tde+],[whl+]retdel: dec r7cmp r7,#00hbz$doutmov a,r7;mov x,#04hmulu xmovg whl,tdeaddg whl,#04hmov c,xcmp c,#00hbz $d1movbk [tde+],[whl+]d1: cmp a,#00hbz$doutmov c,#0ffhmovbk [tde+],[whl+]dec abr!!d1dout: inc r6retplp: movg tde,#lintprogmovg vvp,#00hmov a,#tm6hpvmov r8,aaddg tde,vvpmov a,[tde]inc a;mov [tde],adec amov x,#03hmulu xmovw rp4,axaddg tde,vvpaddg tde,#02h;movg vvp,whlmovg whl,[tde]addg tde,#03h; | movg [tde],whlmovg whl,vvpsubg tde,#03hmovg [tde],whlretpls: movg tde,#lintspmovg vvp,#00hmov a,[tde]mov r8,ainc amov [tde],aincg tdeaddg tde,vvpmov a,[tde]incg tdemov [tde],adecg tdemov a,#tm6hpvmov [tde],aretEND11、TM8中断服务程序:NAME xtm8nPUBLIC xtm8z,inttm8extrn inget1,tm8hpv,tm8prog,lintprog,lintsp,tm8flagCSEGxtm8z: push pswsel rb3push axpush rp1push tdepush vvppush whlcall !!ptpmov a,!!tm8flagcmp a,#0ffhbnz $outmov !!tm8flag,#00hmov cr80,#80hmov prm8,#07hmov tmic8,#00hmov tmc8,#80hout: pop whlpop vvppop tdepop rp1pop axpop psw | retinttm8: sel rb7push axpush rp1push rp2push rp3push whlpush vvppush tdepush uupmovg whl,spaddg whl,#14hmovg tde,#0ffaa0hmov c,#04hmovbk [tde+],[whl+]movg uup,#tm8progmov a,[uup]cmp a,#00hbnz $t8br!!t2t8: mov r7,amov r6,#00hmov r5,#00hincg uupt7:mov a,[uup]dec acmp a,#00hbnz $t3incg uupmovg whl,[uup]call !!plpdecg uupmovg tde,uupcall !!delmov r5,#0ffhcall !!plsbrt4t3: mov [uup],aaddg uup,#04hdec r7t4: cmp r7,#00hbz$t5brt7t5: movg whl,#tm8progmov a,[whl]sub a,r6mov [whl],acmp r5,#0ffhbz$t6brtout |
t6: movg uup,#tm8progmov a,[uup]cmp a,#00hbz$t2brtoutt2:mov !!tm8flag,#0ffhclr1 tmc8.7set1 tmic8.6tout: pop uuppop tdepop vvppop whlpop rp3pop rp2pop rp1pop axretiptp: movg tde,#tm8progmov a,[tde]mov x,ainc amov [tde],amov a,#04hmulu xmovg vvp,#00hmovw rp4,axincg tdeaddg tde,vvpmov c,#04hmovg whl,#inget1movbk [tde+],[whl+]retdel: dec r7cmp r7,#00hbz$doutmov a,r7mov x,#04hmulu xmovg whl,tdeaddg whl,#04hmov c,xcmp c,#00hbz$d1movbk [tde+],[whl+]d1: cmp a,#00hbz$doutmov c,#0ffhmovbk [tde+],[whl+]dec abrd1 | dout: inc r6retplp:movg tde,#lintprogmovg vvp,#00hmov a,#tm8hpvmov r8,aaddg tde,vvpmov a,[tde]inc amov [tde],adec amov x,#03hmulu xmovw rp4,axaddg tde,vvpaddg tde,#02h;tmovg vvp,whlmovg whl,[tde]addg tde,#03h;movg [tde],whlmovg whl,vvpsubg tde,#03h;tde-3movg [tde],whlretpls: movg tde,#lintspmovg vvp,#00hmov a,[tde]mov r8,ainc amov [tde],aincg tdeaddg tde,vvpmov a,[tde]incg tdemov [tde],adecg tdemov a,#tm8hpvmov [tde],aretEND12、矢量变化检测程序:NAME xvtcnPUBLIC xvtczextrn inget1,inget4,inget7,xcon1,ycon1,xcon2,ycon2extrn xcon3,xcon4,ycon3,ycon4,ycon6,ang30minCSEGxvtcz: push psw | sel rb3movg whl,inget1movg uup,inget4mov a,[whl]mov x,amov a,[uup]cmp a,xbz$xv1addg whl,#02haddg uup,#02hmov a,[whl]mov x,amov a,[uup]cmp a,xbnz $xv2br!!xv3xv2: mov a,#01hmov [%inget7],abr!!outxv1: addg whl,#02haddg uup,#02hmov a,[whl]mov x,amov a,[uup]cmp a,xbz$xv4br!!xv5xv4: decg whldecg uupmov a,[whl]mov x,acmp x,#00hbnz $xv42mov a,[uup]cmp a,xbnz $xv42xv43: mov a,#00hmov [%inget7],abr!!outxv42: addg whl,#02haddg uup,#02hmov a,[whl]mov x,a;cmp x,#00hbnz $xv41mov a,[uup]cmp a,xbnz $xv4ibr!!xv43xv41: movg whl,inget1 |
movg uup,inget4mov a,[whl]cmp a,#01bz$xv44;br!!xv45;xv44: addg whl,#02hmov a,[whl]cmp a,#00hbz$xv46br!!xv47xv46: incg whlmov a,[whl]cmp a,#00hbnz $xv48mov a,#01hxv48: mov c,a;subg whl,#02haddg uup,#03hmov a,[whl]mov x,amov a,[uup]mulu xdivuw cmovw rp1,axsubg uup,#02hmov a,[uup]mov x,amov a,#00hcmpw ax,rp1bnz $xv49br!!xv43xv49: bc $xv410br!!xv411xv410: movg whl,inget1incg whlmov a,[whl]mov x,#xcon1mulu xmovw rp1,axaddg whl,#02hmov a,[whl]mov x,#ycon1mulu xcmpw ax,rp1bnc $xv4101movg uup,inget4incg uupmov a,[uup]mov x,#xcon4mulu x | movw rp1,axaddg uup,#02hmov a,[uup]mov x,#11hmulu xcmpw rp1,axbnc $xv4101mov a,#01hmov [%inget7],abr!!outxv4101: br !!xv43xv411: movg whl,inget1incg whlmov a,[whl]mov x,#ang30min;mulu xmovw rp1,axaddg whl,#02hmov a,[whl]mov x,#0ahmulu xcmpw ax,rp1bc$xv4111movg uup,inget4incg uupmov a,[uup]mov x,#0ahmulu xmovw rp1,axaddg uup,#02hmov a,[uup]mov x,#ang30minmulu xcmpw ax,rp1bnc $xv4111mov a,#01hmov [%inget7],abr!!outxv4111: br !!xv43xv47: incg whlmov a,[whl]cmp a,#00hbnz $xv471mov a,#01hxv471:mov c,asubg whl,#02haddg uup,#03hmov a,[whl]mov x,amov a,[uup] | mulu xdivuw cmovw rp1,axsubg uup,#02hmov a,[uup]mov x,amov a,#00hcmpw ax,rp1bnz $xv472br!!xv43xv472: bc $xv473br!!xv474xv473: br !!xv410xv474: movg whl,inget1incg whlmov a,[whl]mov x,#ycon6mulu xmovw rp1,axaddg whl,#02hmov a,[whl]mov x,#0ehmulu xcmpw rp1,axbnc $xv475movg uup,inget4addg uup,#03hmov a,[uup]mov x,#0ehmulu xmovw rp1,axsubg uup,#02hmov a,[uup]mov x,#ycon6mulu xcmpw rp1,axbnc $xv475mov a,#01hmov [%inget7],abr!!outxv475: br !!xv43xv45: addg whl,#02hmov a,[whl]cmp a,#00hbz$xv451br!!xv43xv451:movg whl,inget1addg whl,#03hmov a,[whl]cmp a,#00h |
bnz $xv452mov a,#01hxv452: mov c,asubg whl,#02hmovg uup,inget4addg uup,#03hmov a,[whl]mov x,amov a,[uup]mulu xdivuw cmovw rp1,axsubg uup,#02hmov a,[uup]mov x,amov a,#00hcmpw ax,rp1bc $xv453mov a,[whl]mov x,#ang30minmulu xmov c,#08hdivuw cmovw rp1,axaddg whl,#02hmov a,[whl]mov x,amov a,#00hcmpw rp1,axbnc $xv454mov a,[uup]mov x,amov a,#00hmovw rp2,axaddg uup,#02hmov a,[uup]mov x,#ang30minmulu xmov c,#0chdivuw ccmpw ax,rp2bnc $xv454mov a,#01hmov [%inget7],abr!!outxv454: br !!xv43xvl4101:br!!xv4101xv453: movg whl,inget1incg whlmov a,[whl] | mov x,#18hmulu xmovw rp1,axaddg whl,#02hmov a,[whl]mov x,#ycon1mulu xcmpw ax,rp1bnc $xv14101movg uup,inget4incg uupmov a,[uup]mov x,#xcon4mulu xmovw rp1,axaddg uup,#02hmov a,[uup]mov x,#07hmulu xcmpw rp1,axbnc $xv14101mov a,#01hmov [%inget7],abr!!outxv3: incg whlincg uupmov a,[whl]mov x,amov a,[uup]cmp a,xbnc $xv31mov r6,xmov r4,asubg whl,#02hsubg uup,#02hmov a,[whl]mov r7,amov a,[uup]mov r5,abr!!xv32xv31: mov r6,amov r4,xsubg whl,#02hsubg uup,#02hmov a,[uup]mov r7,amov a,[whl]mov r5,axv32: cmp r4,#00hbnz $xv34 | br!!xv33xv131:br !!xv132xv34: movg whl,inget1mov a,[whl]cmp a,#00hbz$xv13amovg whl,inget4mov a,[whl]cmp a,#00hbnz $xv131xv13a: mov a,r6mulu r5divuw r4mov c,r7mov b,#00haddw ax,bcmov c,#xcon2muluw rp1cmp x,#00hbnz $xv33mov a,#10hmulu r6cmpw ax,bcbc$xv33movg whl,inget1addg whl,#02hmov a,[whl]cmp a,#00hbnz $xv35subg whl,#02hmov a,[whl]cmp a,#00hbz$xv36mov a,#0e2hmov [%inget7],abr!!outxv36:mov a,#0f4hmov [%inget7],abr!!outxv35: subg whl,#02hmov a,[whl]cmp a,#00hbz$xv37mov a,#0f2hmov [%inget7],abr!!outxv37: mov a,#0e4hmov [%inget7],abr!!outxv33:mov a,#01h |
mov [%inget7],abr !!outxv132: mov a,r6mulu r5divuw r4mov c,r7mov b,#00haddw ax,bcmov c,#xcon2muluw rp1cmp x,#00hbnz $xv33mov a,#xcon2mulu r6cmpw ax,bcbc$xv33movg whl,inget1addg whl,#02hmov a,[whl]cmp a,#00hbnz $xv35subg whl,#02hmov a,[whl]cmp a,#00hbz$xv36mov a,#0e2hmov [%inget7],abr!!outxv5: decg whldecg uupmov a,[whl]mov x,amov a,[uup]cmp a,xbnc $xv51mov r7,xmov r5,aaddg whl,#02haddg uup,#02hmov a,[whl]mov r6,amov a,[uup]mov r4,abr!!xv52xv51: mov r7,amov r5,xaddg whl,#02haddg uup,#02hmov a,[uup]mov r6,a | mov a,[whl]mov r4,axv52: cmp r5,#00hbnz $xv54br!!xv53xv54: mov a,r7mulu r4divuw r5mov c,r6mov b,#00haddw ax,bcmov c,#yconlmuluw rp1cmp x,#00hbnz $xv53mov a,#ycon1mulu r7cmpw ax,bcbc$xv53movg whl,inget1mov a,[whl]cmp a,#00hbnz $xv55addg whl,#02hmov a,[whl]cmp a,#00hbz$xv56mov a,#0f1hmov [%inget7],abr!!outxv56: mov a,#0e3hmov [%inget7],abr!!outxv55: addg whl,#02hmov a,[whl]cmp a,#00hbz$xv57mov a,#0e1hmov [%inget7],abr!!outxv57: mov a,#0f3hmov [%inget7],abr!!outxv53: mov a,#01hmov [%inget7],aout:pop pswretEND13、测矢量的运动趋势:NAME xvtmn | PUBLIC xvtmz,xvtm2zextrn inget1,inget4,inget7CSEGxvtmz: push pswsel rb3movg whl,inget1movg uup,inget4mov a,[whl]mov x,amov a,[uup]cmp a,xbz$xv1addg whl,#02haddg uup,#02hmov a,[whl]mov x,amov a,[uup]cmp a,xbnz $xv2br!!xv3xv2: mov a,#03hmov [%inget7],abr!!outxv1: addg whl,#02haddg uup,#02hmov a,[whl]mov x,amov a,[uup]cmp a,xbz$xv4br!!xv5xv4: subg whl,#02hmov a,[whl]cmp a,xbnz $xv41incg whlmov a,[whl]mov x,aincg uupmov a,[uup]mulu xmovw rp1,axaddg whl,#02hsubg uup,#02hmov a,[whl]mov x,amov a,[uup]mulu xcmpw ax,rp1bnz $xv42 |
xv44: mov a,#00hmov [%inget7],abr!!outxv42: bnc $xv43mov a,#02hmov [%inget7],abr!!outxv43: mov a,#01hmov [%inget7],abr!!outxv41: incg whlmov a,[whl]mov x,aincg uupmov a,[uup]mulu xmovw rp1,axaddg whl,#02hsubg uup,#02hmov a,[whl]mov x,amov a,[uup]mulu xcmpw ax,rp1bnz $xv45br!!xv44xv45: bc $xv43br!!xv42xv3: cmp a,#00hbnz $xv31subg whl,#02hmov a,[whl]cmp a,#00hbnz $xv32xv33: mov a,#02hmov [%inget7],abr!!outxv32:mov a,#01hmov [%inget7],abr!!outxv31: subg whl,#02hmov a,[whl]cmp a,#00hbnz $xv33br!!xv32xv5: subg whl,#02hmov a,[whl]cmp a,#00hbnz $xv51addg whl,#02h | mov a,[whl]cmp a,#00hbnz $xv52xv53:mov a,#01hmov [%inget7],abr!!outxv52:mov a,#02hmov [%inget7],abr!!outxv51: addg whl,#02hmov a,[whl]cmp a,#00hbnz $xv53br!!xv52xvtm2z: push pswsel rb3movg whl,inget1movg uup,inget4mov a,[whl]mov x,amov a,[uup]cmp a,xbnz $xvt1br!!xv1xvt1:addg whl,#02haddg uup,#02hmov a,[whl]mov x,amov a,[uup]cmp a,xbnz $xvt2br!!xv3xvt2: incg whlmov a,[whl]cmp a,#00hbnz $xvt3mov a,#01hxvt3:mov c,asubg whl,#02hincg uupmov a,[whl]mov x,amov a,[uup]mulu xdivuw cmovw rp1,axsubg uup,#02hmov a,[uup]mov x,a | mov a,#00hmovw rp2,axdecg whlmov a,[whl]cmp a,#00hbnz $xvt4cmpw rp1,rp2bnc $xvt5xvt6:mov a,#01hmov [%inget7],abr!!outxvt5: mov a,#02hmov [%inget7],abr!!outxvt4: cmpw rp1,rp2bnc $xvt6br!!xvt5out: pop pswret·————————————·END14、AD中断处理、P06端口中断处理、TM7时间中断处理等程序NAME zpubnpublic readfend,readfinit,writf,get_data,ztoabs,disp_key,disp_one,disp_addr,readlcd,rprs1,prs1,prs0public disp_word,ini_1,ini_2,clrram,clear,disp_line,get_datamnpublic intp01,intp06,inttm2,inttm7,intad,rprs2extrn aqs2z,aqslz,indexallin,lcd_lin,lcd_vol,lcd_data,key_code,disp_code,z_sys1flaginfind1,zf,hzextrn sptemp,indexallout,infind5,infind8,z_sysflag,infind2,lcd_linmax,lcd_volmaxz_mtemp,z_offtempextrnaddrad,hzword,z_intflg1,z_intflg4,z_actbtemp,z_ltcmp,z_maddtcmp,infind6,z_offabsextrn z_sys4flag,lintsp,handwv,adonez,picbytes,getdataaddr,lcdxy,z_intflg3, |
lcdxyx,lcdxyy,x00,y00,xmax,ymaxextrn luqd860zcsegintp06:sel rb6clr1 z_intflg3.4bt z_sys4flag.2,$handp06intp060:mov pic6,#01000011bclr1 egp0.6clrl egn0.6mov tmic7,#00000011bmov tmc7,#10000000bmov prm7,#00000111bmov cr70,#7fhsetl z_sys1flag.1clr1 z_sys1flag.2clr1 z_sys1flag.3clr1 z_sys1flag.4retihandp06:mov pic6,#01000011bclr1 egp0.6clr1 egn0.6mov tmic7,#00000011bmov tmc7,#10000000bmov prm7,#00000111bmov cr70,#3ahretihandtm7:bf z_sys1flag.4,$inttm70bf p0.6,$torethandcall !!adonezbr !!torettorethand:push vvpmovw !!lcdxy,#0ffffhmovg tde,#lintspmovg vvp,#00hmov a,[tde]mov r8,ajnc amov [tde],aincg tdeaddg tde,vvpmov a,[tde]incg tdemov [tde],adecg tdemov a,#handwvmov [tde],a | mov tmic7,#01000011bmov tmc7,#00000111bpop vvppop tdepop axretiinttm7: sel rb7push axpush tdebt z_sys4flag.2,$handtm7setlz_intflg3.2inttm70:bt z_sys1flag.2,$multm1mov a,p0bf p0.6,$toerrset1 pm0.4clr1 pm0.4clrl p0.4set1 pm0.6clr1pm9.4set1 pm0.3clr1 pm0.5set1 p0.5clr1p9.4mov adic,#00000011bmov adm,#10100000bmov adis,#00000111bmovg tde,#0ffd57hmovg addrad,tdeset1 z_sys1flag.0set1 z_sys1flag.2toret: pop tdepop axretitoerr: set1 pm0.3set1 pm0.5set1 pm0.4set1 pm0.6set1pm9.4clr1 pm0.5clr1 pm0.4clr1 p0.4clr1 p0.5mov pic6,#00000011bset1 egp0.6clr1 egn0.6mov tmic7,#01000011bmov tmc7,#00000111bset1 z_sys1flag.4br!toret | multm1: bf p0.6,$nopresspress: br !toretsectm1: set1 z_sys1flag.3br!toretnopress:bf z_sys1flag.3,$sectmlset1 z_sys1flag.4mov tmic7,#01000011bmov tmc7,#00000111bmov pic6,#00000000bset1 egp0.6clr1 egn0.6clr1 z_sys1flag.2clr1 z_sys1flag.3set1 pm0.3clr1 pm0.5clr1 pm0.4set1pm9.4clr1 p0.4clr1 p0.5set1 pm0.6br !toretintad: sel rb6push whlpushtdepush axmov a,adcrmov adic,#01000011bmov adm,#00100000bbfz_sys4flag.2,$intapl1bf z_intflg3.1,$intapl2cmp a,#0fchbc $intapl3clr1 pm0.4clr1 pm0.5set1p0.5clr1p0.4set1pm0.3clr1pm9.4clr1p9.4setlz_sys1flag.0clr1z_intflg3.1setz_intflg3.2mov adis,#00000111bmov adic,#00000011bnopnopnop |
nopnopnopmov adm,#10100000bbr!intadpretintap13:movw !!lcdxyx,#0ffffhbr !!adhandintapl2:btz_intflg3.2,$intapl1cmp a,#0fchbc $intapl3br !!adhandintapl1:bf z_sys1flag.0,$intad6pset1 p9.4nopnopnopnopnopset1 pm0.6clr1 pm0.5clr1 pm0.4set1 p0.4clr1 p0.5set1 pm9.4nopnopnopnopclr1 pm0.3clr1 p0.3clr1 z_sys1flag.0movg whl,addradbf z_intflg3.3,$changeysavey: mov [whl],amov !!lcdxyy,asubg whl,#1movg addrad,whlmov adis,#00000110bmov adic,#00000011b movadm,#10100000bbr !intadpretchangey:sub a,y00mov x,#0ffhmulu xmov e,ymaxsub e,y00divuw e | mov a,xbr $!saveychangex:sub a,x00mov x,#0ffhmulu xmov e,xmaxsub e,x00divuw emov a,xbr $!savexintad6p:set1 p9.4movg whl,addradmov x,#0ffhsub x,amov a,xbf z_intflg3.3,$changexsavex: mov[whl],amov !!lcdxyx,aclr1 adm.7mov adic,#01000011bset1 pm0.3set1 pm0.6clr1 pm0.5clr1 pm0.4clr1 p0.4clr1 p0.5set1 pm9.4set1 z_intflg1.6clr1 z_sys1flag.1bfz_sys4flag.2,$intadpret2clr1 pm0.3clr1p0.3set1z_sys1flag.0clr1z_intflg3.1clr1z_intflg3.2mov adis,#00000110bmov adic,#00000011bmov adm,#10100000bbr !!intadpretintadpret2:set1 z_intflg4.7br !!intadpretadhand: push tdemovg whl,#lintspmov a,[whl]add a,#1mov[whl],amovg tde,#0mov e,aaddg whl,tde | mov a,#handwvmov[whl],apop tdemov tmic7,#01000011b movtmc7,#00000111b set1 pm0.3clr1 pm0.5clr1 pm0.4clr1 p0.5clr1 p0.4set1 pm0.6set1 pm9.4intadpret:pop axpop tdepop whlretiEND15、主程序:manu 52h;manuheader1manu 52h ffh;#include″l2.h″;begin;define at 0ffd00hback 41 flagy codenum1 data d3 tempaddtodata 2(1 binum1 1binum2)binum 1 errnum4 bdataaddr 1 f5numat 0ffe57h zsysflag zintflg1zintflg2 1 1 zsys4flagat 0ffe7ah tempcodezsys2flag 2 1 user zsys1flagat 0ffdb6h zsys5flagat 0ffd56h xx yyat 0fff0dh p130at 0ff400h 2 hwallat 0ffd5fh hwtm2at 0ffdb7h hwtm2copyat 0ff370h handdatalat 0ffd20h 3inter1at 0ffaa0h resendat 0ffab0h sendokat 0ffac0h senddataat 0ff828h num11 num12at 0ff768h num10 num20at 0fe008h 3recordat 0fe007h send2;flagy=0;let2(zsysflag(08h))=0;start0:let2(flagy(40h))=0; |
start:if zsys4flag(80h)=0helsegoto startin;play_to(0fe008h),_text(02h,07h,00h,f1h,00h,f5h,00h,00h,00h,00h);num10=1,num20=1;startin:clearscreenall;displaycin(3,1)is 00dah;displaycin(7,1)is 1ebfh 1ec0h1ec1h 1ec2h;displayin(4,14)is 3ah;play_to(0ff820h),_text(1,1,1,1,1,42h,1,1,1,1,1,1);num11=num10,num12=num20,tempadd=0ff820h+6,{tempadd}=num10,tempadd=0ff820h+7,{tempadd}=num20;refresh_from(record),_para(0ff820h),_mode(2),_back(back);dispcur_from(record),_para(0ff820h),_mode(0),_back(back);play_to(senddata),_text(00h,ffh,cah,ffh);d=1,todata=0ff890h+1,{todata}=0;ishand:if flagy(40h)=40h gotostart0;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)=01 gotoiskey;ishand1:cmk8_data($hwall),_back(back);handbag;goto tosend3;ifhand:switch zsys5flag={1ishand,3ishand,4ifishand};goto ifkey; | ifishand:if flagy(20h)=20hgoto ifkey;goto ishand;ifkey:keywait;iskey:ad_from(xx,yy),_to(tempcode),_manu(78h),_line(0ah);if tempcode=0 goto ad2;let2(flagy(80h))=0;code=tempcode;switch code={9fh esc,a3hcancel,89h enter,83h left,84hright};if zsys5flag=3 goto ishand1;goto ishand;left:dispcur_from(record),_para(0ff820h),_mode(1),_back(back);toleft:switch back={2 left3,3right5,5 right5};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;cancel:tempadd=0ff888h,{tempadd}=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,is″自动刷新″nextline 1″半自动刷新″;displaycin 5,1,is″手动刷新″nextline 1″速度设置″;displayin(2,65)is3ah,(4,81)is 3ah,(6,65)is3ah,(8,65)is 3ah;call funcset;function1:displayinflag52hflag1 zsys5flag is e5h;inputa:keywait;ad_from(xx,yy),_to(tempcode),_manu(78h),_line(0ah);if tempcode=0 goto ad2a;getkeytoback,code,data,zsys5flag,num1,1,4,1;switch data={7 entera,8 esca,1movea};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 flag1zsys5flag 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)=08helsegoto inputa;if hwtm2>=32h elsegoto inputahwtm2=hwtm2-19h,hwtm2copy=hwtm2; |
goto dispa;adda:if flagy(08h)=08helsegoto inputa;if hwtm2<=elh elsegoto inputa;hwtm2=hwtm2+19h,hwtm2copy=hwtm2;goto dispa;funcret:goto start;funcset:switch zsys5flag={1set1,2 set2,3 set3,4 set4};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 move16lec0h;let2(flagy(08h))=08h;num1=hwtm2/19h-1,num1=num1+30h,code=8,data=105;displayin(code,data)is num1;return;dispa:num1=hwtm2/19h-1,hum1=num1+30h,code=8,data=105;displayin(code,data)is num1;goto inputa;tosend3:binum=hwall,tempadd=0ffa00h,errnum=0;if binum1=0 goto ishand;send1_from(#hwall);goto wait3;send:tempadd=0ffa00h,errnum=0;main2:send1_from(#senddata);wait3:if zintflg1(20h)=20helsegoto wait3;resend21:download3_to(tempadd),_back(data);waitnew_name(84),_line(t2);t2:if data=0 elsegototoresend2;todata=tempadd+4,data={todata}; | switch data={2 tomain2,3ifhand,14h nodata};goto nodata;tomain2:clearscreenall;displaycin(3,34)is″通讯错误″00bch nextline 6″请按任意键返回″;keywait;goto start;toresend2:play_to(resend),_text(09h,ffh,cah,ffh,04h,57h,5bh,00h,ffh,ffh);send1_from(#resend);wait5:if zintflg1(20h)=20helsegoto wait5;goto resend21;nodata:clearscreenfrom(3,17)to(4,64),(5,1)to(6,64);displaycin(3,1)is 00dah″无数据″;goto ifhand;sendret:goto ishand;enter:if zsys4flag(80h)=80hgoto 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 zsys1flag(10h)=10helsegoto adwait;revlcdfrom_line(revlcd),_num(num1);let2(flagy(80h))=00h;switch num1={0bh function};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、一种使通信终端实现手写笔迹信息交流的方法。其特征在于:用透光的触摸屏代替在现有的通信终端的显示器件正面与外部之间的透光的材料,由一个触摸屏控制器控制触摸屏,进行手写笔迹数据的采集,并生成笔划矢量数据,根据需要由触摸屏控制器或通信终端的主控制器完成手写过程的实时显示;由通信终端的主控制器将包含有笔划矢量数据的笔迹矢量数据与现有的语音或图像或文字或其它数据的信息进行编辑存贮;当需要将笔迹信息传送到其它通信终端时,在通信终端的主控制器的控制下将包含有笔迹矢量数据的数据经由该通信终端所遵从的现有的传送图像或声音或文字或其它数据的方法发送出去;当通信终端依其所遵从的现有的接收图像或声音或文字或其它数据的方法收到包含有笔迹矢量数据的数据后,以现有方式存贮该信息;在需要显示该数据所包含的笔迹信息时,依据每个笔迹矢量数据重新画出每个笔迹,并据需要放大和缩小各个笔迹。
2、如权利要求1所述的透光的触摸屏其特征在于:所述的透光的触摸屏作为手写笔迹的传感器,包含了当笔在触摸屏表面移动时,对水平方向和垂直方向的移动分量敏感的材料。
3、如权利要求1所述的触摸屏控制器其特征在于:所说的触摸屏控制器具有相应电路通过一定时序给触摸屏提供驱动信号来检测当笔在触摸屏表面移动时在水平方向和垂直方向的移动分量并得到相应的笔迹某点的水平方向和垂直方向的坐标分量。所说的触摸屏控制器分析笔迹运动的位移矢量,产生笔划矢量数据。
4、如权利要求3所述的触摸屏控制器其特征在于:当所述的触摸屏为电阻式透光触摸屏时,所述的触摸屏控制器至少包含有两路模拟到数字转换电路(A/D电路);具有当每次笔开始书写时产生中断的机制;至少具有4个引脚用于分别单独控制所控制的触摸屏的水平和垂直方向的一个引脚;当笔正在触摸屏上书写时,所述的触摸屏控制器采集任一点坐标的时序中至少包含有两次这样的流程:在时刻1,触摸屏控制器将触摸屏的方向1(水平方向或垂直方向)的某一引脚(设为引脚1)接固定的已知的高电平,该方向1的另一引脚(设为引脚2)接同样的固定的已知的高电平或接高阻抗。触摸屏控制器将触摸屏方向2(非方向1的方向)的两个引脚接高阻抗;在时刻2,触摸屏控制器通过模拟到数字的转换检测触摸屏方向2的一个引脚(设为引脚3)的电平;在时刻3,触摸屏控制器取得引脚3经模拟到数字的转换完成后的电平所对应的数值;在时刻4,判断引脚3的电平所对应的数值为这时水平方向和垂直方向完全导通所对应的引脚3应有的值吗?如果条件满足则:如果本点坐标还未采集完则继续采集,如果本点坐标已采集完则采集的坐标值有效。如果条件不满足则:本次采集该点坐标的值无效。须等待预设的一段时间间隔后重新采集。
5、如权利要求1所述的生成笔划矢量数据的特征在子:当触摸屏控制器采集得笔迹的先后的两点坐标时,先存起来,并将第2点坐标存为最后坐标。当采集得第三点笔迹坐标后,计算第三点笔迹坐标与第一点笔迹坐标构成的位移矢量(设为矢量1)和第一点坐标与第二点坐标构成的位移矢量(设为矢量2)。判断是否满足条件1:矢量1与矢量2的方向夹角小子预设的范围且矢量1的长度不小于矢量2的长度。如果满足该条件1则第三点坐标存为最后坐标,等过预设的一段时间后再继续采集新的一点坐标作为第三点坐标。如果不满足该条件1则过一段时间后采集第4点坐标,得到第4点坐标后,计算第4点坐标与第1点坐标构成的位移矢量(设为矢量3);判断是否满足条件2:矢量3与矢量1的方向夹角小于预设的范围且矢量1的长度不小于矢量3的长度;如果满足条件2则舍去第三点坐标将第4点坐标存为最后坐标,过一段预设的时间后再重新采集新的一点坐标作为第三点坐标;如果不满足条件2则将第1点和最后坐标构成的矢量作为已生成的一个笔划的矢量数据,将第三点坐标作为新的一个笔划的第一点坐标,将第四点坐标作为新的一个笔划的第二点坐标和最后坐标。如果采集到触摸屏水平方向与垂直方向不接触,则统计连续的不接触时间,如果该时间超过设定的间隔则将第一点坐标和最后坐标构成的矢量作为已生成的一个笔划的矢量,并设一个标志表示下一个采到的坐标为第一点坐标,如果连续的不接触时间大于另一设定的间隔则说明本次书写结束,重复上述过程可实现将一次书写过程的每个笔划的矢量数据采集得到。
6、如权利要求1所述的笔划矢量数据其特征在于:所述的笔划矢量数据至少包含了该笔划的起点坐标和终点坐标。
7、如权利要求1所述的笔迹矢量数据其特征在于:所述的每个笔迹矢量数据包含有表示一次书写的笔迹的数据长度或笔划个数的数据段,包含有本次书写的每个笔划的笔划矢量数据。当所述的笔迹矢量数据以同一个数据段位置来表示前后两个笔划共用一点坐标时,则还包含有若干数据段用于表示每个后面的笔划是否与前面的笔划共用同一点坐标。当所说的笔迹矢量数据与现有的其它方式输入的现有的文字编码相混合时则所说的笔迹矢量数据至少包含有一个数据段用于表示这是新的特殊的文字码,以便依次读取这种混合的数据时区分现有的文字编码还是新的完整的笔迹矢量数据。当所说的笔迹矢量数据与现有的图像或声音或其它格式的数据相混合以便发送给其它通信终端,或者以现有的发送数据的方法发送笔迹矢量数据时,所说的每个笔迹矢量数据至少包含有一个数据段用于与现有的其它数据结构相区别。
8、如权利要求1所述的依据每个笔迹矢量数据重新画出每个笔迹的方法其特征在于:依次读取每个笔迹矢量数据所包含的每个笔划矢量数据,依据每个笔划矢量数据的起点和终点坐标,在要显示的位置上依据需显示的大小与整个笔迹的原大小或原边界的对应关系,计算出该笔划的起点和终点所对应的位置,并在该起点和终点所对应的位置间画一直线,将每个笔迹矢量数据所包含的每个笔划矢量数据依次按同样的方法画出直到全部画完为止。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB031227309A CN100380907C (zh) | 2003-04-18 | 2003-04-18 | 一种使通信终端实现手写笔迹信息交流的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB031227309A CN100380907C (zh) | 2003-04-18 | 2003-04-18 | 一种使通信终端实现手写笔迹信息交流的方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1538722A true CN1538722A (zh) | 2004-10-20 |
CN100380907C CN100380907C (zh) | 2008-04-09 |
Family
ID=34321071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB031227309A Expired - Fee Related CN100380907C (zh) | 2003-04-18 | 2003-04-18 | 一种使通信终端实现手写笔迹信息交流的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100380907C (zh) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101533469A (zh) * | 2009-04-27 | 2009-09-16 | 萧如宣 | 一种触控面板系统及其运作方法 |
CN102081505A (zh) * | 2011-01-28 | 2011-06-01 | 广东九联科技股份有限公司 | 触摸屏的手写输入处理方法 |
CN102566812A (zh) * | 2011-09-30 | 2012-07-11 | 北京壹人壹本信息科技有限公司 | 一种手写记事本的实现方法及装置 |
CN102663667A (zh) * | 2012-03-28 | 2012-09-12 | 华为技术有限公司 | 触摸屏手写内容的存储方法、展示方法和终端设备 |
CN102761495A (zh) * | 2011-04-29 | 2012-10-31 | 周佳 | 一种基于手写原笔迹的即时通信方法、通信终端和系统 |
CN102902475A (zh) * | 2012-08-15 | 2013-01-30 | 中国联合网络通信集团有限公司 | 数值输入方法及装置 |
CN102929534A (zh) * | 2011-09-30 | 2013-02-13 | 北京大学深圳研究生院 | 一种盲写信息输入系统和方法 |
CN102937848A (zh) * | 2012-12-04 | 2013-02-20 | 上海合合信息科技发展有限公司 | 对手写笔迹进行编辑处理的方法及电子设备 |
US8736657B2 (en) | 2007-07-23 | 2014-05-27 | Lg Electronics Inc. | Mobile terminal and method of processing call signal therein |
CN104737120A (zh) * | 2012-09-25 | 2015-06-24 | 株式会社东芝 | 手写文档处理设备以及方法 |
CN104932814A (zh) * | 2015-04-29 | 2015-09-23 | 萌宝信息技术(上海)有限公司 | 数据传输方法、系统及电子终端 |
CN111459309A (zh) * | 2014-10-17 | 2020-07-28 | 尼奥公司 | 电子笔,链接到电子笔的电子设备,以及用于控制电子设备的方法 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1191441A (zh) * | 1998-01-15 | 1998-08-26 | 张伟东 | 笔绘画式输入的电话传真机 |
EP0980038A3 (en) * | 1998-08-13 | 2002-11-20 | Motorola, Inc. | Device and method simultaneously presenting text and handwritten characters in a common area of a user interface |
CN1139235C (zh) * | 2000-09-27 | 2004-02-18 | 北京汉王科技有限公司 | 智能网络电话 |
KR20020050769A (ko) * | 2000-12-21 | 2002-06-27 | 김종태 | 그래픽 기능을 갖는 통신단말기에서의 화면내용동기화방법 |
JP2003234842A (ja) * | 2001-10-02 | 2003-08-22 | Ia Link Systems Co Ltd | リアルタイム手書き通信システム |
-
2003
- 2003-04-18 CN CNB031227309A patent/CN100380907C/zh not_active Expired - Fee Related
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8736657B2 (en) | 2007-07-23 | 2014-05-27 | Lg Electronics Inc. | Mobile terminal and method of processing call signal therein |
CN101533469A (zh) * | 2009-04-27 | 2009-09-16 | 萧如宣 | 一种触控面板系统及其运作方法 |
CN102081505A (zh) * | 2011-01-28 | 2011-06-01 | 广东九联科技股份有限公司 | 触摸屏的手写输入处理方法 |
CN102761495B (zh) * | 2011-04-29 | 2015-12-16 | 北京壹人壹本信息科技有限公司 | 一种基于手写原笔迹的即时通信方法、通信终端和系统 |
CN102761495A (zh) * | 2011-04-29 | 2012-10-31 | 周佳 | 一种基于手写原笔迹的即时通信方法、通信终端和系统 |
WO2012146128A1 (zh) * | 2011-04-29 | 2012-11-01 | 北京壹人壹本信息科技有限公司 | 基于手写原笔迹的即时通信的发送和接收方法以及终端 |
TWI455031B (zh) * | 2011-04-29 | 2014-10-01 | ||
CN102566812B (zh) * | 2011-09-30 | 2015-02-18 | 北京壹人壹本信息科技有限公司 | 一种手写记事本的实现方法及装置 |
CN102929534A (zh) * | 2011-09-30 | 2013-02-13 | 北京大学深圳研究生院 | 一种盲写信息输入系统和方法 |
CN102566812A (zh) * | 2011-09-30 | 2012-07-11 | 北京壹人壹本信息科技有限公司 | 一种手写记事本的实现方法及装置 |
CN102663667B (zh) * | 2012-03-28 | 2014-12-24 | 华为技术有限公司 | 触摸屏手写内容的存储方法、展示方法和终端设备 |
CN102663667A (zh) * | 2012-03-28 | 2012-09-12 | 华为技术有限公司 | 触摸屏手写内容的存储方法、展示方法和终端设备 |
CN102902475A (zh) * | 2012-08-15 | 2013-01-30 | 中国联合网络通信集团有限公司 | 数值输入方法及装置 |
CN104737120A (zh) * | 2012-09-25 | 2015-06-24 | 株式会社东芝 | 手写文档处理设备以及方法 |
CN102937848A (zh) * | 2012-12-04 | 2013-02-20 | 上海合合信息科技发展有限公司 | 对手写笔迹进行编辑处理的方法及电子设备 |
CN102937848B (zh) * | 2012-12-04 | 2015-07-22 | 上海合合信息科技发展有限公司 | 对手写笔迹进行编辑处理的方法及电子设备 |
CN111459309A (zh) * | 2014-10-17 | 2020-07-28 | 尼奥公司 | 电子笔,链接到电子笔的电子设备,以及用于控制电子设备的方法 |
CN104932814A (zh) * | 2015-04-29 | 2015-09-23 | 萌宝信息技术(上海)有限公司 | 数据传输方法、系统及电子终端 |
Also Published As
Publication number | Publication date |
---|---|
CN100380907C (zh) | 2008-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100380907C (zh) | 一种使通信终端实现手写笔迹信息交流的方法 | |
CN103440116B (zh) | 一种交互式电子演示系统 | |
CN102939575B (zh) | 墨水呈现 | |
CN100583017C (zh) | 带用户身份标识的无线控制激光笔及多用户光点识别系统 | |
CN106030638A (zh) | 基于运动和姿态的移动终端广告激活 | |
CN107066122A (zh) | 有源触控笔、触摸感测系统及其驱动方法 | |
CN102109971A (zh) | 可无线传输标绘信息的幻灯演示系统 | |
CN102177490A (zh) | 具有数据通信接口的触觉型人机接口 | |
WO2022154604A1 (ko) | 인공지능기반 유저 반응형 키오스크 결제 시스템 | |
JP2001511275A (ja) | ディスプレイポインティングデバイス | |
CN102508848A (zh) | 一种人机智能交互方法及系统 | |
CN110083418A (zh) | 信息流中图片的处理方法、设备及计算机可读存储介质 | |
CN111491208A (zh) | 视频处理方法、装置、电子设备及计算机可读介质 | |
CN103366473A (zh) | 使用便携式计算机的pos系统 | |
US20130166392A1 (en) | Device for displaying content by means of designated website and designated webpage recognition and a method for the same | |
CN111596856B (zh) | 一种基于副屏触摸的一种笔迹书写方法、系统及存储介质 | |
WO2012105792A2 (ko) | 관심분야 예측정보에 기초한 배경화면을 이용한 문자메시지 전송서비스 제공시스템 및 그 제공방법 | |
CN201345134Y (zh) | 一种交互式公众数字信息服务系统 | |
Rohs | Linking physical and virtual worlds with visual markers and handheld devices | |
CN103092495A (zh) | 触控装置的同步操作系统及方法 | |
CN215895352U (zh) | 支持电磁手写绘图功能的便携显示器 | |
CN113495641A (zh) | 触摸屏鬼点识别方法、装置、终端及存储介质 | |
CN110096193A (zh) | 电子小说的处理方法、设备及计算机可读存储介质 | |
CN218788190U (zh) | 一种带语音、图像交互功能的电磁手写数位板 | |
CN109558051A (zh) | 多功能页面的切换处理方法、设备及计算机可读存储介质 |
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 |