<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4793421338529051657</id><updated>2011-11-27T17:40:21.841-08:00</updated><category term='hello world program using assembly language'/><category term='Array Manipulation'/><category term='password program'/><category term='String manupulation'/><category term='description'/><category term='assembly program'/><category term='Multiplication Table Program'/><category term='Asterisk patterns'/><title type='text'>Assembly Progamming Ranger</title><subtitle type='html'>Know the basics of assembly programming and free assembly programs</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-8630604278531885409</id><published>2008-11-08T23:03:00.000-08:00</published><updated>2008-11-09T00:34:10.056-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Multiplication Table Program'/><title type='text'>Multiplication Table Program</title><content type='html'>A multiplication table  program that accepts up to 10 as n value&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__0gzdUSzuUk/SRagYqi39CI/AAAAAAAABN4/2Ybncas5vyo/s1600-h/cat.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/__0gzdUSzuUk/SRagYqi39CI/AAAAAAAABN4/2Ybncas5vyo/s320/cat.jpg" alt="" id="BLOGGER_PHOTO_ID_5266573159854240802" border="0" /&gt;&lt;/a&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt;      newLine db      10,13,"$"&lt;br /&gt;      space   db      " $"&lt;br /&gt;      cont_mess    db      10,13,"  Do you want to continue (y/n) :$"&lt;br /&gt;      msg1         db      10,13,"  Enter number: $"&lt;br /&gt;      mulframe1    db      10,13,"  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"&lt;br /&gt;                   db      10,13,"  º         Multiplcation Table          º"&lt;br /&gt;                   db      10,13,"  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼$"&lt;br /&gt;      cnt_num      db      0&lt;br /&gt;      num1         db      0&lt;br /&gt;      num2         db      0&lt;br /&gt;      num_final    db      0&lt;br /&gt;      product      db      0&lt;br /&gt;      temp1        db      0&lt;br /&gt;      temp2        db      0&lt;br /&gt;      temp3        db      0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;&lt;br /&gt;      mov ax,3&lt;br /&gt;      int 10h&lt;br /&gt;      mov product,0&lt;br /&gt;      mov num1,0&lt;br /&gt;      mov num2,0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;              lea dx,mulframe1&lt;br /&gt;              mov ah,9&lt;br /&gt;              int 21h&lt;br /&gt;&lt;br /&gt;              call new_Line&lt;br /&gt;&lt;br /&gt;      lea dx,msg1&lt;br /&gt;      mov ah,9&lt;br /&gt;      int 21h&lt;br /&gt;&lt;br /&gt;      mov ah,1&lt;br /&gt;      int 21h&lt;br /&gt;      sub al,30h&lt;br /&gt;&lt;br /&gt;              mov num1,al&lt;br /&gt;&lt;br /&gt;      mov ah,1&lt;br /&gt;      int 21h&lt;br /&gt;      cmp al,13&lt;br /&gt;      je execute&lt;br /&gt;&lt;br /&gt;              sub al,30h&lt;br /&gt;              mov num2,al&lt;br /&gt;&lt;br /&gt;              mov al,num1&lt;br /&gt;              mov bl,10&lt;br /&gt;&lt;br /&gt;              mul bl&lt;br /&gt;              mov num1,al&lt;br /&gt;&lt;br /&gt;      execute:&lt;br /&gt;&lt;br /&gt;              mov al,num1&lt;br /&gt;              mov bl,num2&lt;br /&gt;              add al,bl&lt;br /&gt;&lt;br /&gt;              cmp al,1&lt;br /&gt;              jl start&lt;br /&gt;              cmp al,10&lt;br /&gt;              jg start&lt;br /&gt;           &lt;br /&gt;              mov num_final,al&lt;br /&gt;&lt;br /&gt;              call clear&lt;br /&gt;           &lt;br /&gt;           &lt;br /&gt;              call new_Line&lt;br /&gt;           &lt;br /&gt;                            mov al,num_final&lt;br /&gt;                            mov ah,0&lt;br /&gt;                            mov si,ax&lt;br /&gt;          &lt;br /&gt;              mov cnt_num,1&lt;br /&gt;              mov di,0&lt;br /&gt;              outerloop:&lt;br /&gt;                            call new_Line&lt;br /&gt;                            mov product,0&lt;br /&gt;&lt;br /&gt;                            mov al,num_final&lt;br /&gt;                            mov ah,0&lt;br /&gt;&lt;br /&gt;                            mov cx,ax&lt;br /&gt;                      &lt;br /&gt;                              mov al,0                          &lt;br /&gt;                              innerloop:&lt;br /&gt;                                            mov al,product&lt;br /&gt;                                            mov bl,cnt_num&lt;br /&gt;                                            add al,bl&lt;br /&gt;                                            mov product,al&lt;br /&gt;                                            mov product,al&lt;br /&gt;&lt;br /&gt;                                            call spacer&lt;br /&gt;                                            call spacer&lt;br /&gt;                                            call spacer2&lt;br /&gt;                                            call mul_display&lt;br /&gt;&lt;br /&gt;                              loop innerloop&lt;br /&gt;&lt;br /&gt;              inc cnt_num&lt;br /&gt;              inc di&lt;br /&gt;              cmp di,si&lt;br /&gt;              jne outerloop&lt;br /&gt;           &lt;br /&gt;      call continue&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;new_Line:&lt;br /&gt;      lea dx,newLine&lt;br /&gt;      mov ah,9&lt;br /&gt;      int 21h&lt;br /&gt;      ret&lt;br /&gt;clear:&lt;br /&gt;      xor ax,ax&lt;br /&gt;      xor bx,bx&lt;br /&gt;      ret&lt;br /&gt;&lt;br /&gt;mul_display:&lt;br /&gt;              call clear&lt;br /&gt;                   &lt;br /&gt;                      mov al,product&lt;br /&gt;&lt;br /&gt;                      mov bl,10&lt;br /&gt;&lt;br /&gt;                      div bl&lt;br /&gt;                      mov temp1,ah&lt;br /&gt;                      mov temp2,al&lt;br /&gt;          &lt;br /&gt;             call clear&lt;br /&gt;                      mov bl,10&lt;br /&gt;                      mov al,temp2&lt;br /&gt;&lt;br /&gt;                      div bl&lt;br /&gt;                      mov temp3,al&lt;br /&gt;                      mov temp2,ah&lt;br /&gt;&lt;br /&gt;             call clear&lt;br /&gt;&lt;br /&gt;                      cmp temp3,0&lt;br /&gt;                      je tens&lt;br /&gt;&lt;br /&gt;                      mov al,temp3&lt;br /&gt;&lt;br /&gt;              hundred:&lt;br /&gt;                                   &lt;br /&gt;                      mov dl,al&lt;br /&gt;                      or dl,30h&lt;br /&gt;                      mov ah,2&lt;br /&gt;                      int 21h&lt;br /&gt;&lt;br /&gt;              tens:&lt;br /&gt;&lt;br /&gt;                      mov al,temp2&lt;br /&gt;                      mov bl,temp3&lt;br /&gt;&lt;br /&gt;                      add al,bl&lt;br /&gt;                      cmp al,0&lt;br /&gt;                      je ones&lt;br /&gt;                      mov al,temp2&lt;br /&gt;&lt;br /&gt;                      mov dl,al&lt;br /&gt;                      or dl,30h&lt;br /&gt;                      mov ah,2&lt;br /&gt;                      int 21h         &lt;br /&gt;                  &lt;br /&gt;              ones:&lt;br /&gt;                      mov al,temp1&lt;br /&gt;                      mov dl,al&lt;br /&gt;                      or dl,30h&lt;br /&gt;                      mov ah,2&lt;br /&gt;                      int 21h&lt;br /&gt;ret&lt;br /&gt;spacer:&lt;br /&gt;      lea dx,space&lt;br /&gt;      mov ah,9&lt;br /&gt;      int 21h&lt;br /&gt;&lt;br /&gt;      ret&lt;br /&gt;spacer2:&lt;br /&gt;      mov al,product&lt;br /&gt;      cmp al,9&lt;br /&gt;      jg return&lt;br /&gt;&lt;br /&gt;      lea dx,space&lt;br /&gt;      mov ah,9&lt;br /&gt;      int 21h     &lt;br /&gt;return:&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;continue:&lt;br /&gt;      call new_Line&lt;br /&gt;      xor dx,dx&lt;br /&gt;&lt;br /&gt;      lea dx,cont_mess&lt;br /&gt;      mov ah,9&lt;br /&gt;      int 21h&lt;br /&gt;&lt;br /&gt;      mov ah,1&lt;br /&gt;      int 21h&lt;br /&gt;&lt;br /&gt;      cmp al,'y'&lt;br /&gt;      je start_bridge&lt;br /&gt;      cmp al,'n'&lt;br /&gt;      je con_quit&lt;br /&gt;&lt;br /&gt;      jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;     call start&lt;br /&gt;con_quit:&lt;br /&gt;      int 20h&lt;br /&gt;fullclear:&lt;br /&gt;      xor ax,ax&lt;br /&gt;      xor bx,bx&lt;br /&gt;      xor cx,cx&lt;br /&gt;      xor dx,dx&lt;br /&gt;      ret&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-8630604278531885409?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/8630604278531885409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=8630604278531885409' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8630604278531885409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8630604278531885409'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/multiplication-table-program.html' title='Multiplication Table Program'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__0gzdUSzuUk/SRagYqi39CI/AAAAAAAABN4/2Ybncas5vyo/s72-c/cat.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-1340806041625568777</id><published>2008-11-08T20:19:00.000-08:00</published><updated>2008-11-08T21:41:53.534-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='password program'/><title type='text'>Password Program</title><content type='html'>This is a password program i made  the password must be pre-declared in the program which  is "aces_word" variable  and also the user is only allowed to 3 mistakes in typing the right password&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__0gzdUSzuUk/SRZ19rEC8gI/AAAAAAAABNw/Yln0XpEw_Ys/s1600-h/circuit.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 256px;" src="http://1.bp.blogspot.com/__0gzdUSzuUk/SRZ19rEC8gI/AAAAAAAABNw/Yln0XpEw_Ys/s320/circuit.jpg" alt="" id="BLOGGER_PHOTO_ID_5266526516648538626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;source code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt; mess2        db      10,13," Enter Password: $"&lt;br /&gt; passframe1   db      10,13," ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»$"&lt;br /&gt; invalid      db      10,13," º    Invalid password (hit) any key    º$"&lt;br /&gt; valid        db      10,13," º            Valid password            º$"&lt;br /&gt; timeout      db      10,13," º  Time is up! you are allowed 3 tries º$"&lt;br /&gt; passframe2   db      10,13," ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼$"&lt;br /&gt; bSpace       db      8,"$"&lt;br /&gt; choice       db      0&lt;br /&gt; pass_word    db      100 dup 0           ;comment: "user input"&lt;br /&gt; aces_word    db      'p','o','w','e','r' ;comment: "pre-define password"&lt;br /&gt; aces_cnt     dw      5                   ;comment: "pre-define number of characters in the password"&lt;br /&gt; word_cnt     dw      0              &lt;br /&gt; try          dw      1                   ;comment: "Counts the number of invalid"&lt;br /&gt; newLine db      10,13,"$"&lt;br /&gt; space   db      " $"&lt;br /&gt; cont_mess     db      10,13," Do you want to continue (y/n) :$"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;     mov try,1&lt;br /&gt;password:&lt;br /&gt;     mov ax,3&lt;br /&gt;     int 10h&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     mov word_cnt,0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     lea dx,mess2&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     mov bx,0&lt;br /&gt;     input:&lt;br /&gt;             mov ah,8&lt;br /&gt;             int 21h&lt;br /&gt; &lt;br /&gt;             cmp al,13&lt;br /&gt;             je safety&lt;br /&gt;             cmp al,8&lt;br /&gt;             je backspace&lt;br /&gt;                         &lt;br /&gt;                                     mov pass_word[bx],al&lt;br /&gt;                                     inc bx&lt;br /&gt; &lt;br /&gt;                                     mov dl,'*'&lt;br /&gt;                                     mov ah,2&lt;br /&gt;                                     int 21h&lt;br /&gt; &lt;br /&gt;                                     jmp safetyzone&lt;br /&gt;&lt;br /&gt;                             backspace:&lt;br /&gt;                                     cmp bx,0&lt;br /&gt;                                     je input&lt;br /&gt;&lt;br /&gt;                                     lea dx,bSpace&lt;br /&gt;                                     mov ah,9&lt;br /&gt;                                     int 21h&lt;br /&gt;&lt;br /&gt;                                     mov dl,' '&lt;br /&gt;                                     mov ah,2&lt;br /&gt;                                     int 21h&lt;br /&gt;&lt;br /&gt;                                     lea dx,bSpace&lt;br /&gt;                                     mov ah,9&lt;br /&gt;                                     int 21h&lt;br /&gt;                                          &lt;br /&gt;                                     dec bx&lt;br /&gt;&lt;br /&gt;             safetyzone:&lt;br /&gt;             jmp input&lt;br /&gt;&lt;br /&gt;            safety:&lt;br /&gt;            mov word_cnt,bx&lt;br /&gt;&lt;br /&gt;            mov ax,aces_cnt&lt;br /&gt;&lt;br /&gt;            cmp ax,bx&lt;br /&gt;            jne mismatch&lt;br /&gt;&lt;br /&gt;                    mov bx,word_cnt&lt;br /&gt;                    mov cx,bx&lt;br /&gt;                    mov bx,0&lt;br /&gt;                 &lt;br /&gt;                             checking:&lt;br /&gt;&lt;br /&gt;                                     mov al,pass_word[bx]&lt;br /&gt;                                     mov ah,aces_word[bx]&lt;br /&gt;                                     cmp al,ah&lt;br /&gt;                                     jne mismatch&lt;br /&gt;                                     inc bx&lt;br /&gt;&lt;br /&gt;                             loop checking&lt;br /&gt;                             call ok_message&lt;br /&gt;                             call exit&lt;br /&gt;            mismatch:&lt;br /&gt;                mov ax,try&lt;br /&gt;&lt;br /&gt;                cmp ax,3&lt;br /&gt;                je timesup&lt;br /&gt;                        &lt;br /&gt;                             inc try&lt;br /&gt;&lt;br /&gt;                             call error&lt;br /&gt;                             mov ah,1&lt;br /&gt;                             int 21h&lt;br /&gt;&lt;br /&gt;                             call password&lt;br /&gt;&lt;br /&gt;                             timesup:&lt;br /&gt;                             call timesup_message&lt;br /&gt;&lt;br /&gt;      exit:         &lt;br /&gt;      call continue&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;error:&lt;br /&gt;     lea dx,passframe1&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt; &lt;br /&gt;     lea dx,invalid&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     lea dx,passframe2&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;     ret&lt;br /&gt;&lt;br /&gt;ok_message:&lt;br /&gt;     lea dx,passframe1&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt; &lt;br /&gt;     lea dx,valid&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     lea dx,passframe2&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;     ret&lt;br /&gt;&lt;br /&gt;timesup_message:&lt;br /&gt;     lea dx,passframe1&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt; &lt;br /&gt;     lea dx,timeout&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     lea dx,passframe2&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;     ret&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;new_Line:&lt;br /&gt;     lea dx,newLine&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;     ret&lt;br /&gt;clear:&lt;br /&gt;     xor ax,ax&lt;br /&gt;     xor bx,bx&lt;br /&gt;     ret&lt;br /&gt;&lt;br /&gt;spacer:&lt;br /&gt;     lea dx,space&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     ret&lt;br /&gt;continue:&lt;br /&gt;     call new_Line&lt;br /&gt;     xor dx,dx&lt;br /&gt;&lt;br /&gt;     lea dx,cont_mess&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     mov ah,1&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     cmp al,'y'&lt;br /&gt;     je start_bridge&lt;br /&gt;     cmp al,'n'&lt;br /&gt;     je con_quit&lt;br /&gt;&lt;br /&gt;     jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;    call start&lt;br /&gt;con_quit:&lt;br /&gt;     int 20h&lt;br /&gt;fullclear:&lt;br /&gt;     xor ax,ax&lt;br /&gt;     xor bx,bx&lt;br /&gt;     xor cx,cx&lt;br /&gt;     xor dx,dx&lt;br /&gt;     ret&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-1340806041625568777?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/1340806041625568777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=1340806041625568777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1340806041625568777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1340806041625568777'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/passwor-d-program.html' title='Password Program'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__0gzdUSzuUk/SRZ19rEC8gI/AAAAAAAABNw/Yln0XpEw_Ys/s72-c/circuit.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-5084129586322282046</id><published>2008-11-05T00:00:00.000-08:00</published><updated>2008-11-05T00:25:30.082-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='String manupulation'/><title type='text'>String Manipulation</title><content type='html'>String manipulation in assembly is quite confusing sometimes, when i was making an assembly program for it&lt;br /&gt;&lt;br /&gt;this is how you declare a string&lt;br /&gt;&lt;br /&gt;    string          db      12,10  dup  0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this example a variable string is declared in byte, we want the string to have 10 elements, but in assembly you have to add 2 more elements those we 12 elements in total. The index [0] of the string hold the maximum size of the array which is 10 and index [1] holds that actual size of the string that the user inputed.&lt;br /&gt;&lt;br /&gt;in this sample program, we want a user to input a string and displays the string, displays the alphabet characters, numbers, and special characters.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__0gzdUSzuUk/SRFYM0KQdjI/AAAAAAAAA5I/07UxkE_fNz8/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 366px; height: 215px;" src="http://3.bp.blogspot.com/__0gzdUSzuUk/SRFYM0KQdjI/AAAAAAAAA5I/07UxkE_fNz8/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5265086416556160562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;jmp start&lt;br /&gt;        string          db      100,101 dup 0&lt;br /&gt;        mess1           db      10,13," Enter a string: $"&lt;br /&gt;        mess2           db      10,13, " Inputted String: $"&lt;br /&gt;        alphamess       db      10,13, " Alphabet letters: $"&lt;br /&gt;        nummess         db      10,13, " Numerical Values: $"&lt;br /&gt;        charmess        db      10,13, " Special characters: $"&lt;br /&gt;        contmess        db      10,13, " Do you want to continue (y/n): $"&lt;br /&gt;        space           db      " $"&lt;br /&gt;        newline         db      10,13,"$"&lt;br /&gt;start:&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor dx,dx&lt;br /&gt;        xor cx,cx&lt;br /&gt;        xor si,si&lt;br /&gt;        xor di,di&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        call new_Line&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,string&lt;br /&gt;        mov ah,10&lt;br /&gt;        int 21h&lt;br /&gt;         ;------------------------displaying string----------------------&lt;br /&gt;                                call new_Line&lt;br /&gt;                                lea dx,mess2&lt;br /&gt;                                mov ah,9&lt;br /&gt;                                int 21h&lt;br /&gt;                       &lt;br /&gt;                                lea si,string+1&lt;br /&gt;                                mov cl,[si]&lt;br /&gt;                                lea di,string+2&lt;br /&gt;                                cmp cl,0&lt;br /&gt;                                je start&lt;br /&gt;                        display:&lt;br /&gt;                                mov dl,[di]&lt;br /&gt;                                mov ah,2&lt;br /&gt;                                int 21h&lt;br /&gt;                                inc di&lt;br /&gt;                                loop display&lt;br /&gt;        &lt;br /&gt;         ;------------------------Sorting alpha-----------------------&lt;br /&gt;         lea dx,alphamess&lt;br /&gt;         mov ah,9&lt;br /&gt;         int 21h&lt;br /&gt;&lt;br /&gt;        lea si,string+1&lt;br /&gt;        mov cl,[si]&lt;br /&gt;        lea di,string+2&lt;br /&gt;&lt;br /&gt;        alphasorting:&lt;br /&gt;                                mov al,[di]&lt;br /&gt;                                cmp al,65&lt;br /&gt;                                jl safety&lt;br /&gt;&lt;br /&gt;                                cmp al,122&lt;br /&gt;                                jg safety&lt;br /&gt;                                cmp al,91&lt;br /&gt;                                je safety&lt;br /&gt;                                cmp al,92&lt;br /&gt;                                je safety&lt;br /&gt;                                cmp al,93&lt;br /&gt;                                je safety&lt;br /&gt;                                cmp al,95&lt;br /&gt;                                je safety&lt;br /&gt;                                cmp al,96&lt;br /&gt;                                je safety&lt;br /&gt;&lt;br /&gt;                                        mov dl,al&lt;br /&gt;                                        mov ah,2&lt;br /&gt;                                        int 21h&lt;br /&gt;                                        call spacer&lt;br /&gt;                              safety:&lt;br /&gt;                              inc di&lt;br /&gt;                              loop alphasorting&lt;br /&gt;&lt;br /&gt;         ;------------------------Sorting Numerical-----------------------&lt;br /&gt;         lea dx,nummess&lt;br /&gt;         mov ah,9&lt;br /&gt;         int 21h&lt;br /&gt;&lt;br /&gt;        lea si,string+1&lt;br /&gt;        mov cl,[si]&lt;br /&gt;        lea di,string+2&lt;br /&gt;&lt;br /&gt;        numsorting:&lt;br /&gt;                              mov al,[di]&lt;br /&gt;&lt;br /&gt;                              cmp al,48&lt;br /&gt;                              jl numsafety&lt;br /&gt;                              cmp al,57&lt;br /&gt;                              jg numsafety&lt;br /&gt;&lt;br /&gt;                                        mov dl,al&lt;br /&gt;                                        mov ah,2&lt;br /&gt;                                        int 21h&lt;br /&gt;                                        call spacer&lt;br /&gt;                                       &lt;br /&gt;                              numsafety:&lt;br /&gt;                              inc di&lt;br /&gt;                              loop numsorting&lt;br /&gt;&lt;br /&gt;     ;-----------------------special character sorting-------------------&lt;br /&gt;         lea dx,charmess&lt;br /&gt;         mov ah,9&lt;br /&gt;         int 21h&lt;br /&gt;&lt;br /&gt;        lea si,string+1&lt;br /&gt;        mov cl,[si]&lt;br /&gt;        lea di,string+2&lt;br /&gt;&lt;br /&gt;        charsorting:&lt;br /&gt;                              mov al,[di]&lt;br /&gt;&lt;br /&gt;                              cmp al,32&lt;br /&gt;                              je charsafety&lt;br /&gt;                              cmp al,58&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,59&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,60&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,61&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,62&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,63&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,64&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,91&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,92&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,93&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,94&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,95&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,96&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,58&lt;br /&gt;                              je specialchar&lt;br /&gt;                              cmp al,48&lt;br /&gt;                              jl specialchar&lt;br /&gt;                              cmp al,122&lt;br /&gt;                              jle charsafety&lt;br /&gt;&lt;br /&gt;                                                        specialchar:&lt;br /&gt;                                                        mov dl,al&lt;br /&gt;                                                        mov ah,2&lt;br /&gt;                                                        int 21h&lt;br /&gt;                                                        call spacer&lt;br /&gt;                                       &lt;br /&gt;                              charsafety:&lt;br /&gt;                              inc di&lt;br /&gt;                              loop charsorting&lt;br /&gt;&lt;br /&gt;continue:&lt;br /&gt;        call new_Line&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,contmess&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je quit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;quit:&lt;br /&gt;         int 20h&lt;br /&gt;new_Line:&lt;br /&gt;        lea dx,newline&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;spacer:&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        ret&lt;br /&gt;start_bridge:&lt;br /&gt;    call start&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-5084129586322282046?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/5084129586322282046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=5084129586322282046' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/5084129586322282046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/5084129586322282046'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/string-manipulation.html' title='String Manipulation'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__0gzdUSzuUk/SRFYM0KQdjI/AAAAAAAAA5I/07UxkE_fNz8/s72-c/screen1.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-1142548692928214733</id><published>2008-11-04T23:12:00.000-08:00</published><updated>2008-11-04T23:57:01.321-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Array Manipulation'/><title type='text'>Array Manipulation</title><content type='html'>This  project is an array manipulation that  accepts  an array of 15 single digit numbers   and arranges  it  ascending and  descending  order.  Also  displays  in  even- odd and odd-even  format&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__0gzdUSzuUk/SRFLZKcRNnI/AAAAAAAAA5A/GuW3UBi7v_8/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://1.bp.blogspot.com/__0gzdUSzuUk/SRFLZKcRNnI/AAAAAAAAA5A/GuW3UBi7v_8/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5265072335044556402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;jmp start&lt;br /&gt;       mess1           db      10,13," Enter an array of 15 (0-9) : $"&lt;br /&gt;       mess2           db      10,13," Array content: $"&lt;br /&gt;       mess3           db      10,13," Enter Choice: $"&lt;br /&gt;       mess4           db      10,13," Original Array: $"&lt;br /&gt;       evenodd         db      10,13," Even-odd sequence: $"&lt;br /&gt;       oddeven         db      10,13," Odd-even sequence: $"&lt;br /&gt;       ascend          db      10,13," Ascending order: $"&lt;br /&gt;       descend         db      10,13," Descending order: $"&lt;br /&gt;&lt;br /&gt;       menu0           db      10,13," €€€€€€€€€€€€€€ menu €€€€€€€€€€€€€$"&lt;br /&gt;       twoline         db      10,13," €€                                                                                                   €€$"              &lt;br /&gt;       menu1           db      10,13," €€    (1) Ascending order                                         €€$"&lt;br /&gt;       menu2           db      10,13," €€    (2) Descending order                                           €€$"&lt;br /&gt;       menu3           db      10,13," €€    (3) Even-odd format                                            €€$"&lt;br /&gt;       menu4           db      10,13," €€    (4) Odd-even fomrat                                            €€$"&lt;br /&gt;       menu5           db      10,13," €€    (5) Enter new array                                              €€$"&lt;br /&gt;       menu6           db      10,13," €€    (6) Quit                                                                              €€$"&lt;br /&gt;       menu7           db      10,13," €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€$"&lt;br /&gt;       cont_mess       db      10,13," Do you want to continue (y/n): $"&lt;br /&gt;&lt;br /&gt;       newline         db      10,13,"$"&lt;br /&gt;       space           db      " $"&lt;br /&gt;&lt;br /&gt;       arrayNum        db      15 dup 0&lt;br /&gt;       origNum         db      15 dup 0&lt;br /&gt;       even_num        db      15 dup 0&lt;br /&gt;       odd_num         db      15 dup 0&lt;br /&gt;       choice          db      0&lt;br /&gt;       temp            db      0&lt;br /&gt;       count_even      db      0&lt;br /&gt;       count_odd       db      0&lt;br /&gt;start:&lt;br /&gt;       xor ax,ax&lt;br /&gt;       xor bx,bx&lt;br /&gt;       xor cx,cx&lt;br /&gt;       xor dx,dx&lt;br /&gt;&lt;br /&gt;       mov arrayNum,0&lt;br /&gt;       mov origNum,0&lt;br /&gt;       mov even_num,0&lt;br /&gt;       mov odd_num,0&lt;br /&gt;&lt;br /&gt;       mov choice,0&lt;br /&gt;       mov temp,0&lt;br /&gt;       mov count_even,0&lt;br /&gt;       mov count_odd,0&lt;br /&gt;&lt;br /&gt;       mov ax,3&lt;br /&gt;       int 10h&lt;br /&gt;&lt;br /&gt;       lea dx,mess1&lt;br /&gt;       mov ah,9&lt;br /&gt;       int 21h&lt;br /&gt;&lt;br /&gt;       mov bx,0&lt;br /&gt;       mov cx,15&lt;br /&gt;       mov ah,0&lt;br /&gt;&lt;br /&gt;               fillArray:&lt;br /&gt;&lt;br /&gt;                       lea dx,space&lt;br /&gt;                       mov ah,9&lt;br /&gt;                       int 21h&lt;br /&gt;                                                 &lt;br /&gt;                       mov ah,1&lt;br /&gt;                       int 21h&lt;br /&gt;                       sub al,30h&lt;br /&gt;&lt;br /&gt;                       cmp al,0&lt;br /&gt;                       jl start&lt;br /&gt;                       cmp al,9&lt;br /&gt;                       jg start&lt;br /&gt;             &lt;br /&gt;                       mov arrayNum[bx],al&lt;br /&gt;                       mov origNum[bx],al&lt;br /&gt;&lt;br /&gt;                       inc bx&lt;br /&gt;             &lt;br /&gt;               loop fillArray&lt;br /&gt;          &lt;br /&gt;               call new_Line&lt;br /&gt;       ;----------------------------sorting---------------------------&lt;br /&gt;       sorter:&lt;br /&gt;       call clear&lt;br /&gt;       mov di,15&lt;br /&gt;       mov ah,0&lt;br /&gt;       mov bx,0&lt;br /&gt;&lt;br /&gt;               outerloop:&lt;br /&gt;                             mov si,0&lt;br /&gt;                             mov cx,15&lt;br /&gt;                             innerloop:&lt;br /&gt;                                        mov al,arrayNum[bx]&lt;br /&gt;                                        mov ah,arrayNum[si]&lt;br /&gt;                                      &lt;br /&gt;                                         cmp al,ah&lt;br /&gt;                                         jg skip&lt;br /&gt;&lt;br /&gt;                                             mov al,arrayNum[bx]&lt;br /&gt;                                             mov ah,arrayNum[si]&lt;br /&gt;                                     &lt;br /&gt;                                             mov temp,al&lt;br /&gt;                                             mov al,ah&lt;br /&gt;                                             mov ah,temp&lt;br /&gt;                                             mov arrayNum[bx],al&lt;br /&gt;                                             mov arrayNum[si],ah&lt;br /&gt;&lt;br /&gt;                              skip:&lt;br /&gt;                              inc si&lt;br /&gt;                              loop innerloop&lt;br /&gt;&lt;br /&gt;               safety:&lt;br /&gt;               inc bx&lt;br /&gt;               dec di&lt;br /&gt;               cmp di,0&lt;br /&gt;               jg outerloop&lt;br /&gt;               cmp di,0&lt;br /&gt;               jl safetyzone&lt;br /&gt;&lt;br /&gt;               safetyzone:&lt;br /&gt;           ;-------------------sorting even------------------------&lt;br /&gt;               call clear&lt;br /&gt;&lt;br /&gt;                     mov cx,15&lt;br /&gt;                     mov si,0&lt;br /&gt;                     mov di,0&lt;br /&gt;                     sorteven:&lt;br /&gt;                             xor ax,ax&lt;br /&gt;&lt;br /&gt;                             mov al,arrayNum[si]&lt;br /&gt;                             xor bx,bx&lt;br /&gt;                             mov bl,2&lt;br /&gt;                             div bl&lt;br /&gt;&lt;br /&gt;                             call even_numbers&lt;br /&gt;&lt;br /&gt;                             inc si&lt;br /&gt;&lt;br /&gt;                     loop sorteven&lt;br /&gt;&lt;br /&gt;  ;-------------------------- Sorting odd --------------------------&lt;br /&gt;            call clear&lt;br /&gt;&lt;br /&gt;                     mov cx,15&lt;br /&gt;                     mov si,0&lt;br /&gt;                     mov di,0&lt;br /&gt;                     oddsorter:&lt;br /&gt;                             xor ax,ax&lt;br /&gt;&lt;br /&gt;                             mov al,arrayNum[si]&lt;br /&gt;                             xor bx,bx&lt;br /&gt;                             mov bl,2&lt;br /&gt;                             div bl&lt;br /&gt;&lt;br /&gt;                             call odd_numbers&lt;br /&gt;&lt;br /&gt;                             inc si&lt;br /&gt;&lt;br /&gt;                     loop oddsorter&lt;br /&gt;       ;------------------------- menu ------------------------------&lt;br /&gt;       menu:&lt;br /&gt;               mov ax,3&lt;br /&gt;               int 10h&lt;br /&gt;        ;--------------------- shows the original array --------------&lt;br /&gt;               lea dx,mess4&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;     &lt;br /&gt;               mov cx,15&lt;br /&gt;               mov bx,0&lt;br /&gt;&lt;br /&gt;               showArray:&lt;br /&gt;&lt;br /&gt;                       mov dl,origNum[bx]&lt;br /&gt;                       or dl,30h&lt;br /&gt;                       mov ah,2&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       lea dx,space&lt;br /&gt;                       mov ah,9&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       inc bx&lt;br /&gt;&lt;br /&gt;               loop showArray&lt;br /&gt;&lt;br /&gt;    ;------------------------------ end of show -----------------------&lt;br /&gt;               call new_Line&lt;br /&gt;&lt;br /&gt;               lea dx,menu0&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;               lea dx,twoline&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;               lea dx,menu1&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;             &lt;br /&gt;               lea dx,menu2&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;               lea dx,menu3&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;               lea dx,menu4&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;               lea dx,menu5&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;               lea dx,menu6&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;               lea dx,twoline&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;            &lt;br /&gt;               lea dx,menu7&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;               call new_Line&lt;br /&gt;&lt;br /&gt;               lea dx,mess3&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;&lt;br /&gt;               mov ah,1&lt;br /&gt;               int 21h&lt;br /&gt;               sub al,30h&lt;br /&gt;&lt;br /&gt;               cmp al,1&lt;br /&gt;               jl menu_bridge&lt;br /&gt;&lt;br /&gt;               cmp al,6&lt;br /&gt;               jg menu_bridge&lt;br /&gt;&lt;br /&gt;               mov choice,al&lt;br /&gt;&lt;br /&gt;               cmp al,1&lt;br /&gt;               je ascend1&lt;br /&gt;               cmp al,2&lt;br /&gt;               je descend1&lt;br /&gt;               cmp al,3&lt;br /&gt;               je even_odd1&lt;br /&gt;               cmp al,4&lt;br /&gt;               je odd_even1&lt;br /&gt;               cmp al,5&lt;br /&gt;               je new&lt;br /&gt;               cmp al,6&lt;br /&gt;               je quit&lt;br /&gt;menu_bridge:&lt;br /&gt;    call menu &lt;br /&gt;new:&lt;br /&gt;   call start&lt;br /&gt;ascend1:&lt;br /&gt;   call ascending&lt;br /&gt;descend1:&lt;br /&gt;   call descending&lt;br /&gt;even_odd1:&lt;br /&gt;   call even_odd&lt;br /&gt;odd_even1:&lt;br /&gt;   call odd_even&lt;br /&gt;quit:&lt;br /&gt;       int 20h&lt;br /&gt;new_Line:&lt;br /&gt;       lea dx,newline&lt;br /&gt;       mov ah,9&lt;br /&gt;       int 21h&lt;br /&gt;ret&lt;br /&gt;clear:&lt;br /&gt;       xor ax,ax&lt;br /&gt;       xor bx,bx&lt;br /&gt;       xor cx,cx&lt;br /&gt;       xor dx,dx&lt;br /&gt;ret&lt;br /&gt;display_array:&lt;br /&gt;               lea dx,ascend&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;     &lt;br /&gt;               mov cx,15&lt;br /&gt;               mov bx,0&lt;br /&gt;&lt;br /&gt;               dispArray:&lt;br /&gt;&lt;br /&gt;                       mov dl,arrayNum[bx]&lt;br /&gt;                       or dl,30h&lt;br /&gt;                       mov ah,2&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       lea dx,space&lt;br /&gt;                       mov ah,9&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       inc bx&lt;br /&gt;&lt;br /&gt;               loop dispArray&lt;br /&gt;ret&lt;br /&gt;even_numbers:&lt;br /&gt;&lt;br /&gt;       cmp ah,0&lt;br /&gt;       jne odd_counter&lt;br /&gt;&lt;br /&gt;                       mov al,arrayNum[si]&lt;br /&gt;                       mov even_num[di],al&lt;br /&gt;                     &lt;br /&gt;                       inc di&lt;br /&gt;&lt;br /&gt;                       inc count_even&lt;br /&gt;&lt;br /&gt;                       jmp return&lt;br /&gt;&lt;br /&gt;                       odd_counter:&lt;br /&gt;                               inc count_odd&lt;br /&gt;return:&lt;br /&gt;       ret&lt;br /&gt;showEven:&lt;br /&gt;    &lt;br /&gt;   call clear&lt;br /&gt;&lt;br /&gt;   xor ax,ax   &lt;br /&gt; &lt;br /&gt;              mov si,0&lt;br /&gt;              mov cl,count_even&lt;br /&gt;              cmp cl,0&lt;br /&gt;              je evenNumbers&lt;br /&gt;              dispEven:&lt;br /&gt;&lt;br /&gt;                       mov dl,even_num[si]&lt;br /&gt;                       or dl,30h&lt;br /&gt;                       mov ah,2&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       lea dx,space&lt;br /&gt;                       mov ah,9&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       inc si&lt;br /&gt;                       dec cl&lt;br /&gt;                       cmp cl,0&lt;br /&gt;                       jg dispEven&lt;br /&gt;                       cmp cl,0&lt;br /&gt;                       jl evenNumbers&lt;br /&gt;evenNumbers:&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;odd_numbers:&lt;br /&gt;&lt;br /&gt;       cmp ah,0&lt;br /&gt;       je oddreturn&lt;br /&gt;&lt;br /&gt;                       mov al,arrayNum[si]&lt;br /&gt;                       mov odd_num[di],al                      &lt;br /&gt;                       inc di&lt;br /&gt;oddreturn:            &lt;br /&gt;       ret&lt;br /&gt;showOdd:&lt;br /&gt;         &lt;br /&gt;              call clear&lt;br /&gt;     &lt;br /&gt;              xor ax,ax   &lt;br /&gt; &lt;br /&gt;              mov si,0&lt;br /&gt;              mov cl,count_odd&lt;br /&gt;              cmp cl,0&lt;br /&gt;              je oddNumbers&lt;br /&gt;&lt;br /&gt;              dispOdd:&lt;br /&gt;&lt;br /&gt;                       mov dl,odd_num[si]&lt;br /&gt;                       or dl,30h&lt;br /&gt;                       mov ah,2&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       lea dx,space&lt;br /&gt;                       mov ah,9&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       inc si&lt;br /&gt;                       dec cl&lt;br /&gt;                       cmp cl,0&lt;br /&gt;                       jg dispOdd&lt;br /&gt;                       cmp cl,0&lt;br /&gt;                       jl oddNumbers&lt;br /&gt;oddNumbers:&lt;br /&gt;       ret&lt;br /&gt;&lt;br /&gt;ascending:&lt;br /&gt;       call display_array&lt;br /&gt;       call continue&lt;br /&gt;descending:&lt;br /&gt;               lea dx,descend&lt;br /&gt;               mov ah,9&lt;br /&gt;               int 21h&lt;br /&gt;     &lt;br /&gt;               mov cx,15&lt;br /&gt;               mov bx,14&lt;br /&gt;&lt;br /&gt;               dispdescend:&lt;br /&gt;&lt;br /&gt;                       mov dl,arrayNum[bx]&lt;br /&gt;                       or dl,30h&lt;br /&gt;                       mov ah,2&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       lea dx,space&lt;br /&gt;                       mov ah,9&lt;br /&gt;                       int 21h&lt;br /&gt;&lt;br /&gt;                       dec bx&lt;br /&gt;&lt;br /&gt;               loop dispdescend&lt;br /&gt;     &lt;br /&gt;       call continue&lt;br /&gt;even_odd:&lt;br /&gt;       lea dx,evenodd&lt;br /&gt;       mov ah,9&lt;br /&gt;       int 21h&lt;br /&gt;&lt;br /&gt;       call showEven&lt;br /&gt;       call showOdd&lt;br /&gt;       call continue&lt;br /&gt;odd_even:&lt;br /&gt;       lea dx,oddeven&lt;br /&gt;       mov ah,9&lt;br /&gt;       int 21h&lt;br /&gt;     &lt;br /&gt;       call showOdd&lt;br /&gt;       call showEven      &lt;br /&gt;       call continue&lt;br /&gt;continue:&lt;br /&gt;       call new_Line&lt;br /&gt;       xor dx,dx&lt;br /&gt;&lt;br /&gt;       lea dx,cont_mess&lt;br /&gt;       mov ah,9&lt;br /&gt;       int 21h&lt;br /&gt;&lt;br /&gt;       mov ah,1&lt;br /&gt;       int 21h&lt;br /&gt;&lt;br /&gt;       cmp al,'y'&lt;br /&gt;       je start_bridge&lt;br /&gt;       cmp al,'n'&lt;br /&gt;       je quit2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;      call menu&lt;br /&gt;quit2:&lt;br /&gt;&lt;br /&gt;       int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-1142548692928214733?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/1142548692928214733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=1142548692928214733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1142548692928214733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1142548692928214733'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/array-manipulation_04.html' title='Array Manipulation'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__0gzdUSzuUk/SRFLZKcRNnI/AAAAAAAAA5A/GuW3UBi7v_8/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-8995405984521853777</id><published>2008-11-04T06:07:00.000-08:00</published><updated>2008-11-04T06:41:36.710-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Array Manipulation'/><title type='text'>Array manipulation</title><content type='html'>In declaring an array in assembly is quite different from other programming language&lt;br /&gt;&lt;br /&gt;eg.&lt;br /&gt;&lt;br /&gt; array            db      15 dup 0&lt;br /&gt;&lt;br /&gt;in this example, a variable array is  defined as a byte  and has 15 elements in the array. And each element has a default value of 0.&lt;br /&gt;&lt;br /&gt;here is a sample program that asks a 15 single-digit numerical input and displays its total, average, also its even and odd numbers.&lt;br /&gt;&lt;br /&gt;source code:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__0gzdUSzuUk/SRBe9s2uUBI/AAAAAAAAA44/uvALAwyDAgw/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 189px;" src="http://3.bp.blogspot.com/__0gzdUSzuUk/SRBe9s2uUBI/AAAAAAAAA44/uvALAwyDAgw/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264812378501828626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;     arrayNum        db      15 dup 0&lt;br /&gt;     mess1           db      10,13," Input an array of (0 - 9) 15 numbers: $"&lt;br /&gt;     mess2           db      10,13," Array content: $"&lt;br /&gt;     sum_mess        db      10,13," Summation : $"&lt;br /&gt;     ave_mess        db      10,13," Average   : $"&lt;br /&gt;     tot_mess        db      10,13," Total numbers: "&lt;br /&gt;     space           db      " $"&lt;br /&gt;     newline         db      10,13,"$"&lt;br /&gt;     point           db      ".$"&lt;br /&gt;     even_mess       db      10,13," Even numbers: $"&lt;br /&gt;     odd_mess        db      10,13," Odd numbers: $"&lt;br /&gt;     cont_mess       db      10,13," Do you want to continue (y/n): $"&lt;br /&gt;     even_num            db      15 dup 0&lt;br /&gt;     odd_num             db      15 dup 0&lt;br /&gt; &lt;br /&gt;     sum             db      0&lt;br /&gt;     temp1           db      0&lt;br /&gt;     temp2           db      0&lt;br /&gt;     temp3           db      0&lt;br /&gt;     count_even      db      0&lt;br /&gt;     count_odd       db      0&lt;br /&gt;     divisor         db      0&lt;br /&gt;     zero            db      "0.00$"&lt;br /&gt;start:&lt;br /&gt;     xor ax,ax&lt;br /&gt;     xor bx,bx&lt;br /&gt;     xor cx,cx&lt;br /&gt;&lt;br /&gt;     mov even_num,0&lt;br /&gt;     mov odd_num,0&lt;br /&gt;     mov count_even,0&lt;br /&gt;     mov count_odd,0&lt;br /&gt;&lt;br /&gt;     mov ax,3&lt;br /&gt;     int 10h&lt;br /&gt;&lt;br /&gt;     lea dx,mess1&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     mov bx,0&lt;br /&gt;     mov cx,15&lt;br /&gt;     mov ah,0&lt;br /&gt;&lt;br /&gt;             fillArray:&lt;br /&gt;&lt;br /&gt;                     lea dx,space&lt;br /&gt;                     mov ah,9&lt;br /&gt;                     int 21h&lt;br /&gt;                                             &lt;br /&gt;                     mov ah,1&lt;br /&gt;                     int 21h&lt;br /&gt;                     sub al,30h&lt;br /&gt;&lt;br /&gt;                     cmp al,0&lt;br /&gt;                     jl start&lt;br /&gt;                     cmp al,9&lt;br /&gt;                     jg start&lt;br /&gt;         &lt;br /&gt;                     mov arrayNum[bx],al&lt;br /&gt;      &lt;br /&gt;                     inc bx&lt;br /&gt;         &lt;br /&gt;             loop fillArray&lt;br /&gt;      &lt;br /&gt;             call new_Line&lt;br /&gt;&lt;br /&gt;             lea dx,mess2&lt;br /&gt;             mov ah,9&lt;br /&gt;             int 21h&lt;br /&gt; &lt;br /&gt;             mov cx,15&lt;br /&gt;             mov bx,0&lt;br /&gt;&lt;br /&gt;             dispArray:&lt;br /&gt;&lt;br /&gt;                     mov dl,arrayNum[bx]&lt;br /&gt;                     or dl,30h&lt;br /&gt;                     mov ah,2&lt;br /&gt;                     int 21h&lt;br /&gt;&lt;br /&gt;                     lea dx,space&lt;br /&gt;                     mov ah,9&lt;br /&gt;                     int 21h&lt;br /&gt;&lt;br /&gt;                     inc bx&lt;br /&gt;&lt;br /&gt;             loop dispArray&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    ;-------------------getting sum of the array---------------&lt;br /&gt;&lt;br /&gt;     mov bx,0&lt;br /&gt;     mov cx,15&lt;br /&gt;&lt;br /&gt;     mov ah,0&lt;br /&gt;&lt;br /&gt;             sumArray:&lt;br /&gt;&lt;br /&gt;                     mov al,arrayNum[bx]&lt;br /&gt;                     add ah,al&lt;br /&gt;                     inc bx&lt;br /&gt;&lt;br /&gt;             loop sumArray&lt;br /&gt;             mov sum,ah&lt;br /&gt;                 &lt;br /&gt;&lt;br /&gt;    ;------------------------Displaying sum--------------------&lt;br /&gt;&lt;br /&gt;             lea dx,sum_mess&lt;br /&gt;             mov ah,9&lt;br /&gt;             int 21h&lt;br /&gt;&lt;br /&gt;             call sum_display&lt;br /&gt;&lt;br /&gt;   ;-----------------------calculating average-----------------&lt;br /&gt;&lt;br /&gt;             lea dx,ave_mess&lt;br /&gt;             mov ah,9&lt;br /&gt;             int 21h&lt;br /&gt;&lt;br /&gt;             call clear&lt;br /&gt;             mov divisor,15&lt;br /&gt;             call averaging&lt;br /&gt;&lt;br /&gt;   ;-------------------------sorting array----------------------&lt;br /&gt;             call clear&lt;br /&gt;&lt;br /&gt;                   mov cx,15&lt;br /&gt;                   mov si,0&lt;br /&gt;                   mov di,0&lt;br /&gt;                   sorter:&lt;br /&gt;                           xor ax,ax&lt;br /&gt;&lt;br /&gt;                           mov al,arrayNum[si]&lt;br /&gt;                           xor bx,bx&lt;br /&gt;                           mov bl,2&lt;br /&gt;                           div bl&lt;br /&gt;&lt;br /&gt;                           call even_numbers&lt;br /&gt;&lt;br /&gt;                           inc si&lt;br /&gt;&lt;br /&gt;                   loop sorter&lt;br /&gt;&lt;br /&gt;  ;--------------------- displaying even --------------------&lt;br /&gt; call new_Line&lt;br /&gt; call clear&lt;br /&gt;&lt;br /&gt;            lea dx,even_mess&lt;br /&gt;            mov ah,9&lt;br /&gt;            int 21h&lt;br /&gt;&lt;br /&gt; call clear&lt;br /&gt;&lt;br /&gt; xor ax,ax &lt;br /&gt;&lt;br /&gt;            mov si,0&lt;br /&gt;            mov cl,count_even&lt;br /&gt;            dispEven:&lt;br /&gt;&lt;br /&gt;                     mov dl,even_num[si]&lt;br /&gt;                     or dl,30h&lt;br /&gt;                     mov ah,2&lt;br /&gt;                     int 21h&lt;br /&gt;&lt;br /&gt;                     lea dx,space&lt;br /&gt;                     mov ah,9&lt;br /&gt;                     int 21h&lt;br /&gt;&lt;br /&gt;                     inc si&lt;br /&gt;                     dec cl&lt;br /&gt;                     cmp cl,0&lt;br /&gt;                     jg dispEven&lt;br /&gt;                     cmp cl,0&lt;br /&gt;                     jl evenNumbers&lt;br /&gt;      evenNumbers:&lt;br /&gt;    ;--------------------- displaying numbers of even ----------------&lt;br /&gt;            lea dx,tot_mess&lt;br /&gt;            mov ah,9&lt;br /&gt;            int 21h&lt;br /&gt;&lt;br /&gt;            mov al,count_even&lt;br /&gt;            mov sum,al&lt;br /&gt;            call sum_display&lt;br /&gt;&lt;br /&gt;     summationEven:&lt;br /&gt;   ;---------------------- calculating sum for even ------------------&lt;br /&gt;             call clear&lt;br /&gt;             mov al,count_even            &lt;br /&gt;             mov ah,0&lt;br /&gt;&lt;br /&gt;             cmp al,0&lt;br /&gt;             je safety&lt;br /&gt;&lt;br /&gt;             mov bx,0&lt;br /&gt;             mov cx,ax&lt;br /&gt;             mov ah,0&lt;br /&gt;&lt;br /&gt;             sumEven:&lt;br /&gt;&lt;br /&gt;                     mov al,even_num[bx]&lt;br /&gt;                     add ah,al&lt;br /&gt;                     inc bx&lt;br /&gt;&lt;br /&gt;             loop sumEven&lt;br /&gt;       safety:&lt;br /&gt;             mov sum,0&lt;br /&gt;             mov sum,ah&lt;br /&gt;       ;------------------------Displaying sum--------------------&lt;br /&gt;             call clear&lt;br /&gt;&lt;br /&gt;             lea dx,sum_mess&lt;br /&gt;             mov ah,9&lt;br /&gt;             int 21h&lt;br /&gt;&lt;br /&gt;             call sum_display&lt;br /&gt;&lt;br /&gt;   ;---------------------- average for even ---------------------------&lt;br /&gt;            call clear&lt;br /&gt;            lea dx,ave_mess&lt;br /&gt;            mov ah,9&lt;br /&gt;            int 21h&lt;br /&gt;&lt;br /&gt;            mov al,count_even&lt;br /&gt;            cmp al,0&lt;br /&gt;            je zero_num&lt;br /&gt;&lt;br /&gt;                    call clear&lt;br /&gt;                    mov al,count_even&lt;br /&gt;                    mov divisor,al&lt;br /&gt;                    call averaging&lt;br /&gt;                    jmp safetyzone&lt;br /&gt;           zero_num:&lt;br /&gt;                   lea dx,zero&lt;br /&gt;                   mov ah,9&lt;br /&gt;                   int 21h&lt;br /&gt;          safetyzone:&lt;br /&gt;   ;---------------------------sorting odd--------------------------&lt;br /&gt;          call clear&lt;br /&gt;&lt;br /&gt;                   mov cx,15&lt;br /&gt;                   mov si,0&lt;br /&gt;                   mov di,0&lt;br /&gt;                   oddsorter:&lt;br /&gt;                           xor ax,ax&lt;br /&gt;&lt;br /&gt;                           mov al,arrayNum[si]&lt;br /&gt;                           xor bx,bx&lt;br /&gt;                           mov bl,2&lt;br /&gt;                           div bl&lt;br /&gt;&lt;br /&gt;                           call odd_numbers&lt;br /&gt;&lt;br /&gt;                           inc si&lt;br /&gt;&lt;br /&gt;                   loop oddsorter&lt;br /&gt;        ;-------------------- displaying odd ---------------------&lt;br /&gt;             call new_Line&lt;br /&gt;             call clear&lt;br /&gt; &lt;br /&gt;                    lea dx,odd_mess&lt;br /&gt;                    mov ah,9&lt;br /&gt;                    int 21h&lt;br /&gt; &lt;br /&gt;             call clear&lt;br /&gt; &lt;br /&gt;             xor ax,ax &lt;br /&gt;&lt;br /&gt;            mov si,0&lt;br /&gt;            mov cl,count_odd&lt;br /&gt;            dispOdd:&lt;br /&gt;&lt;br /&gt;                     mov dl,odd_num[si]&lt;br /&gt;                     or dl,30h&lt;br /&gt;                     mov ah,2&lt;br /&gt;                     int 21h&lt;br /&gt;&lt;br /&gt;                     lea dx,space&lt;br /&gt;                     mov ah,9&lt;br /&gt;                     int 21h&lt;br /&gt;&lt;br /&gt;                     inc si&lt;br /&gt;                     dec cl&lt;br /&gt;                     cmp cl,0&lt;br /&gt;                     jg dispOdd&lt;br /&gt;                     cmp cl,0&lt;br /&gt;                     jl oddNumbers&lt;br /&gt;      oddNumbers:&lt;br /&gt;       ;---------------------display number of odd-------------------&lt;br /&gt;            lea dx,tot_mess&lt;br /&gt;            mov ah,9&lt;br /&gt;            int 21h&lt;br /&gt;&lt;br /&gt;            mov al,count_odd&lt;br /&gt;            mov sum,al&lt;br /&gt;            call sum_display&lt;br /&gt;       ;---------------------- calculating sum for odd ------------------&lt;br /&gt;             call clear&lt;br /&gt;             mov al,count_odd          &lt;br /&gt;             mov ah,0&lt;br /&gt;&lt;br /&gt;             cmp al,0&lt;br /&gt;             je oddsafety&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;             mov bx,0&lt;br /&gt;             mov cx,ax&lt;br /&gt;             mov ah,0&lt;br /&gt;&lt;br /&gt;             sumOdd:&lt;br /&gt;&lt;br /&gt;                     mov al,odd_num[bx]&lt;br /&gt;                     add ah,al&lt;br /&gt;                     inc bx&lt;br /&gt;&lt;br /&gt;             loop sumOdd&lt;br /&gt;       oddsafety:&lt;br /&gt;             mov sum,0&lt;br /&gt;             mov sum,ah&lt;br /&gt;       ;------------------------Displaying sum--------------------&lt;br /&gt;             call clear&lt;br /&gt;&lt;br /&gt;             lea dx,sum_mess&lt;br /&gt;             mov ah,9&lt;br /&gt;             int 21h&lt;br /&gt;&lt;br /&gt;             call sum_display&lt;br /&gt;     ;------------------------ averaging for odd --------------------&lt;br /&gt;            call clear&lt;br /&gt;            lea dx,ave_mess&lt;br /&gt;            mov ah,9&lt;br /&gt;            int 21h&lt;br /&gt;&lt;br /&gt;            mov al,count_odd&lt;br /&gt;            cmp al,0&lt;br /&gt;            je zero_sum&lt;br /&gt;&lt;br /&gt;                    call clear&lt;br /&gt;                    mov al,count_odd&lt;br /&gt;                    mov divisor,al&lt;br /&gt;                    call averaging&lt;br /&gt;                    jmp oddsafetyzone&lt;br /&gt;           zero_sum:&lt;br /&gt;                   lea dx,zero&lt;br /&gt;                   mov ah,9&lt;br /&gt;                   int 21h&lt;br /&gt;          oddsafetyzone:&lt;br /&gt;&lt;br /&gt;continue:&lt;br /&gt;     call new_Line&lt;br /&gt;     xor dx,dx&lt;br /&gt;&lt;br /&gt;     lea dx,cont_mess&lt;br /&gt;     mov ah,9&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     mov ah,1&lt;br /&gt;     int 21h&lt;br /&gt;&lt;br /&gt;     cmp al,'y'&lt;br /&gt;     je start_bridge&lt;br /&gt;     cmp al,'n'&lt;br /&gt;     je quit&lt;br /&gt;&lt;br /&gt;     jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;    call start&lt;br /&gt;quit:&lt;br /&gt;     int 20h&lt;br /&gt;&lt;br /&gt;even_numbers:&lt;br /&gt;&lt;br /&gt;     cmp ah,0&lt;br /&gt;     jne odd_counter&lt;br /&gt;&lt;br /&gt;                     mov al,arrayNum[si]&lt;br /&gt;                     mov even_num[di],al&lt;br /&gt;                 &lt;br /&gt;                     inc di&lt;br /&gt;&lt;br /&gt;                     inc count_even&lt;br /&gt;&lt;br /&gt;                     jmp return&lt;br /&gt;&lt;br /&gt;                     odd_counter:&lt;br /&gt;                             inc count_odd&lt;br /&gt;&lt;br /&gt;return:            &lt;br /&gt;     ret&lt;br /&gt;&lt;br /&gt;odd_numbers:&lt;br /&gt;&lt;br /&gt;     cmp ah,0&lt;br /&gt;     je return&lt;br /&gt;&lt;br /&gt;                     mov al,arrayNum[si]&lt;br /&gt;                     mov odd_num[di],al                    &lt;br /&gt;                     inc di&lt;br /&gt;&lt;br /&gt;                     jmp oddreturn&lt;br /&gt;&lt;br /&gt;oddreturn:          &lt;br /&gt;     ret&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;new_Line:&lt;br /&gt;&lt;br /&gt;   lea dx,newline&lt;br /&gt;   mov ah,9&lt;br /&gt;   int 21h&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;clear:&lt;br /&gt;&lt;br /&gt;             xor ax,ax&lt;br /&gt;             xor bx,bx&lt;br /&gt;             xor cx,cx&lt;br /&gt;             xor dx,dx&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;sum_display:&lt;br /&gt;             call clear&lt;br /&gt;                     mov al,sum&lt;br /&gt;&lt;br /&gt;                     mov bl,10&lt;br /&gt;&lt;br /&gt;                     div bl&lt;br /&gt;                     mov temp1,ah&lt;br /&gt;                     mov temp2,al&lt;br /&gt;        &lt;br /&gt;            call clear&lt;br /&gt;                     mov bl,10&lt;br /&gt;                     mov al,temp2&lt;br /&gt;&lt;br /&gt;                     div bl&lt;br /&gt;                     mov temp3,al&lt;br /&gt;                     mov temp2,ah&lt;br /&gt;&lt;br /&gt;            call clear&lt;br /&gt;&lt;br /&gt;                     cmp temp3,0&lt;br /&gt;                     je tens&lt;br /&gt;&lt;br /&gt;                     mov al,temp3&lt;br /&gt;&lt;br /&gt;             hundred:&lt;br /&gt;                     mov dl,al&lt;br /&gt;                     or dl,30h&lt;br /&gt;                     mov ah,2&lt;br /&gt;                     int 21h&lt;br /&gt;&lt;br /&gt;             tens:&lt;br /&gt;                     mov al,temp2&lt;br /&gt;                     mov bl,temp3&lt;br /&gt;&lt;br /&gt;                     add al,bl&lt;br /&gt;                     cmp al,0&lt;br /&gt;                     je ones&lt;br /&gt;&lt;br /&gt;                     mov al,temp2&lt;br /&gt;&lt;br /&gt;                     mov dl,al&lt;br /&gt;                     or dl,30h&lt;br /&gt;                     mov ah,2&lt;br /&gt;                     int 21h        &lt;br /&gt;                &lt;br /&gt;             ones:&lt;br /&gt;                     mov al,temp1&lt;br /&gt;                     mov dl,al&lt;br /&gt;                     or dl,30h&lt;br /&gt;                     mov ah,2&lt;br /&gt;                     int 21h&lt;br /&gt;ret&lt;br /&gt;&lt;br /&gt;averaging:&lt;br /&gt;             call clear&lt;br /&gt;             mov al,sum&lt;br /&gt;             mov bl,divisor&lt;br /&gt;         &lt;br /&gt;                     div bl&lt;br /&gt;                     mov bh,ah&lt;br /&gt;&lt;br /&gt;             xor dx,dx&lt;br /&gt;             xor cx,cx&lt;br /&gt;&lt;br /&gt;             mov dl,al&lt;br /&gt;             or dl,30h&lt;br /&gt;             mov ah,2&lt;br /&gt;             int 21h&lt;br /&gt;      &lt;br /&gt;             lea dx,point&lt;br /&gt;             mov ah,9&lt;br /&gt;             int 21h&lt;br /&gt;&lt;br /&gt;           mov cx,2&lt;br /&gt;           decimal:&lt;br /&gt;                     mov bl,10&lt;br /&gt;                     mov al,bh&lt;br /&gt;         &lt;br /&gt;                     mul bl&lt;br /&gt;                     mov bl,divisor&lt;br /&gt;                     div bl&lt;br /&gt;&lt;br /&gt;                     mov bh,ah&lt;br /&gt;             xor dx,dx&lt;br /&gt;             mov dl,al&lt;br /&gt;             or dl,30h&lt;br /&gt;             mov ah,2&lt;br /&gt;             int 21h&lt;br /&gt;&lt;br /&gt;         loop decimal&lt;br /&gt;ret&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-8995405984521853777?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/8995405984521853777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=8995405984521853777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8995405984521853777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8995405984521853777'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/array-manipulation.html' title='Array manipulation'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__0gzdUSzuUk/SRBe9s2uUBI/AAAAAAAAA44/uvALAwyDAgw/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-4569961480760158455</id><published>2008-11-04T04:33:00.000-08:00</published><updated>2008-11-04T05:50:59.574-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__0gzdUSzuUk/SRBKZkUlKmI/AAAAAAAAA4w/At7zfxZox98/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://2.bp.blogspot.com/__0gzdUSzuUk/SRBKZkUlKmI/AAAAAAAAA4w/At7zfxZox98/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264789767503293026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt;        mess1   db        10,13, "Enter value for (n) [0-9 only]: $"&lt;br /&gt;        mess2   db        10,13, "There is nothing to display $"&lt;br /&gt;        mess3   db        10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        lincar  db        10,13, "$"&lt;br /&gt;        space   db        " $"&lt;br /&gt;        asterisk   db        "*$"&lt;br /&gt;        value   db        0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov value,al&lt;br /&gt;        mov bh,al&lt;br /&gt;        mov ch,bh&lt;br /&gt;        mov cl,al&lt;br /&gt;again:&lt;br /&gt;&lt;br /&gt;        cmp bh,0&lt;br /&gt;        je continue&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov al,value&lt;br /&gt;        sub cl,al          &lt;br /&gt;back:&lt;br /&gt;&lt;br /&gt;        cmp cl,0&lt;br /&gt;        je display&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        jmp back&lt;br /&gt;&lt;br /&gt;display:&lt;br /&gt;&lt;br /&gt;        lea dx,asterisk&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        cmp cl,ch&lt;br /&gt;        jne display&lt;br /&gt;&lt;br /&gt;        dec bh        &lt;br /&gt;        dec ch&lt;br /&gt;        dec cl&lt;br /&gt;&lt;br /&gt;        jmp again&lt;br /&gt;zero:&lt;br /&gt;        lea dx,mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je exit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;        call start       &lt;br /&gt;&lt;br /&gt;exit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-4569961480760158455?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/4569961480760158455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=4569961480760158455' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/4569961480760158455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/4569961480760158455'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles_8153.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__0gzdUSzuUk/SRBKZkUlKmI/AAAAAAAAA4w/At7zfxZox98/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-778647334903479803</id><published>2008-11-04T03:39:00.000-08:00</published><updated>2008-11-04T04:33:21.876-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>This  one is shape like a quadrilateral triangle&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__0gzdUSzuUk/SRA24g36SGI/AAAAAAAAA4o/Lu0RZjJhTa8/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://3.bp.blogspot.com/__0gzdUSzuUk/SRA24g36SGI/AAAAAAAAA4o/Lu0RZjJhTa8/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264768308921124962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt;        mess1      db      10,13, "Enter value for (n) [0-9 only]: $"&lt;br /&gt;        mess2      db      10,13, "There is nothing to display $"&lt;br /&gt;        mess3      db      10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        lincar     db      10,13, "$"&lt;br /&gt;        space      db      " $"&lt;br /&gt;        asterisk   db      "*$"&lt;br /&gt;        value      db      0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov bh,al&lt;br /&gt;        mov value,al&lt;br /&gt;&lt;br /&gt;        mov ch,1&lt;br /&gt;&lt;br /&gt;again:&lt;br /&gt;&lt;br /&gt;        cmp bh,0&lt;br /&gt;        je continue&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov bl,value&lt;br /&gt;        mov al,ch&lt;br /&gt;&lt;br /&gt;        sub al,bl&lt;br /&gt;&lt;br /&gt;        mov cl,al&lt;br /&gt;                &lt;br /&gt;back:&lt;br /&gt;&lt;br /&gt;        cmp cl,0&lt;br /&gt;        je display&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        jmp back&lt;br /&gt;display:&lt;br /&gt;&lt;br /&gt;        lea dx,asterisk&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        cmp cl,ch&lt;br /&gt;        jne display&lt;br /&gt;&lt;br /&gt;        dec bh        &lt;br /&gt;        inc ch&lt;br /&gt;&lt;br /&gt;        jmp again&lt;br /&gt;zero:&lt;br /&gt;        lea dx,mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je exit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;        call start       &lt;br /&gt;&lt;br /&gt;exit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-778647334903479803?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/778647334903479803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=778647334903479803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/778647334903479803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/778647334903479803'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles_5736.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__0gzdUSzuUk/SRA24g36SGI/AAAAAAAAA4o/Lu0RZjJhTa8/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-1460025840913724867</id><published>2008-11-04T03:12:00.000-08:00</published><updated>2008-11-04T03:37:44.300-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>Another version with two triangles connected at one  point&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__0gzdUSzuUk/SRAyGB7kIDI/AAAAAAAAA4g/FaR1MHG_PSA/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 188px;" src="http://3.bp.blogspot.com/__0gzdUSzuUk/SRAyGB7kIDI/AAAAAAAAA4g/FaR1MHG_PSA/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264763043574980658" border="0" /&gt;&lt;/a&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;        mess1   db      10,13, "Enter a value [0-9 only]: $"&lt;br /&gt;        mess2   db      10,13, "There is nothing to display $"&lt;br /&gt;        mess3   db        10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        space   db      " $"&lt;br /&gt;        lincar  db      10,13, "$"&lt;br /&gt;        value   db      0&lt;br /&gt;        counter db      0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero_bridge&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov value,al&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,0&lt;br /&gt;        mov al,value&lt;br /&gt;&lt;br /&gt;        mov cx,ax&lt;br /&gt;        mov counter,1&lt;br /&gt;        mov bh,counter&lt;br /&gt;        mov bl,1&lt;br /&gt;        jmp display&lt;br /&gt;zero_bridge:&lt;br /&gt;        call zero&lt;br /&gt;display:&lt;br /&gt;        cmp bh,bl&lt;br /&gt;        jg next&lt;br /&gt;&lt;br /&gt;        mov dl,'*'&lt;br /&gt;        mov ah,2&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc bh&lt;br /&gt;        jmp display&lt;br /&gt;&lt;br /&gt;next:&lt;br /&gt;        inc bl&lt;br /&gt;        mov bh,counter&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        loop display&lt;br /&gt;&lt;br /&gt;;-----------------------------------second half-------------------------------------&lt;br /&gt;       &lt;br /&gt;        mov al,value&lt;br /&gt;        sub al,1&lt;br /&gt;        cmp al,0&lt;br /&gt;        je continue&lt;br /&gt;        mov ah,0&lt;br /&gt;       &lt;br /&gt;        mov cx,ax&lt;br /&gt;        mov counter,1&lt;br /&gt;        mov bh,counter&lt;br /&gt;        mov bl,al&lt;br /&gt;        mov al,0&lt;br /&gt;&lt;br /&gt;display2:&lt;br /&gt;        cmp bh,bl&lt;br /&gt;        jg next2&lt;br /&gt;&lt;br /&gt;        mov dl,'*'&lt;br /&gt;        mov ah,2&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc bh&lt;br /&gt;        jmp display2&lt;br /&gt;&lt;br /&gt;next2:&lt;br /&gt;        dec bl&lt;br /&gt;        inc al&lt;br /&gt;        mov bh,counter&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        loop display2&lt;br /&gt;        jmp continue&lt;br /&gt;zero:&lt;br /&gt;        lea dx, mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je quit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;        call start       &lt;br /&gt;&lt;br /&gt;quit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-1460025840913724867?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/1460025840913724867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=1460025840913724867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1460025840913724867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1460025840913724867'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles_3203.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__0gzdUSzuUk/SRAyGB7kIDI/AAAAAAAAA4g/FaR1MHG_PSA/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-2502855130644096171</id><published>2008-11-04T01:05:00.000-08:00</published><updated>2008-11-04T01:17:07.117-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>This program displays to right triangles that are connected at one point. It uses a looping principle like the other asterisk triangle .&lt;br /&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__0gzdUSzuUk/SRARg25YSuI/AAAAAAAAA4Y/M0k5t226FPs/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 188px;" src="http://2.bp.blogspot.com/__0gzdUSzuUk/SRARg25YSuI/AAAAAAAAA4Y/M0k5t226FPs/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264727220585777890" border="0" /&gt;&lt;/a&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt;        mess1   db        10,13, "Enter value for (n) [0-9 only]: $"&lt;br /&gt;        mess2   db        10,13, "There is nothing to display $"&lt;br /&gt;        mess3   db        10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        lincar  db        10,13, "$"&lt;br /&gt;        space   db        " $"&lt;br /&gt;        asterisk  db        "*$"&lt;br /&gt;        value   db        0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero_bridge&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;        jmp main&lt;br /&gt;&lt;br /&gt;zero_bridge:&lt;br /&gt;        call zero&lt;br /&gt;main:&lt;br /&gt;        mov value,al&lt;br /&gt;        mov bh,al&lt;br /&gt;        mov ch,bh&lt;br /&gt;        mov cl,al&lt;br /&gt;again:&lt;br /&gt;&lt;br /&gt;        cmp bh,0&lt;br /&gt;        je secondhalf&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov al,value&lt;br /&gt;        sub cl,al          &lt;br /&gt;back:&lt;br /&gt;&lt;br /&gt;        cmp cl,0&lt;br /&gt;        je display&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        jmp back&lt;br /&gt;&lt;br /&gt;display:&lt;br /&gt;&lt;br /&gt;        lea dx,asterisk&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        cmp cl,ch&lt;br /&gt;        jne display&lt;br /&gt;&lt;br /&gt;        dec bh        &lt;br /&gt;        dec ch&lt;br /&gt;        dec cl&lt;br /&gt;&lt;br /&gt;        jmp again&lt;br /&gt;&lt;br /&gt;;----------------------------socondhalf----------------------------&lt;br /&gt;&lt;br /&gt;secondhalf:&lt;br /&gt;&lt;br /&gt;        mov al,value&lt;br /&gt;        sub al,1&lt;br /&gt;    mov bh,al&lt;br /&gt;        mov ch,2&lt;br /&gt;&lt;br /&gt;again2:&lt;br /&gt;&lt;br /&gt;        cmp bh,0&lt;br /&gt;        je continue&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov bl,value&lt;br /&gt;        mov al,ch&lt;br /&gt;&lt;br /&gt;        sub al,bl&lt;br /&gt;&lt;br /&gt;        mov cl,al&lt;br /&gt;                &lt;br /&gt;back2:&lt;br /&gt;&lt;br /&gt;        cmp cl,0&lt;br /&gt;        je display2&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        jmp back2&lt;br /&gt;display2:&lt;br /&gt;&lt;br /&gt;        lea dx,asterisk&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        cmp cl,ch&lt;br /&gt;        jne display2&lt;br /&gt;&lt;br /&gt;        dec bh        &lt;br /&gt;        inc ch&lt;br /&gt;&lt;br /&gt;        jmp again2&lt;br /&gt;zero:&lt;br /&gt;        lea dx,mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je exit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;        call start       &lt;br /&gt;exit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-2502855130644096171?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/2502855130644096171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=2502855130644096171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/2502855130644096171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/2502855130644096171'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles_04.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__0gzdUSzuUk/SRARg25YSuI/AAAAAAAAA4Y/M0k5t226FPs/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-886497324035317514</id><published>2008-11-03T23:40:00.000-08:00</published><updated>2008-11-03T23:56:44.523-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>The Fourth of the set&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__0gzdUSzuUk/SQ_92AikyiI/AAAAAAAAA4Q/9iMobklnB28/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 189px;" src="http://2.bp.blogspot.com/__0gzdUSzuUk/SQ_92AikyiI/AAAAAAAAA4Q/9iMobklnB28/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264705593719179810" border="0" /&gt;&lt;/a&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt;        mess1      db      10,13, "Enter value for (n) [0-9 only]: $"&lt;br /&gt;        mess2   db        10,13, "There is nothing to display $"&lt;br /&gt;        mess3   db        10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        lincar     db      10,13, "$"&lt;br /&gt;        space      db      " $"&lt;br /&gt;        asterisk   db      "*$"&lt;br /&gt;        value      db      0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov bh,al&lt;br /&gt;        mov value,al&lt;br /&gt;&lt;br /&gt;        mov ch,1&lt;br /&gt;&lt;br /&gt;again:&lt;br /&gt;&lt;br /&gt;        cmp bh,0&lt;br /&gt;        je continue&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov bl,value&lt;br /&gt;        mov al,ch&lt;br /&gt;&lt;br /&gt;        sub al,bl&lt;br /&gt;&lt;br /&gt;        mov cl,al&lt;br /&gt;                &lt;br /&gt;back:&lt;br /&gt;&lt;br /&gt;        cmp cl,0&lt;br /&gt;        je display&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        jmp back&lt;br /&gt;display:&lt;br /&gt;&lt;br /&gt;        lea dx,asterisk&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        cmp cl,ch&lt;br /&gt;        jne display&lt;br /&gt;&lt;br /&gt;        dec bh        &lt;br /&gt;        inc ch&lt;br /&gt;&lt;br /&gt;        jmp again&lt;br /&gt;zero:&lt;br /&gt;        lea dx,mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je exit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;        call start       &lt;br /&gt;exit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-886497324035317514?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/886497324035317514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=886497324035317514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/886497324035317514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/886497324035317514'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles_6890.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__0gzdUSzuUk/SQ_92AikyiI/AAAAAAAAA4Q/9iMobklnB28/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-8962896290811613496</id><published>2008-11-03T23:33:00.000-08:00</published><updated>2008-11-03T23:39:07.543-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>The third asterisk  pattern&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__0gzdUSzuUk/SQ_7zZe06hI/AAAAAAAAA4I/uHpq_gHOT9Y/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://3.bp.blogspot.com/__0gzdUSzuUk/SQ_7zZe06hI/AAAAAAAAA4I/uHpq_gHOT9Y/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264703349851482642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt;        mess1   db        10,13, "Enter value for (n) [0-9 only]: $"&lt;br /&gt;        mess2   db        10,13, "There is nothing to display $"&lt;br /&gt;        mess3   db        10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        lincar  db        10,13, "$"&lt;br /&gt;        space   db        " $"&lt;br /&gt;        asterisk   db        "*$"&lt;br /&gt;        value   db        0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov value,al&lt;br /&gt;        mov bh,al&lt;br /&gt;        mov ch,bh&lt;br /&gt;        mov cl,al&lt;br /&gt;again:&lt;br /&gt;        cmp bh,0&lt;br /&gt;        je continue&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov al,value&lt;br /&gt;        sub cl,al          &lt;br /&gt;back:&lt;br /&gt;&lt;br /&gt;        cmp cl,0&lt;br /&gt;        je display&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        jmp back&lt;br /&gt;&lt;br /&gt;display:&lt;br /&gt;&lt;br /&gt;        lea dx,asterisk&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc cl&lt;br /&gt;&lt;br /&gt;        cmp cl,ch&lt;br /&gt;        jne display&lt;br /&gt;&lt;br /&gt;        dec bh        &lt;br /&gt;        dec ch&lt;br /&gt;        dec cl&lt;br /&gt;&lt;br /&gt;        jmp again&lt;br /&gt;zero:&lt;br /&gt;        lea dx,mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je exit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;&lt;br /&gt;start_bridge:&lt;br /&gt;        call start       &lt;br /&gt;exit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-8962896290811613496?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/8962896290811613496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=8962896290811613496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8962896290811613496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8962896290811613496'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles_6764.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__0gzdUSzuUk/SQ_7zZe06hI/AAAAAAAAA4I/uHpq_gHOT9Y/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-8335401390381826780</id><published>2008-11-03T22:26:00.000-08:00</published><updated>2008-11-03T23:33:26.491-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>This is the inverted of the last one so here goes nothing&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__0gzdUSzuUk/SQ_tV2tfa2I/AAAAAAAAA4A/XvnNAG--MU8/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 188px;" src="http://4.bp.blogspot.com/__0gzdUSzuUk/SQ_tV2tfa2I/AAAAAAAAA4A/XvnNAG--MU8/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264687449138752354" border="0" /&gt;&lt;/a&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;        mess1   db      10,13, "Enter a value (n) [0-9 only]: $"&lt;br /&gt;        mess2   db      10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        mess3   db      10,13, "There is nothing to display $"&lt;br /&gt;        space   db      " $"&lt;br /&gt;        lincar  db      10,13, "$"&lt;br /&gt;        value   db      0&lt;br /&gt;        counter db      0&lt;br /&gt;        s_counter   db  0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov value,al&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,0&lt;br /&gt;        mov al,value&lt;br /&gt;&lt;br /&gt;        mov cx,ax&lt;br /&gt;        mov counter,1&lt;br /&gt;        mov bh,counter&lt;br /&gt;        mov bl,value&lt;br /&gt;        mov al,0&lt;br /&gt;display:&lt;br /&gt;        cmp bh,bl&lt;br /&gt;        jg next&lt;br /&gt;&lt;br /&gt;        mov dl,'*'&lt;br /&gt;        mov ah,2&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc bh&lt;br /&gt;        jmp display&lt;br /&gt;&lt;br /&gt;next:&lt;br /&gt;        dec bl&lt;br /&gt;        inc al&lt;br /&gt;        mov bh,counter&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        loop display&lt;br /&gt;        jmp quit&lt;br /&gt;zero:&lt;br /&gt;        lea dx, mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;quit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-8335401390381826780?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/8335401390381826780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=8335401390381826780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8335401390381826780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/8335401390381826780'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles_03.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/__0gzdUSzuUk/SQ_tV2tfa2I/AAAAAAAAA4A/XvnNAG--MU8/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-5886185939898448218</id><published>2008-11-03T22:11:00.000-08:00</published><updated>2008-11-03T22:22:15.826-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Asterisk patterns'/><title type='text'>Displaying asterisk triangles</title><content type='html'>Will it took me time to get myself to blogging again ,  this is one my own projects that I program using assembly  in my school , but this is just one pattern  I'll  blog the rest after this&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/__0gzdUSzuUk/SQ_pS-dzf6I/AAAAAAAAA34/zUH3uPH8jag/s1600-h/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://4.bp.blogspot.com/__0gzdUSzuUk/SQ_pS-dzf6I/AAAAAAAAA34/zUH3uPH8jag/s320/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5264683001634324386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Source Code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;        mess1   db      10,13, "Enter a value (n) [0-9 only]: $"&lt;br /&gt;        mess2   db      10,13, "Do you want to continue (y/n): $"&lt;br /&gt;        mess3   db      10,13, "There is nothing to display $"&lt;br /&gt;        space   db      " $"&lt;br /&gt;        lincar  db      10,13, "$"&lt;br /&gt;        value   db      0&lt;br /&gt;        counter db      0&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;        xor ax,ax&lt;br /&gt;        xor bx,bx&lt;br /&gt;        xor cx,cx&lt;br /&gt;&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov value,al&lt;br /&gt;        cmp al,0&lt;br /&gt;        je zero&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,0&lt;br /&gt;        mov al,value&lt;br /&gt;&lt;br /&gt;        mov cx,ax&lt;br /&gt;        mov counter,1&lt;br /&gt;        mov bh,counter&lt;br /&gt;        mov bl,1&lt;br /&gt;        jmp display&lt;br /&gt;start_bridge:&lt;br /&gt;        jmp start&lt;br /&gt;display:&lt;br /&gt;        cmp bh,bl&lt;br /&gt;        jg next&lt;br /&gt;&lt;br /&gt;        mov dl,'*'&lt;br /&gt;        mov ah,2&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        lea dx,space&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        inc bh&lt;br /&gt;        jmp display&lt;br /&gt;next:&lt;br /&gt;        inc bl&lt;br /&gt;        mov bh,counter&lt;br /&gt;&lt;br /&gt;        lea dx,lincar&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        loop display&lt;br /&gt;        jmp continue&lt;br /&gt;zero:&lt;br /&gt;        lea dx, mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;        jmp continue&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;&lt;br /&gt;        lea dx,mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start_bridge&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je quit&lt;br /&gt;&lt;br /&gt;        jmp continue&lt;br /&gt;quit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-5886185939898448218?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/5886185939898448218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=5886185939898448218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/5886185939898448218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/5886185939898448218'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/11/displaying-asterisk-triangles.html' title='Displaying asterisk triangles'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/__0gzdUSzuUk/SQ_pS-dzf6I/AAAAAAAAA34/zUH3uPH8jag/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-2199114460502490743</id><published>2008-10-24T01:42:00.000-07:00</published><updated>2008-10-24T02:26:31.396-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='assembly program'/><title type='text'>Gets the sum of two single digit numbers in assembly</title><content type='html'>This is a program that calculates the sum of two numbers that are single digit using assembly language.&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;        mess1   db      10,13,"Enter 1st value: $"&lt;br /&gt;        mess2   db      10,13,"Enter 2nd value: $"&lt;br /&gt;        mess3   db      10,13,"Total sum value: $"&lt;br /&gt;        mess4   db      10,13,"Do you want ot continue (y/n): $"&lt;br /&gt;        sum     db      0&lt;br /&gt;start:&lt;br /&gt;        mov ax,3&lt;br /&gt;        int 10h&lt;br /&gt;&lt;br /&gt;        lea dx,mess1&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        mov bl,al&lt;br /&gt;&lt;br /&gt;        lea dx,mess2&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;        sub al,30h&lt;br /&gt;&lt;br /&gt;        cmp al,0&lt;br /&gt;        jl start&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg start&lt;br /&gt;&lt;br /&gt;        add al,bl             ; adds the two numbers&lt;br /&gt;        mov sum,al&lt;br /&gt;&lt;br /&gt;        lea dx,mess3&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;        cmp al,9&lt;br /&gt;        mov al,sum&lt;br /&gt;        cmp al,9&lt;br /&gt;        jg twodigit&lt;br /&gt;        mov dl,al&lt;br /&gt;        or dl,30h&lt;br /&gt;        mov ah,2&lt;br /&gt;        int 21h&lt;br /&gt;        jmp continue&lt;br /&gt;        int 20h&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;continue:&lt;br /&gt;        xor dx,dx&lt;br /&gt;        lea dx,mess4&lt;br /&gt;        mov ah,9&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        mov ah,1&lt;br /&gt;        int 21h&lt;br /&gt;&lt;br /&gt;        cmp al,'y'&lt;br /&gt;        je start&lt;br /&gt;        cmp al,'n'&lt;br /&gt;        je quit&lt;br /&gt;&lt;br /&gt;twodigit:       ; prints sum if above 9&lt;br /&gt;        xor ax,ax&lt;br /&gt;        mov al,sum&lt;br /&gt;        mov bl,10&lt;br /&gt;        div bl&lt;br /&gt;        mov bh,ah&lt;br /&gt;        mov dl,al&lt;br /&gt;        or dl,30h&lt;br /&gt;        mov ah,2&lt;br /&gt;        int 21h&lt;br /&gt;        mov dl,bh&lt;br /&gt;        or dl,30h&lt;br /&gt;        mov ah,2&lt;br /&gt;        int 21h&lt;br /&gt;        jmp continue&lt;br /&gt;&lt;br /&gt;quit:&lt;br /&gt;        int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-2199114460502490743?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/2199114460502490743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=2199114460502490743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/2199114460502490743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/2199114460502490743'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/10/gets-sum-of-two-single-digit-numbers-in.html' title='Gets the sum of two single digit numbers in assembly'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-1058914009672290296</id><published>2008-10-23T21:28:00.000-07:00</published><updated>2008-10-23T23:22:20.794-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hello world program using assembly language'/><title type='text'>hello world program using assembly language</title><content type='html'>Now this is the famous problem in programming that has been pass down from generation too generation how to print the message "hello world!" in the computer screen.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__0gzdUSzuUk/SQFThg1NVpI/AAAAAAAAAEw/siLZHHfEs4o/s1600-h/helloworld.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 188px;" src="http://3.bp.blogspot.com/__0gzdUSzuUk/SQFThg1NVpI/AAAAAAAAAEw/siLZHHfEs4o/s320/helloworld.jpg" alt="" id="BLOGGER_PHOTO_ID_5260577674959345298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;source code:&lt;br /&gt;&lt;br /&gt;jmp start&lt;br /&gt;&lt;br /&gt;       message1        db      "Hello world!$"&lt;br /&gt;&lt;br /&gt;start:&lt;br /&gt;&lt;br /&gt;       ; clear the screens      &lt;br /&gt;       mov ax,3&lt;br /&gt;       int 10h&lt;br /&gt;&lt;br /&gt;       ; prints the hello world      &lt;br /&gt;       lea dx,message1&lt;br /&gt;       mov ah,9&lt;br /&gt;       int 21h&lt;br /&gt;&lt;br /&gt;       ;terminates the program&lt;br /&gt;       int 20h&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-1058914009672290296?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/1058914009672290296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=1058914009672290296' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1058914009672290296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1058914009672290296'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/10/hello-world-program-using-assembly.html' title='hello world program using assembly language'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__0gzdUSzuUk/SQFThg1NVpI/AAAAAAAAAEw/siLZHHfEs4o/s72-c/helloworld.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-2227847055113188091</id><published>2008-10-23T20:29:00.000-07:00</published><updated>2008-10-23T21:07:15.090-07:00</updated><title type='text'>Key Concepts</title><content type='html'>&lt;p style="text-align: justify; font-weight: bold;" class="MsoNormal"&gt;Key concepts&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__0gzdUSzuUk/SQFHQSeZdlI/AAAAAAAAAEg/X3gD9VnU1uw/s1600-h/computer.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/__0gzdUSzuUk/SQFHQSeZdlI/AAAAAAAAAEg/X3gD9VnU1uw/s320/computer.jpg" alt="" id="BLOGGER_PHOTO_ID_5260564184908265042" border="0" /&gt;&lt;/a&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Assembler&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Typically a modern assembler creates object code by translating assembly instruction mnemonics into opcodes, and by resolving symbolic names for memory locations and other entities.[1] The use of symbolic references is a key feature of assemblers, saving tedious calculations and manual address updates after program modifications. Most assemblers also include macro facilities for performing textual substitution—e.g., to generate common short sequences of instructions to run inline, instead of in a subroutine.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Assemblers are generally simpler to write than compilers for high-level languages, and have been available since the 1950s. Modern assemblers, especially for RISC based architectures, such as MIPS, Sun SPARC and HP PA-RISC, optimize instruction scheduling to exploit the CPU pipeline efficiently.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;More sophisticated high-level assemblers provide language abstractions such as:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Advanced control structures&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* High-level procedure/function declarations and invocations&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* High-level abstract data types, including structures/records, unions, classes, and sets&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Sophisticated macro processing&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Object-Oriented features such as encapsulation, polymorphism, inheritance, interfaces&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;See Language design below for more details.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Note that, in normal professional usage, the term assembler is often used ambiguously: It is frequently used to refer to an assembly language itself, rather than to the assembler utility. Thus: "CP/CMS was written in S/360 assembler" as opposed to "ASM-H was a widely-used S/370 assembler."&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Assembly language&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;A program written in assembly language consists of a series of instructions--mnemonics that correspond to a stream of executable instructions, when translated by an assembler, that can be loaded into memory and executed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;For example, an x86/IA-32 processor can execute the following binary instruction as expressed in machine language (see x86 assembly language):&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Binary: 10110000 01100001 (Hexadecimal: B0 61)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;The equivalent assembly language representation is easier to remember (example in Intel syntax, more mnemonic):&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* MOV &lt;st1:state st="on"&gt;&lt;st1:place st="on"&gt;AL&lt;/st1:place&gt;&lt;/st1:state&gt;, 61h&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;This instruction means:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Move the value 61h (or 97 decimal; the h-suffix means hexadecimal) into the processor register named "&lt;st1:state st="on"&gt;&lt;st1:place st="on"&gt;AL&lt;/st1:place&gt;&lt;/st1:state&gt;".&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;The mnemonic "mov" represents the opcode 1011 which moves the value in the second operand into the register indicated by the first operand. The mnemonic was chosen by the instruction set designer to abbreviate "move", making it easier for the programmer to remember. A comma-separated list of arguments or parameters follows the opcode; this is a typical assembly language statement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;In practice many programmers drop the word mnemonic and, technically incorrectly, call "mov" an opcode. When they do this they are referring to the underlying binary code which it represents. To put it another way, a mnemonic such as "mov" is not an opcode, but as it symbolizes an opcode, one might refer to "the opcode mov" for example when one intends to refer to the binary opcode it symbolizes rather than to the symbol--the mnemonic--itself. As few modern programmers have need to be mindful of actually what binary patterns are the opcodes for specific instructions, the distinction has in practice become a bit blurred among programmers but not among processor designers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Transforming assembly into machine language is accomplished by an assembler, and the reverse by a disassembler. Unlike in high-level languages, there is usually a one-to-one correspondence between simple assembly statements and machine language instructions. However, in some cases, an assembler may provide pseudoinstructions which expand into several machine language instructions to provide commonly needed functionality. For example, for a machine that lacks a "branch if greater or equal" instruction, an assembler may provide a pseudoinstruction that expands to the machine's "set if less than" and "branch if zero (on the result of the set instruction)". Most full-featured assemblers also provide a rich macro language (discussed below) which is used by vendors and programmers to generate more complex code and data sequences.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Each computer architecture and processor architecture has its own machine language. On this level, each instruction is simple enough to be executed using a relatively small number of electronic circuits. Computers differ by the number and type of operations they support. For example, a new 64-bit machine would have different circuitry from a 32-bit machine. They may also have different sizes and numbers of registers, and different representations of data types in storage. While most general-purpose computers are able to carry out essentially the same functionality, the ways they do so differ; the corresponding assembly languages reflect these differences.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Multiple sets of mnemonics or assembly-language syntax may exist for a single instruction set, typically instantiated in different assembler programs. In these cases, the most popular one is usually that supplied by the manufacturer and used in its documentation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Language design&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Basic elements&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Instructions (statements) in assembly language are generally very simple, unlike those in high-level languages. Each instruction typically consists of an operation or opcode plus zero or more operands. Most instructions refer to a single value, or a pair of values. Generally, an opcode is a symbolic name for a single executable machine language instruction. Operands can be either immediate (typically one byte values, coded in the instruction itself) or the addresses of data located elsewhere in storage. This is determined by the underlying processor architecture: the assembler merely reflects how this architecture works.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Most modern assemblers also support pseudo-operations, which are directives obeyed by the assembler at assembly time instead of the CPU at run time. (For example, pseudo-ops would be used to reserve storage areas and optionally set their initial contents.) The names of pseudo-ops often start with a dot to distinguish them from machine instructions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Some assemblers also support pseudo-instructions, which generate two or more machine instructions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Symbolic assemblers allow programmers to associate arbitrary names (labels or symbols) with memory locations. Usually, every constant and variable is given a name so instructions can reference those locations by name, thus promoting self-documenting code. In executable code, the name of each subroutine is associated with its entry point, so any calls to a subroutine can use its name. Inside subroutines, GOTO destinations are given labels. Some assemblers support local symbols which are lexically distinct from normal symbols (e.g., the use of "10$" as a GOTO destination).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Most assemblers provide flexible symbol management, allowing programmers to manage different namespaces, automatically calculate offsets within data structures, and assign labels that refer to literal values or the result of simple computations performed by the assembler. Labels can also be used to initialize constants and variables with relocatable addresses.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Assembly languages, like most other computer languages, allow comments to be added to assembly source code that are ignored by the assembler. Good use of comments is even more important with assembly code than with higher-level languages, as the meaning of a sequence of instructions is harder to decipher from the code itself.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Wise use of these facilities can greatly simplify the problems of coding and maintaining low-level code. Raw assembly source code as generated by compilers or disassemblers — code without any comments, meaningful symbols, or data definitions — is quite difficult to read when changes must be made.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Macros&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Many assemblers support macros, programmer-defined symbols that stand for some sequence of text lines. This sequence of text lines may include a sequence of instructions, or a sequence of data storage pseudo-ops. Once a macro has been defined using the appropriate pseudo-op, its name may be used in place of an mnemonic. When the assembler processes such a statement, it replaces the statement with the text lines associated with that macro, then processes them just as though they had appeared in the source code file all along (including, in better assemblers, expansion of any macros appearing in the replacement text).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Since macros can have 'short' names but expand to several or indeed many lines of code, they can be used to make assembly language programs appear to be much shorter (require less lines of source code from the application programmer - as with a higher level language). They can also be used to add higher levels of structure to assembly programs, optionally introduce embedded de-bugging code via parameters and other similar features.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Many assemblers have built-in macros for system calls and other special code sequences.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Macro assemblers often allow macros to take parameters. Some assemblers include quite sophisticated macro languages, incorporating such high-level language elements as optional parameters, symbolic variables, conditionals, string manipulation, and arithmetic operations, all usable during the execution of a given macros, and allowing macros to save context or exchange information. Thus a macro might generate a large number of assembly language instructions or data definitions, based on the macro arguments. This could be used to generate record-style data structures or "unrolled" loops, for example, or could generate entire algorithms based on complex parameters. An organization using assembly language that has been heavily extended using such a macro suite can be considered to be working in a higher-level language, since such programmers are not working with a computer's lowest-level conceptual elements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Macros were used to customize large scale software systems for specific customers in the mainframe era and were also used by customer personnel to satisfy their employers' needs by making specific versions of manufacturer operating systems; this was done, for example, by systems programmers working with IBM's Conversational Monitor System/Virtual Machine (CMS/VM) and with IBM's "real time transaction processing" add-on, Customer Information Control System, CICS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;It was also possible to use solely the macro processing capabilities of an assembler to generate code written in completely different languages, for example, to generate a version of a program in Cobol using a pure macro assembler program containing lines of Cobol code inside assembly time operators instructing the assembler to generate arbitrary code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;This was because, as was realized in the 1970s, the concept of "macro processing" is independent of the concept of "assembly", the former being in modern terms more word processing, text processing, than generating object code. The concept of macro processing in fact appeared in and appears in the C programming language, which supports "preprocessor instructions" to set variables, and make conditional tests on their values. Note that unlike certain previous macro processors inside assemblers, the C preprocessor was not Turing-complete because it lacked the ability to either loop or "go to", the latter allowing the programmer to loop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Despite the power of macro processing, it fell into disuse in high level languages while remaining a perennial for assemblers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;This was because many programmers were rather confused by macro parameter substitution and did not disambiguate macro processing from assembly and execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Macro parameter substitution is strictly by name: at macro processing time, the value of a parameter is textually substituted for its name. The most famous class of bugs resulting was the use of a parameter that itself was an expression and not a simple name when the macro writer expected a name. In the macro: foo: macro a load a*b the intention was that the caller would provide the name of a variable, and the "global" variable or constant b would be used to multiply "a". If foo is called with the parameter a-c, an unexpected macro expansion occurs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;To avoid this, users of macro processors learned to religiously parenthesize formal parameters inside macro definitions, and callers had to do the same to their "actual" parameters.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;PL/I and C feature macros, but this facility was underused or dangerous when used because they can only manipulate text. On the other hand, homoiconic languages, such as Lisp, Prolog, and &lt;st1:place st="on"&gt;Forth&lt;/st1:place&gt;, retain the power of assembly language macros because they are able to manipulate their own code as data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Support for structured programming&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Some assemblers have incorporated structured programming elements to encode execution flow. The earliest example of this approach was in the Concept-14 macro set developed by Marvin Zloof at IBM's Thomas Watson Research Center, which extended the S/370 macro assembler with IF/ELSE/ENDIF and similar control flow blocks. This was a way to reduce or eliminate the use of GOTO operations in assembly code, one of the main factors causing spaghetti code in assembly language. This approach was widely accepted in the early 80s (the latter days of large-scale assembly language use).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;A curious design was A-natural, a "stream-oriented" assembler for 8080/Z80 processors from Whitesmiths Ltd. (developers of the Unix-like Idris operating system, and what was reported to be the first commercial C compiler). The language was classified as an assembler, because it worked with raw machine elements such as opcodes, registers, and memory references; but it incorporated an expression syntax to indicate execution order. Parentheses and other special symbols, along with block-oriented structured programming constructs, controlled the sequence of the generated instructions. A-natural was built as the object language of a C compiler, rather than for hand-coding, but its logical syntax won some fans.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;There has been little apparent demand for more sophisticated assemblers since the decline of large-scale assembly language development.[2] In spite of that, they are still being developed and applied in cases where resource constraints or peculiarities in the target system's architecture prevent the effective use of higher-level languages.[3]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify; font-weight: bold;" class="MsoNormal"&gt;Use of assembly language&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify; font-weight: bold;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify; font-weight: bold;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify; font-weight: bold;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt; Historical perspective&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Historically, a large number of programs have been written entirely in assembly language. Operating systems were almost exclusively written in assembly language until the widespread acceptance of C in the 1970s and early 1980s. Many commercial applications were written in assembly language as well, including a large amount of the IBM mainframe software written by large corporations. COBOL and FORTRAN eventually displaced much of this work, although a number of large organizations retained assembly-language application infrastructures well into the 90s.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Most early microcomputers relied on hand-coded assembly language, including most operating systems and large applications. This was because these systems had severe resource constraints, imposed idiosyncratic memory and display architectures, and provided limited, buggy system services. Perhaps more important was the lack of first-class high-level language compilers suitable for microcomputer use. A psychological factor may have also played a role: the first generation of microcomputer programmers retained a hobbyist, "wires and pliers" attitude.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;In a more commercial context, the biggest reasons for using assembly language were size, speed, and reliability: the writers of Cardbox-Plus said simply "we use assembler because then all the bugs are ours". This held true for 8-bit versions of the program, which had no bugs at all, but ironically it turned out to be false with 16 bits: Cardbox-Plus 2.0 had to be upgraded to Cardbox-Plus 2.1 because a bug in Microsoft's macro assembler caused Cardbox-Plus to index the number "-0" differently from the number "0".[citation needed]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Typical examples of large assembly language programs from this time are the MS-DOS operating system, the early IBM PC spreadsheet program Lotus 1-2-3, and almost all popular games for the Atari 800 family of home computers. Even into the 1990s, most console video games were written in assembly, including most games for the Mega Drive/Genesis and the Super Nintendo Entertainment System[citation needed]. According to some industry insiders, the assembly language was the best computer language to use to get the best performance out the Sega Saturn, a console that was notoriously challenging to develop and program games for [4]. The popular arcade game NBA Jam (1993) is another example. On the Commodore 64, Amiga, &lt;st1:street st="on"&gt;&lt;st1:address st="on"&gt;Atari ST&lt;/st1:address&gt;&lt;/st1:street&gt;, as well as ZX Spectrum home computers, assembler has long been the primary development language. This was in large part due to the fact that BASIC dialects on these systems offered insufficient execution speed, as well as insufficient facilities to take full advantage of the available hardware on these systems. Some systems, most notably Amiga, even have IDEs with highly advanced debugging and macro facilities, such as the freeware ASM-One assembler, comparable to that of Microsoft Visual Studio facilities (ASM-One predates Microsoft Visual Studio).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;The Assembler for the VIC-20 was written by Don French and published by French Silk. At 1639 bytes in length, its author believes it is the smallest symbolic assembler ever written. The assembler supported the usual symbolic addressing and the definition of character strings or hex strings. It also allowed address expressions which could be combined with addition, subtraction, multiplication, division, logical AND, logical OR, and exponentiation operators.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__0gzdUSzuUk/SQFJXctiR7I/AAAAAAAAAEo/m0dwAArchKU/s1600-h/76370399_0894fabfbe.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/__0gzdUSzuUk/SQFJXctiR7I/AAAAAAAAAEo/m0dwAArchKU/s320/76370399_0894fabfbe.jpg" alt="" id="BLOGGER_PHOTO_ID_5260566506938451890" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Current usage&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;There have always been debates over the usefulness and performance of assembly language relative to high-level languages, though this gets less attention today[citation needed]. Assembly language has specific niche uses where it is important; see below. But in general, modern optimizing compilers are claimed to render high-level languages into code that can run as fast as hand-written assembly, despite some counter-examples that can be created. The complexity of modern processors makes effective hand-optimization increasingly difficult.[6] Moreover, and to the dismay of efficiency lovers, increasing processor performance has meant that most CPUs sit idle most of the time, with delays caused by predictable bottlenecks such as I/O operations and paging. This has made raw code execution speed a non-issue for most programmers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;There are really only a handful of situations where today's expert practitioners would choose assembly language[citation needed]:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When a stand-alone binary executable is required, i.e. one that must execute without recourse to the run-time components or libraries associated with a high-level language; this is perhaps the most common situation. These are embedded programs that store only a small amount of memory and the device is intended to do single purpose tasks. Such examples consist of telephones, automobile fuel and ignition systems, air-conditioning control systems, security systems, and sensors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When interacting directly with the hardware, for example in device drivers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When using processor-specific instructions not exploited by or available to the compiler. A common example is the bitwise rotation instruction at the core of many encryption algorithms.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Embedded systems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When extreme optimization is required, e.g., in an inner loop in a processor-intensive algorithm. Some game programmers are experts at writing code that takes advantage of the capabilities of hardware features in systems enabling the games to run faster.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When a system with severe resource constraints (e.g., an embedded system) must be hand-coded to maximize the use of limited resources; but this is becoming less common as processor price/performance improves&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When no high-level language exists, e.g., on a new or specialized processor&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Real-time programs that need precise timing and responses, such as simulations, flight navigation systems, and medical equipment. (For example, in a fly-by-wire system, telemetry must be interpreted and acted upon within strict time constraints. Such systems must eliminate sources of unpredictable delays – such as may be created by interpreted languages, automatic garbage collection, paging operations, or preemptive multitasking. Some higher-level languages incorporate run-time components and operating system interfaces that can introduce such delays. Choosing assembly or lower-level languages for such systems gives the programmer greater visibility and control over processing details.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When complete control over the environment is required (for example in extremely high security situations, where nothing can be taken for granted).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When writing computer viruses, bootloaders, certain device drivers, or other items very close to the hardware or low-level operating system.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* When reverse-engineering existing binaries, which may or may not have originally been written in a high-level language, for example when cracking copy protection of proprietary software.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Reverse engineering and modification of video games (known as ROM Hacking), commonly done to games for Nintendo hardware such as the SNES and NES, is possible with a range of techniques, of which the most widely employed is altering the program code at the assembly language level.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Assembly language is still used for writing games and other software for graphing calculators.[7]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Finally, compiler writers usually write software that generates assembly code, and should therefore be expert assembly language programmers themselves.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Nevertheless, assembly language is still taught in most Computer Science and Electronic Engineering programs. Although few programmers today regularly work with assembly language as a tool, the underlying concepts remain very important. Such fundamental topics as binary arithmetic, memory allocation, stack processing, character set encoding, interrupt processing, and compiler design would be hard to study in detail without a grasp of how a computer operates at the hardware level. Since a computer's behavior is fundamentally defined by its instruction set, the logical way to learn such concepts is to study an assembly language. Most modern computers have similar instruction sets. Therefore, studying a single assembly language is sufficient to learn: i) The basic concepts; ii) To recognize situations where the use of assembly language might be appropriate; and iii) To see how efficient executable code can be created from high-level languages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Typical applications&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Hard-coded assembly language is typically used in a system's boot ROM (BIOS on IBM-compatible PC systems). This low-level code is used, among other things, to initialize and test the system hardware prior to booting the OS, and is stored in &lt;st1:country-region st="on"&gt;&lt;st1:place st="on"&gt;ROM.&lt;/st1:place&gt;&lt;/st1:country-region&gt; Once a certain level of hardware initialization has taken place, execution transfers to other code, typically written in higher level languages; but the code running immediately after power is applied is usually written in assembly language. The same is true of most boot loaders.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Many compilers render high-level languages into assembly first before fully compiling, allowing the assembly code to be viewed for debugging and optimization purposes. Relatively low-level languages, such as C, often provide special syntax to embed assembly language directly in the source code. Programs using such facilities, such as the Linux kernel, can then construct abstractions utilizing different assembly language on each hardware platform. The system's portable code can then utilize these processor-specific components through a uniform interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Assembly language is also valuable in reverse engineering, since many programs are distributed only in machine code form, and machine code is usually easy to translate into assembly language and carefully examine in this form, but very difficult to translate into a higher-level language. Tools such as the Interactive Disassembler make extensive use of disassembly for such a purpose.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;A particular niche that makes use of assembly language is the demoscene. Certain competitions require the contestants to restrict their creations to a very small size (e.g. 256B, 1KB, 4KB or 64 KB), and assembly language is the language of choice to achieve this goal.[9] When resources, particularly CPU-processing constrained systems, like the Amiga and the Commodore 64, are a concern, assembler coding is a must: optimized assembler code is written "by hand" and instructions are sequenced manually by the coders in an attempt to minimize the number of CPU cycles used; the CPU constraints are so great that every CPU cycle counts. However, using such techniques has enabled systems like the Commodore 64 to produce real-time 3D graphics with advanced effects, a feat which might be considered unlikely or even impossible for a system with a 0.99MHz processor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Related terminology&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* Assembly language or assembler language is commonly called assembly, assembler, ASM, or symbolic machine code. A generation of IBM mainframe programmers called it BAL for Basic Assembly Language.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;        &lt;/span&gt;Note: Calling the language assembler is of course potentially confusing and ambiguous, since this is also the name of the utility program that translates assembly language statements into machine code. Some may regard this as imprecision or error. However, this usage has been common among professionals and in the literature for decades.Similarly, some early computers called their assembler its assembly program.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* The computational step where an assembler is run, including all macro processing, is known as assembly time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* The use of the word assembly dates from the early years of computers (cf. short code, speedcode).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* A cross assembler (see cross compiler) produces code using one type of processor, which runs on a different type of processor. This technology is particularly important when developing software for new processors, or when developing for embedded systems. This allows, for instance, a 32-bit x86 processor to assemble code to run on a 64-bit x64 processor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;    &lt;/span&gt;* An assembler directive is a command given to an assembler. These directives may do anything from telling the assembler to include other source files, to telling it to allocate memory for constant data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Further details&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;For any given personal computer, mainframe, embedded system, and game console, both past and present, at least one--possibly dozens--of assemblers have been written. For some examples, see the list of assemblers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;On Unix systems, the assembler is traditionally called as, although it is not a single body of code, being typically written anew for each port. A number of Unix variants use GAS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Within processor groups, each assembler has its own dialect. Sometimes, some assemblers can read another assembler's dialect, for example, TASM can read old MASM code, but not the reverse. FASM and NASM have similar syntax, but each support different macros that could make them difficult to translate to each other. The basics are all the same, but the advanced features will differ.[12]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Also, assembly can sometimes be portable across different operating systems on the same type of CPU. Calling conventions between operating systems often differ slightly or not at all, and with care it is possible to gain some portability in assembly language, usually by linking with a C library that does not change between operating systems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;For example, many things in libc depend on the preprocessor to do OS-specific, C-specific things to the program before compiling. In fact, some functions and symbols are not even guaranteed to exist outside of the preprocessor. Worse, the size and field order of structs, as well as the size of certain typedefs such as off_t, are entirely unavailable in assembly language without help from a configure script, and differ even between versions of Linux, making it impossible to portably call functions in libc other than ones that only take simple integers and pointers as parameters. To address this issue, FASMLIB project provides a portable assembly library for Win32 and Linux platforms, but it is yet very incomplete.[13]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Some higher level computer languages, such as C and Borland Pascal, support inline assembly where relatively brief sections of assembly code can be embedded into the high level language code. The Forth programming language commonly contains an assembler used in CODE words.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Many people use an emulator to debug assembly-language programs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;h2 style="text-align: justify;"&gt;&lt;span class="mw-headline"  style="font-size:100%;"&gt;Example listing of assembly language source code&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;table class="MsoNormalTable" style="text-align: left; margin-left: 0px; margin-right: 0px;" border="0" cellpadding="0"&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;Address&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;Label&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;Instruction   (AT&amp;amp;T syntax)&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;Object code&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;.begin&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;.org 2048&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;a_start&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;.equ 3000&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2048&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;ld length,%&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2064&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;be done&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;00000010 10000000   00000000 00000110&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2068&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;addcc %r1,-4,%r1&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;10000010 10000000   01111111 11111100&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2072&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;addcc %r1,%r2,%r4&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;10001000 10000000   01000000 00000010&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2076&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;ld %r4,%r5&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;11001010 00000001   00000000 00000000&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2080&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;ba loop&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;00010000 10111111   11111111 11111011&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2084&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;addcc %r3,%r5,%r3&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;10000110 10000000   11000000 00000101&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2088&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;done:&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;jmpl %r15+4,%r0&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;10000001 11000011   11100000 00000100&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2092&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;length:&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;20&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;00000000 00000000   00000000 00010100&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;2096&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;address:&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;a_start&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;00000000 00000000   00001011 10111000&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;.org a_start&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;3000&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;tt&gt;a:&lt;/tt&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;br /&gt;&lt;/td&gt;   &lt;td style="padding: 0.75pt;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;Example of a selection of instructions (for a virtual computer[15]) with the corresponding address in memory where each instruction will be placed. These addresses are not static, see memory management. Accompanying each instruction is the generated (by the assembler) object code that coincides with the virtual computer's architecture (or ISA).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-2227847055113188091?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/2227847055113188091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=2227847055113188091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/2227847055113188091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/2227847055113188091'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/10/key-concepts.html' title='Key Concepts'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__0gzdUSzuUk/SQFHQSeZdlI/AAAAAAAAAEg/X3gD9VnU1uw/s72-c/computer.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4793421338529051657.post-1243830306450806115</id><published>2008-10-23T18:50:00.000-07:00</published><updated>2008-10-23T20:17:26.046-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='description'/><title type='text'>Assembly language description</title><content type='html'>&lt;p style="text-align: justify;"&gt;An &lt;b&gt;assembly language&lt;/b&gt; is a &lt;span class="mw-redirect"&gt;low-level language&lt;/span&gt; for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular &lt;span class="mw-redirect"&gt;CPU&lt;/span&gt; architecture. This representation is usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc. An assembly language is thus specific to a certain physical or virtual computer architecture (as opposed to most &lt;span class="mw-redirect"&gt;high-level languages&lt;/span&gt;, which are usually portable).&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Assembly languages were first developed in the 1950s, when they were referred to as &lt;span class="mw-redirect"&gt;second&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Second_generation_programming_language" title="Second generation programming language" class="mw-redirect"&gt; &lt;/a&gt;&lt;span class="mw-redirect"&gt;generation programming languages&lt;/span&gt;. They eliminated much of the error-prone and time-consuming &lt;span class="mw-redirect"&gt;first-generation&lt;/span&gt; programming needed with the earliest computers, freeing the programmer from tedium such as remembering numeric codes and calculating addresses. They were once widely used for all sorts of programming. However, by the 1980s (1990s on small&lt;a href="http://en.wikipedia.org/wiki/Microcomputer" title="Microcomputer"&gt; &lt;/a&gt;computers), their use had largely been supplanted by &lt;span class="mw-redirect"&gt;high-level languages&lt;/span&gt;, in the search for improved programming productivity. Today, assembly language is used primarily for direct hardware manipulation, access to specialized processor instructions, or to address critical performance issues. Typical uses are &lt;span class="mw-redirect"&gt;device drivers&lt;/span&gt;, low-level &lt;span class="mw-redirect"&gt;embedded systems&lt;/span&gt;, and real-time systems.&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;A &lt;span class="mw-redirect"&gt;utility program&lt;/span&gt; called an &lt;b&gt;assembler&lt;/b&gt; is used to translate assembly language statements into the target computer's machine code. The assembler performs a more or less isomorphic translation (a one-to-one mapping) from mnemonic statements into machine instructions and data. (This is in contrast with &lt;span class="mw-redirect"&gt;high-level languages&lt;/span&gt;, in which a single statement generally results in many machine instructions. A compiler, analogous to an assembler, is used to translate high-level language statements into machine code; or an interpreter executes statements directly.)&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="text-align: justify;"&gt;Many sophisticated assemblers offer additional mechanisms to facilitate program development, control the assembly process, and aid debugging. In particular, most modern assemblers (although many have been available for more than 40 years already) include a macro facility (described below), and are called &lt;b&gt;macro assemblers&lt;/b&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4793421338529051657-1243830306450806115?l=assemblyranger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://assemblyranger.blogspot.com/feeds/1243830306450806115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4793421338529051657&amp;postID=1243830306450806115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1243830306450806115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4793421338529051657/posts/default/1243830306450806115'/><link rel='alternate' type='text/html' href='http://assemblyranger.blogspot.com/2008/10/assembly-language-description.html' title='Assembly language description'/><author><name>Hollywwod celebreteis</name><uri>http://www.blogger.com/profile/17462684332806379311</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
