亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? kernel.doc

?? 一個C style Assembler的source code
?? DOC
字號:
                The 8052 Real-Time Multi-Tasking Executive(0) INTRODUCTION   An interrupt-driven multi-processing architecture has been designed for theIntel 8051-family of processors, complete with a small library of routines toimplement its basic operations.  Interrupts are generally reserved forprocess-switching and are dynamically enabled or disabled by the routines inthis package.   Initially, the only process running is "main".  When the 8051-processorstarts up from reset, a short initialization sequence will initialize themultiprocessing architecture and then send control to "main", which it isassumed the programmer will define (the same as in C).   New processes are created by using "Spawn", which has the effect of callingthe process, but also initializing a new stack segment for that process.  Thenew process will continue until either it returns, or until it calls "Pause".A "Pause" will stop it, and freeze its stack.  It will remain frozen until thecorresponding "Resume" is called, at which point it resumes right at where itleft off AS IF NOTHING HAPPENED IN BETWEEN.   It is assumed that each interrupt active will call its own "Resume".This provides a way to have processes go into the background and wait for ahardware interrupt while other processes can resume.(1) ARCHITECTURE   Each process "Spawn"-ed will have its own segment on the 8051 stack, which itcan use as its calling stack.  Generally, the global stack will occupy registers128 to 255 in the current version of the library, and the address 128 is set tobe the base address of the "main" process.   It is up to the programmer to define the stack segments used for eachprocess.  Further, there is no error-checking for overlapping stack segments,so the programmer is responsible for assuring that large enough stack segmentsare allocated to each process to prevent conflicts.   The library, though it contains code for interrupt handlers, is notcompletely self-contained.  The programmer must make modifications to theinterrupt handlers pushing and popping any registers that two or more processesmake concurrent use of.  If the programmer is using more than one prioritylevel of interrupts, then at the very least, the registers R0, R1 should besaved.  It is also assumed that the register bank is permanently switched tobank 0.   The key to this multi-processing model is the Priority Stack.  Initiallyempty, each time a Spawn or Resume takes effect it will save the currentstack pointer in order to allow the stack pointer for the new process to beloaded.  When this new process either returns or Pauses, the old stack pointeris popped off the stack and is restored as the current stack pointer.   This allows stack segments to be switched very quickly and in a way that isconsistent with the priority structure of the 8051 interrupts, so thatprocesses Resumed with higher priority interrupts can preempt processescurrently running.   There will generally be registers for each interrupt source used to savestack pointers on Pauses and Resumes.  In addition, there will be more registersto effectively enable software interrupts.  This means that every processcurrently active will have its stack pointer saved either on the PriorityStack, in a stack pointer register, or will be currently running in theforeground with the current stack pointer.   This library provides the following registers for saving stack pointers:     SP_IE0, SP_IE1: For external interrupts 0, and 1.     SP_TF0, SP_TF1, SP_TF2: For timer 0, 1, and 2 overflow interrupts.     SP_RI, SP_TI: For serial receive and transmit interrupts.     SP_EXF2: For the timer 2 external capture interrupt.     SP_SW0, SP_SW1, SP_SW2, SP_SW3: For "software interrupts" 0, 1, 2, and 3.The first 8 are tied to the hardware interrupts, so that for instance, whenexternal interrupt 0 is active, its interrupt-handler will call Resume withregister SP_IE0.(2) INITIALIZATION   Initialization consists of the following actions:    (1) The Priority Stack is cleared.    (2) The first stack segment, for main, is set up and the calling        address for "_Die" is pushed onto it.  Thus when main returns,        it will jump to the routine _Die, which is an infinite loop.    (3) Just under this stack, the calling address Exit will be inserted.        This provides a convenient place to initialize unused stack pointer        registers.(3) SPAWNING A NEW PROCESS   A new process is Spawned by loading its address into the DPTR register,and the base address of its stack segment (which is up to the programmerto provide) in register R0 and then calling Spawn.  Spawn will then performthe following actions:     (1) Push the current stack pointer onto the Priority Stack.     (2) Set the stack pointer to R0     (3) Initialize the stack segment by pushing Exit onto it.     (4) Jump to the address indicated by DPTR to begin the process.By pushing the routine Exit onto the bottom of the stack, this providesa clean way for the process to finish.  For when the process returns, theroutine Exit will be called, which will reload the current stack pointer bypopping the Priority Stack and thus effectively carrying out a return thateliminates the current process.   Spawning a new process that returns without ever calling "Pause" willtherefore be the same as just calling that process and executing a normalreturn.(4) SWITCHING PROCESSSES WITH Pause AND Resume   The routines Pause and Resume are called after loading register R0 withthe address of the stack pointer register that will be used to load or savethe stack pointer.   Pause carries out the following actions:     (1) The current stack pointer is saved in the location indicated by R0.     (2) An address is popped off the Priority Stack into the current stack         pointer.Resume carries out the currespondingly opposite actions:     (1) The current stack pointer is pushed onto the Priority Stack.     (2) The current stack pointer is loaded with the value saved in the         location indicated by register R0.  This location is "cleared" by         setting it to the portion of the global stack just under the         "main" stack segment, where Exit is located.A Resume will thus reactivate the process frozen by the last call to thecorresponding Pause at exactly the place this Pause was called.   Both of these routines are, what is known as, critical regions.  Under noconditions can they be interrupted, because to do so would destroy the integrityof the Priority Stack architecture.  Therefore, interrupts would need to betemporarily turned off in these routines if there is than one interrupt levelin your application.(5) EXAMPLE   Suppose we want to echo the keys pressed on a keyboard or keypad toa screen, while simultaneously listening on the serial communications linefor new commands.  Suppose that the keypad or keyboard is flagged using theexternal 0 interrupt.  We would have a process, Echo, to carry out the echoingaction and a process, Interpreter, for reading and interpreting commandsobtained from the communications line.   Then main could probably be written as follows:main:   ... INITIALIZE INTERRUPTS AND REGISTERS ... ;;; Spawn the "Echo" routine, giving it the stack segment 90 to a0 (hex).   mov R0, #90h   mov DPTR, #Echo   call Spawn;;; Spawn the "Interpreter" routine, giving it the stack segment a0 to b0 (hex).   mov R0, #0a0h   mov DPTR, #Interpreter   call Spawn;;; Kill the main process ... it's no longer needed.retThe Echo process will repeatedly obtain a key and then display it.  Itmight be written as follows:Echo:   call GetKey   call DisplayKeyjmp EchoGetKey will actually carry out the keyboard entry routine.  It will pauseuntil the keyboard has been flagged, and then read the key pressed and return:GetKey:   mov R0, #SP_IE0   call Pause        ;;; Pause on external interrupt 0.   ... READ THE KEY ...retThe Interpreter program will read commands from the serial line and theninterpret and carry them out.  It, too, will be an infinite loop:Interpreter:   call Receive   call ExecuteretReceive will wait for the serial line to flag a reception and then read thecommand received:Receive:   mov R0, #SP_RI   call Pause        ;;; Pause on serial receive interrupt.   ... GET THE COMMAND ...ret   This illustrates how the programmer can write routines to carry out morethan one action at a time asynchronously without having to destroy theintegrity of each process by breaking them up and merging them together intoone large Finite State Machine as is often done in these kinds of applications.Consequently, modularity is greatly enhanced.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲天堂精品视频| 国产精品污网站| 国产日韩欧美一区二区三区综合| 综合激情成人伊人| 蜜臀av性久久久久蜜臀aⅴ流畅 | 久久精品一区四区| 亚洲第一福利一区| 91色婷婷久久久久合中文| 精品国产伦一区二区三区免费| 亚洲自拍偷拍av| 99久久夜色精品国产网站| 久久一区二区三区四区| 日本在线观看不卡视频| 91精品1区2区| 国产精品久久久久7777按摩| 国产麻豆视频一区二区| 日韩精品在线网站| 日韩成人dvd| 欧美福利一区二区| 五月天亚洲精品| 欧美色图天堂网| 夜夜揉揉日日人人青青一国产精品| 成人综合婷婷国产精品久久| 精品福利av导航| 狠狠色丁香久久婷婷综合_中 | 日韩成人精品在线观看| 欧美视频中文一区二区三区在线观看 | 国产亚洲欧洲一区高清在线观看| 麻豆91免费看| 欧美成人精精品一区二区频| 免费xxxx性欧美18vr| 日韩一级成人av| 久久99国产精品尤物| 久久亚洲春色中文字幕久久久| 激情综合色丁香一区二区| 日韩一区二区在线看| 久久精品99久久久| 久久综合九色综合97婷婷女人| 狠狠久久亚洲欧美| 国产婷婷色一区二区三区| 韩国精品久久久| 国产精品毛片无遮挡高清| 99久久精品免费精品国产| 亚洲三级在线播放| 欧美三级电影在线观看| 日韩成人午夜电影| 久久综合久久99| 99久久99久久免费精品蜜臀| 亚洲激情av在线| 欧美日韩国产综合草草| 久久国产精品区| 国产欧美一区视频| 欧洲精品一区二区| 另类调教123区| 中文字幕国产一区| 欧美日韩一区二区三区四区五区| 免费成人小视频| 日本一区二区成人| 欧美色综合网站| 国产伦精一区二区三区| 亚洲视频狠狠干| 欧美一区永久视频免费观看| 国产一区美女在线| 樱花草国产18久久久久| 欧美大肚乱孕交hd孕妇| 99久久精品国产毛片| 视频一区二区不卡| 中文字幕一区二区三区色视频| 欧美午夜寂寞影院| 国产成人在线观看免费网站| 一区二区三区在线视频免费| 欧美xxxxxxxx| 欧美在线观看18| 国产成人亚洲综合色影视 | 国产精品不卡在线| 欧美精选一区二区| 99久精品国产| 久久精品999| 亚洲一区二区三区激情| 国产欧美日韩在线看| 欧美曰成人黄网| www.亚洲精品| 久久97超碰色| 午夜久久电影网| 亚洲人成精品久久久久久| 久久综合久久久久88| 欧美高清视频一二三区 | 成人av电影免费在线播放| 蜜桃av一区二区在线观看| 亚洲综合免费观看高清完整版 | 久久―日本道色综合久久| 欧美色图天堂网| 97久久超碰国产精品电影| 蜜臀av一区二区在线免费观看| 亚洲乱码中文字幕| 国产精品国产三级国产有无不卡 | 国产精品萝li| 久久精品亚洲国产奇米99| 日韩一级完整毛片| 欧美日韩mp4| 色婷婷av一区二区三区软件| 大尺度一区二区| 成人爽a毛片一区二区免费| 久久99久国产精品黄毛片色诱| 日本伊人色综合网| 天堂在线亚洲视频| 日韩福利视频网| 日本伊人色综合网| 日本成人中文字幕| 免费三级欧美电影| 人人爽香蕉精品| 久久66热偷产精品| 国产一区二区电影| 国产精品资源网| 国产精品中文字幕日韩精品| 国内外成人在线视频| 国产一区在线不卡| 成人国产精品免费网站| 国产福利电影一区二区三区| 国产成人精品一区二区三区四区| 高清shemale亚洲人妖| 成人不卡免费av| 色综合久久综合网97色综合| 在线观看一区二区视频| 欧美另类高清zo欧美| 日韩一区二区在线观看视频播放 | 91精品在线一区二区| 91精品麻豆日日躁夜夜躁| 欧美哺乳videos| 国产精品伦一区| 亚洲狠狠爱一区二区三区| 免费精品视频在线| 丁香激情综合五月| 91久久精品一区二区三区| 91麻豆精品国产无毒不卡在线观看| 日韩精品专区在线影院重磅| 国产亚洲婷婷免费| 亚洲资源在线观看| 美女脱光内衣内裤视频久久影院| 国产成人免费视频网站| 色狠狠一区二区| 日韩色在线观看| 国产精品乱人伦| 日韩成人dvd| av不卡免费在线观看| 欧美人妇做爰xxxⅹ性高电影| 2014亚洲片线观看视频免费| 中文字幕一区av| 免费在线视频一区| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩国产一二三区| 成人av在线看| 日韩欧美在线影院| 亚洲人一二三区| 久久国产视频网| 在线亚洲高清视频| 国产亚洲精品久| 日本一区中文字幕| 色婷婷一区二区| 久久综合网色—综合色88| 亚洲一区二区三区四区在线 | 久久综合成人精品亚洲另类欧美 | 欧美一区日本一区韩国一区| 中文字幕精品—区二区四季| 日产国产欧美视频一区精品| 99久久精品国产一区二区三区| 欧美成人女星排行榜| 亚洲在线一区二区三区| 国产乱人伦偷精品视频免下载| 欧美日韩中文字幕一区二区| 国产蜜臀av在线一区二区三区| 亚洲bt欧美bt精品| 97se亚洲国产综合自在线观| 精品国产青草久久久久福利| 午夜精品久久久久久| 色偷偷久久人人79超碰人人澡 | 夜色激情一区二区| 大白屁股一区二区视频| 精品对白一区国产伦| 日本亚洲欧美天堂免费| 91国模大尺度私拍在线视频| 国产精品久久三区| 成人黄色网址在线观看| 久久亚洲精品小早川怜子| 另类小说欧美激情| 日韩欧美亚洲另类制服综合在线| 亚洲成人免费观看| 在线免费观看日韩欧美| 日韩毛片高清在线播放| 成人av网址在线| 国产精品日产欧美久久久久| 高清在线观看日韩| 国产精品久久久久久久岛一牛影视| 国产在线不卡一区| 久久精品视频在线免费观看| 国产麻豆精品久久一二三| 国产午夜精品在线观看| 成人免费视频视频在线观看免费| 精品国产乱码久久久久久图片 | 精品视频一区二区不卡|