CN110262793A - A kind of logical drive method of talking pen system - Google Patents
A kind of logical drive method of talking pen system Download PDFInfo
- Publication number
- CN110262793A CN110262793A CN201910420432.0A CN201910420432A CN110262793A CN 110262793 A CN110262793 A CN 110262793A CN 201910420432 A CN201910420432 A CN 201910420432A CN 110262793 A CN110262793 A CN 110262793A
- Authority
- CN
- China
- Prior art keywords
- instruction
- user
- variable
- intermediate code
- code
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/447—Target code generation
Abstract
The invention discloses a kind of logical drive methods of talking pen system, including input unit, output unit, logic processing module, microprocessor, storage and data buffering equipment, driving method is the following steps are included: step 1: user writes scripted code according to the coding criterion of scripting language;Step 2: user is compiled into the intermediate code unrelated with system hardware by script compiler according to instruction set data requirement, and is stored in storage equipment;Step 3: microprocessor reads intermediate code from storage equipment, and the script resolver by logic processing module parses intermediate code;Step 4: by parsing intermediate code, microprocessor controls and operates external equipment realization, completes user's custom feature.The beneficial effects of the present invention are: user writes code, microcomputer reads intermediate code according to the coding criterion of scripting language, the script resolver by logical process realizes that micro process controls and operates external equipment, completes user's custom feature.
Description
Technical field
The present invention relates to computer systems technology field, specially a kind of logical drive method of talking pen system.
Background technique
Talking pen, cardinal principle are printed on encoded information on books or other media, are known by image processing arrangement
Then other encoded information obtains according to certain logic and plays corresponding voice.
Existing talking pen system is all to design the various places that may occur in advance in the design of Logical processing unit
Logical course is managed, the operation of corresponding function and external equipment is executed according to certain fixed format, such as booting, shutdown, volume
Adjustment, voice broadcasting etc., such design can be only done several logical process modes of limited fixation, patrol if it is desired to modification is original
Volume, or increase new logical process mode, need to rewrite the design of the Logical processing unit of talking pen, such design, control
Method processed is inflexible, cannot achieve flexible customized function.
Summary of the invention
The purpose of the present invention is to provide a kind of logical drive methods of talking pen system, to solve in above-mentioned background technique
The problem of proposition.
To achieve the above object, the invention provides the following technical scheme: a kind of logical drive method of talking pen system, packet
Input unit, output unit, logic processing module, microprocessor, storage and data buffering equipment are included, the driving method includes
Following steps:
Step 1: user writes scripted code according to the coding criterion of scripting language;
Step 2: user is compiled into unrelated with system hardware according to instruction set data requirement by script compiler
Between code, and be stored in storage equipment in;
Step 3: microprocessor reads intermediate code from storage equipment, the script resolver by logic processing module, solution
Analyse intermediate code;
Step 4: by parsing intermediate code, microprocessor controls and operates external equipment realization, completes user and makes by oneself
Adopted function.
Preferably, the input unit includes recording driving and microphone, and key driving and press key equipment, DPR optics are set
It is standby with DPR optical drive.
Preferably, the output unit includes multimedia driving, audio-video conversion, audio & video equipment, display driving, display
Screen, LED driving, LED.
Preferably, the logic processing module is preset with following code instruction set:
RESET: reset instruction, initialising subscriber variable are allowed to reset;
END: END instruction, the input exited this target intermediate code and wait user new;
PLAY: play instruction, sequence or one or several voice of shuffle or video;
PLAY_NEXT: playing next, plays next voice or video file;
PLAY_PREV: upper one first, upper the voice of broadcasting or video file is played;
CALL: other one section of intermediate code section is called;
SET: assignment directive is user-variable assignment;
CMP: compare instruction compares two user-variables, or compares a user-variable and a constant, and by structure
It is stored in register;
AND: with instruction, some user-variable is carried out and is operated;
OR: or instruction, some user-variable is carried out or is operated;
NOT: non-instruction carries out not operation to some user-variable;
TEST: test instruction, whether the certain positions for testing some user-variable are 1;
ADD: add instruction, two user-variables additions or a user-variable and a constant to be added, and result is protected
There are in outcome variable;
SUB: subtracting instruction, and two user-variables subtract each other or a user-variable and a constant subtract each other, and result is protected
There are in outcome variable;
MUX: multiplying instruction, two user-variables multiplications or a user-variable and a constant is multiplied, and result is protected
There are in outcome variable;
DIV: except instruction, two user-variables are divided by or a user-variable and a constant are divided by, and result is protected
There are in outcome variable;
JMP: unconditional jump instruction, another address for jumping directly to intermediate code continues to execute intermediate code;
JB: less than when jump, jumped according to the result of compare instruction;
JBE: less than equal to when jump, jumped according to the result of compare instruction;
JG: greater than when jump, jumped according to the result of compare instruction;
JGE: greater than equal to when jump, jumped according to the result of compare instruction;
JE: equal to when jump, jumped according to the result of compare instruction;
GET_TIME: obtaining system time instruction, obtains the time of current system and is stored in the specified user-variable of instruction;
GET_RAND: generating random number instruction, generates a random number and is stored in the specified user-variable of instruction;
DISP: idsplay order, in the designated position display text or figure of screen;
LED:LED control instruction controls the bright of LED or equal behaviors of going out;
RECORD: record command starts the sound for recording user by the recording device of talking pen, and by its recording data
It is stored in storage equipment;
PLAY_RECORD: playback instruction, the voice that playback instruction is recorded;
START_TIMER: starting timer instruction starts a system timer;
STOP_TIMER: stop timer instruction, stop a system timer;
Preferably, the microprocessor reads intermediate code from storage equipment, the script parsing by logic processing module
Device parses intermediate code, realizes that micro process controls and operates external equipment.
Preferably, it is described storage and data buffering equipment in, storage by script compiler be compiled into system hardware without
The intermediate code of pass.
Preferably, the linguistic norm for the logical code that the instruction set data requirement in system and user write is basis
The functional characteristics of talking pen is formulated.
Preferably, the logical code write belongs to natural language, and supports, English, Chinese, French.
Beneficial effect
User can write scripted code according to the coding criterion of scripting language, according to instruction set data requirement, pass through foot
This compiler is compiled into the intermediate code unrelated with system hardware, and is stored in storage equipment.Microprocessor from storage equipment
Intermediate code is read, the script resolver by logic processing module parses intermediate code, realizes micro process to external equipment
It controls and operates, completes user's custom feature, wherein the logical code support write is multi-lingual, belong to natural language,
Including English, Chinese, any national language such as French.
Detailed description of the invention
Fig. 1 is planar structure schematic diagram of the invention.
Fig. 2 is the embodiment schematic diagram in the present invention.
Specific embodiment
Following is a specific embodiment of the present invention in conjunction with the accompanying drawings, technical scheme of the present invention will be further described,
However, the present invention is not limited to these examples.
Embodiment
As shown in Figure 1, a kind of logical drive method of talking pen system, including input unit, output unit, logical process
Module, microprocessor, storage and data buffering equipment, driving method the following steps are included:
Step 1: user writes scripted code according to the coding criterion of scripting language;
Step 2: user is compiled into unrelated with system hardware according to instruction set data requirement by script compiler
Between code, and be stored in storage equipment in;
Step 3: microprocessor reads intermediate code from storage equipment, the script resolver by logic processing module, solution
Analyse intermediate code;
Step 4: by parsing intermediate code, microprocessor controls and operates external equipment realization, completes user and makes by oneself
Adopted function.
Preferably, input unit include recording driving and microphone, key driving and press key equipment, DPR optical device with
DPR optical drive.
Preferably, output unit includes multimedia driving, audio-video conversion, audio & video equipment, display driving, display screen
Curtain, LED driving, LED.
Preferably, logic processing module is preset with following code instruction set:
RESET: reset instruction, initialising subscriber variable are allowed to reset;
END: END instruction, the input exited this target intermediate code and wait user new;
PLAY: play instruction, sequence or one or several voice of shuffle or video;
PLAY_NEXT: playing next, plays next voice or video file;
PLAY_PREV: upper one first, upper the voice of broadcasting or video file is played;
CALL: other one section of intermediate code section is called;
SET: assignment directive is user-variable assignment;
CMP: compare instruction compares two user-variables, or compares a user-variable and a constant, and by structure
It is stored in register;
AND: with instruction, some user-variable is carried out and is operated;
OR: or instruction, some user-variable is carried out or is operated;
NOT: non-instruction carries out not operation to some user-variable;
TEST: test instruction, whether the certain positions for testing some user-variable are 1;
ADD: add instruction, two user-variables additions or a user-variable and a constant to be added, and result is protected
There are in outcome variable;
SUB: subtracting instruction, and two user-variables subtract each other or a user-variable and a constant subtract each other, and result is protected
There are in outcome variable;
MUX: multiplying instruction, two user-variables multiplications or a user-variable and a constant is multiplied, and result is protected
There are in outcome variable;
DIV: except instruction, two user-variables are divided by or a user-variable and a constant are divided by, and result is protected
There are in outcome variable;
JMP: unconditional jump instruction, another address for jumping directly to intermediate code continues to execute intermediate code;
JB: less than when jump, jumped according to the result of compare instruction;
JBE: less than equal to when jump, jumped according to the result of compare instruction;
JG: greater than when jump, jumped according to the result of compare instruction;
JGE: greater than equal to when jump, jumped according to the result of compare instruction;
JE: equal to when jump, jumped according to the result of compare instruction;
GET_TIME: obtaining system time instruction, obtains the time of current system and is stored in the specified user-variable of instruction;
GET_RAND: generating random number instruction, generates a random number and is stored in the specified user-variable of instruction;
DISP: idsplay order, in the designated position display text or figure of screen;
LED:LED control instruction controls the bright of LED or equal behaviors of going out;
RECORD: record command starts the sound for recording user by the recording device of talking pen, and by its recording data
It is stored in storage equipment;
PLAY_RECORD: playback instruction, the voice that playback instruction is recorded;
START_TIMER: starting timer instruction starts a system timer;
STOP_TIMER: stop timer instruction, stop a system timer;
Preferably, microprocessor reads intermediate code from storage equipment, the script resolver by logic processing module, solution
Intermediate code is analysed, realizes that micro process controls and operates external equipment.
Preferably, storage and data buffering equipment in, storage be compiled by script compiler it is unrelated with system hardware
Intermediate code.
Preferably, the linguistic norm for the logical code that the instruction set data requirement in system and user write is basis
The functional characteristics of talking pen is formulated.
Preferably, the logical code write belongs to natural language, and supports, English, Chinese, French.User can be according to language
Speech specification inputs following code:
The function of the above logical code section is to play this voice of helloworld.mp3 ten times.
The above code passes through compiler, is compiled into platform-independent intermediate code, as follows:
Then logic processing module reads each item according to Fig. 2 and instructs, and first instruction is that setting variable v0 is 0, due to
It is not END instruction, just then reads Article 2 instruction, Article 2 instruction is the size of comparison variable v0 and 10, due to being also not
Article 3 instruction is just then read in END instruction, since v0 is 0 at this time, so the condition that judgement is less than is very, to jump to mark
It is continued to execute at number xiaoyu, the Article 4 instruction of reading is to play this voice of helloworld.mp3, and do not terminate to refer to
It enables, reads in next instruction, be that variable count is added 1, be not equally END instruction, read in next instruction, Article 5 instruction
It is unconditional jump at label startplay label.After playing 10 helloworld.mp3, v0 value is equal to 10
, it is just vacation that judgement, which is less than the result of instruction, at this time, will not be jumped to again at xiaoyu label, but sequence reads next
Instruction, the entire implementation procedure of END instruction, in this way this code segment just finish.By above-mentioned operating process, user is very
It is convenient to realize customized various logic process.
Finally, it should be noted that the foregoing is only a preferred embodiment of the present invention, it is not intended to restrict the invention,
Although the present invention is described in detail referring to the foregoing embodiments, for those skilled in the art, still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features.
All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in of the invention
Summary of the invention within protection scope.
Claims (8)
1. a kind of logical drive method of talking pen system, including input unit, output unit, logic processing module, micro process
Device, storage and data buffering equipment, which is characterized in that the driving method the following steps are included:
Step 1: user writes scripted code according to the coding criterion of scripting language;
Step 2: user is compiled into the intermediate generation unrelated with system hardware by script compiler according to instruction set data requirement
Code, and be stored in storage equipment;
Step 3: microprocessor reads intermediate code from storage equipment, the script resolver by logic processing module, in parsing
Between code;
Step 4: by parsing intermediate code, microprocessor controls and operates external equipment realization, completes the customized function of user
Energy.
2. the logical drive method of talking pen system according to claim 1, it is characterised in that: the input unit includes
Recording driving and microphone, key driving and press key equipment, DPR optical device and DPR optical drive.
3. the logical drive method of talking pen system according to claim 1, it is characterised in that: the output unit includes
Multimedia driving, audio-video conversion, audio & video equipment, display driving, display screen, LED driving, LED.
4. the logical drive method of talking pen system according to claim 1, it is characterised in that: the logic processing module
It is preset with following code instruction set:
RESET: reset instruction, initialising subscriber variable are allowed to reset;
END: END instruction, the input exited this target intermediate code and wait user new;
PLAY: play instruction, sequence or one or several voice of shuffle or video;
PLAY_NEXT: playing next, plays next voice or video file;
PLAY_PREV: upper one first, upper the voice of broadcasting or video file is played;
CALL: other one section of intermediate code section is called;
SET: assignment directive is user-variable assignment;
CMP: compare instruction compares two user-variables, or compares a user-variable and a constant, and structure is stored in
Register;
AND: with instruction, some user-variable is carried out and is operated;
OR: or instruction, some user-variable is carried out or is operated;
NOT: non-instruction carries out not operation to some user-variable;
TEST: test instruction, whether the certain positions for testing some user-variable are 1;
ADD: add instruction, two user-variables additions or a user-variable and a constant to be added, and result is stored in
In outcome variable;
SUB: subtracting instruction, and two user-variables subtract each other or a user-variable and a constant subtract each other, and result is stored in
In outcome variable;
MUX: multiplying instruction, two user-variables multiplications or a user-variable and a constant is multiplied, and result is stored in
In outcome variable;
DIV: except instruction, two user-variables are divided by or a user-variable and a constant are divided by, and result is stored in
In outcome variable;
JMP: unconditional jump instruction, another address for jumping directly to intermediate code continues to execute intermediate code;
JB: less than when jump, jumped according to the result of compare instruction;
JBE: less than equal to when jump, jumped according to the result of compare instruction;
JG: greater than when jump, jumped according to the result of compare instruction;
JGE: greater than equal to when jump, jumped according to the result of compare instruction;
JE: equal to when jump, jumped according to the result of compare instruction;
GET_TIME: obtaining system time instruction, obtains the time of current system and is stored in the specified user-variable of instruction;
GET_RAND: generating random number instruction, generates a random number and is stored in the specified user-variable of instruction;
DISP: idsplay order, in the designated position display text or figure of screen;
LED:LED control instruction controls the bright of LED or equal behaviors of going out;
RECORD: record command is started the sound for recording user by the recording device of talking pen, and its recording data is stored
In storage equipment;
PLAY_RECORD: playback instruction, the voice that playback instruction is recorded;
START_TIMER: starting timer instruction starts a system timer;
STOP_TIMER: stop timer instruction, stop a system timer.
5. the logical drive method of talking pen system according to claim 1, it is characterised in that: the microprocessor is from depositing
It stores up equipment and reads intermediate code, the script resolver by logic processing module parses intermediate code, realizes micro process to outside
Equipment controls and operates.
6. the logical drive method of talking pen system according to claim 1, it is characterised in that: the storage and data are slow
It rushes in equipment, storage is compiled into the intermediate code unrelated with system hardware by script compiler.
7. the logical drive method of talking pen system according to claim 1, it is characterised in that: the instruction set number in system
The linguistic norm for the logical code write according to specification and user is formulated according to the functional characteristics of talking pen.
8. the logical drive method of talking pen system according to claim 1, it is characterised in that: the logical code category write
It in natural language, and supports, English, Chinese, French.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910420432.0A CN110262793A (en) | 2019-05-20 | 2019-05-20 | A kind of logical drive method of talking pen system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910420432.0A CN110262793A (en) | 2019-05-20 | 2019-05-20 | A kind of logical drive method of talking pen system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110262793A true CN110262793A (en) | 2019-09-20 |
Family
ID=67914857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910420432.0A Pending CN110262793A (en) | 2019-05-20 | 2019-05-20 | A kind of logical drive method of talking pen system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110262793A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0528019A1 (en) * | 1991-03-07 | 1993-02-24 | Digital Equipment Corp | Method and apparatus for computer code processing in a code translator. |
JPH10124310A (en) * | 1996-10-25 | 1998-05-15 | Sharp Corp | Arithmetic processor and microprocessor |
CN101145103A (en) * | 2007-10-23 | 2008-03-19 | 张俊平 | Pointing-reading machine system and its script drive method |
-
2019
- 2019-05-20 CN CN201910420432.0A patent/CN110262793A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0528019A1 (en) * | 1991-03-07 | 1993-02-24 | Digital Equipment Corp | Method and apparatus for computer code processing in a code translator. |
JPH10124310A (en) * | 1996-10-25 | 1998-05-15 | Sharp Corp | Arithmetic processor and microprocessor |
CN101145103A (en) * | 2007-10-23 | 2008-03-19 | 张俊平 | Pointing-reading machine system and its script drive method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100530089C (en) | Pointing-reading machine system and its script drive method | |
US6513009B1 (en) | Scalable low resource dialog manager | |
US11062081B2 (en) | Creating accessible, translatable multimedia presentations | |
US20080046820A1 (en) | Apparatus and method for controlling media player in portable terminal | |
CN105468410B (en) | Method for upgrading system and device | |
US11238858B2 (en) | Speech interactive method and device | |
TW200415455A (en) | Low power digital audio decoding/playing system for computing devices | |
CN101512656A (en) | GPU timeline with render-ahead queue | |
CN1967697A (en) | Device for displaying boot animation of optical disc player and method thereof | |
CN109859298A (en) | A kind of image processing method and its device, equipment and storage medium | |
US9274809B2 (en) | Electronic apparatus hibernation recovery setting method and electronic apparatus having hibernation state and hibernation recovery mechanism | |
CN200990077Y (en) | Low power digital audio frequency decoding and playing system for computing equipment | |
CN111653265A (en) | Speech synthesis method, speech synthesis device, storage medium and electronic equipment | |
EP4224873A1 (en) | Method for setting refresh rate, and related device | |
CN109324780A (en) | Promote the method and electronic equipment of sound output effect | |
KR20080032894A (en) | Method and apparatus for generating and playing playback file capable of easily changing player | |
JP2005527000A (en) | Talking E book | |
CN1653516A (en) | Voice command and voice recognition for hand-held devices | |
CN108597546A (en) | The background music for recalling video determines method and relevant device | |
CN110262793A (en) | A kind of logical drive method of talking pen system | |
JP7152384B2 (en) | Electronic device voice control method, electronic device voice control apparatus, computer equipment and storage medium | |
CN209374052U (en) | Intelligent voice system | |
CN110058695A (en) | Draw this interaction content generation method, editing machine, electronic equipment and storage medium | |
CN100570557C (en) | The computer system and the starting-up method of multiple boot program are provided | |
JP2003076349A (en) | Data reproducing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190920 |