80286 को डिजाइन करते समय, इंटेल के सीपीयू डिजाइनरों ने डिस्प्ले को बनाए रखने में मदद के लिए दो निर्देश जोड़ने का फैसला किया।
यहाँ CPU के अंदर सूक्ष्म कोड: प्रवेश करने के लिए
; ENTER Locals, LexLevel
push bp ;Save dynamic link.
mov tempreg, sp ;Save for later.
cmp LexLevel, 0 ;Done if this is lex level zero.
je Lex0
lp:
dec LexLevel
jz Done ;Quit if at last lex level.
sub bp, 2 ;Index into display in prev act rec
push [bp] ; and push each element there.
jmp lp ;Repeat for each entry.
Done:
push tempreg ;Add entry for current lex level.
Lex0:
mov bp, tempreg ;Ptr to current act rec.
sub sp, Locals ;Allocate local storage
वैकल्पिक होगा:
; एन, 0; 14 चक्र 486
push bp ;1 cycle on the 486
sub sp, n ;1 cycle on the 486
; प्रवेश एन, 1; 486
push bp ;1 cycle on the 486
push [bp-2] ;4 cycles on the 486
mov bp, sp ;1 cycle on the 486
add bp, 2 ;1 cycle on the 486
sub sp, n ;1 cycle on the 486
पर 17 चक्र; एन, 3; 23 चक्र 486
push bp ;1 cycle on the 486
push [bp-2] ;4 cycles on the 486
push [bp-4] ;4 cycles on the 486
push [bp-6] ;4 cycles on the 486
mov bp, sp ;1 cycle on the 486
add bp, 6 ;1 cycle on the 486
sub sp, n ;1 cycle on the 486
Ect पर दर्ज करें। लंबा रास्ता आपके फ़ाइल आकार को बढ़ा सकता है, लेकिन रास्ता तेज है।
अंतिम नोट पर, प्रोग्रामर वास्तव में अब प्रदर्शन का उपयोग नहीं करता है क्योंकि यह बहुत धीमा काम था, अब एंटर को बेकार बना रहा है।
स्रोत: https://courses.engr.illinois.edu/ece390/books/artofasm/CH12/CH12-3.html
http://stackoverflow.com/questions/5474355/about-leave-in-x86-assembly?rq=1 –