Article View: pl.comp.lang.asm
Article #2292Re: Tablica
From: przemo12146
Date: Fri, 09 Jul 2010 20:59
Date: Fri, 09 Jul 2010 20:59
171 lines
6621 bytes
6621 bytes
format binary org 100h poczatek: mov dx,tablica mov ah,09h int 21h mov ah,0h int 16h mov ax,4C00h int 21h tablica: times 1 db 'Witaj swiecie!','$' teraz wskazuje początek tablicy czyli literę "W" : seg000:0100 ; Format : MS-DOS COM-file seg000:0100 ; Base Address: 1000h Range: 10100h-1011Fh Loaded length: 1Fh seg000:0100 seg000:0100 .686p seg000:0100 .mmx seg000:0100 .model tiny seg000:0100 seg000:0100 ; =========================================================================== seg000:0100 seg000:0100 ; Segment type: Pure code seg000:0100 seg000 segment byte public 'CODE' use16 seg000:0100 assume cs:seg000 seg000:0100 org 100h seg000:0100 assume es:nothing, ss:nothing, ds:seg000, fs:nothing, gs:nothing seg000:0100 seg000:0100 ; --------------- S U B R O U T I N E --------------------------------------- seg000:0100 seg000:0100 seg000:0100 public start seg000:0100 start proc near seg000:0100 mov dx, 110h seg000:0103 mov ah, 9 seg000:0105 int 21h ; DOS - PRINT STRING seg000:0105 ; DS:DX -> string terminated by "$" seg000:0107 mov ah, 0 seg000:0109 int 16h ; KEYBOARD - READ CHAR FROM BUFFER, WAIT IF EMPTY seg000:0109 ; Return: AH = scan code, AL = character seg000:010B mov ax, 4C00h seg000:010E int 21h ; DOS - 2+ - QUIT WITH EXIT CODE (EXIT) seg000:010E start endp ; AL = exit code seg000:010E seg000:010E ; ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| seg000:0110 db 57h ; W seg000:0111 db 69h ; i seg000:0112 db 74h ; t seg000:0113 db 61h ; a seg000:0114 db 6Ah ; j seg000:0115 db 20h seg000:0116 db 73h ; s seg000:0117 db 77h ; w seg000:0118 db 69h ; i seg000:0119 db 65h ; e seg000:011A db 63h ; c seg000:011B db 69h ; i seg000:011C db 65h ; e seg000:011D db 21h ; ! seg000:011E db 24h ; $ seg000:011E seg000 ends seg000:011E seg000:011E seg000:011E end start a po operacji: format binary org 100h poczatek: mov dx,(tablica+1) mov ah,09h int 21h mov ah,0h int 16h mov ax,4C00h int 21h tablica: times 1 db 'Witaj swiecie!','$' wskazuje na literę "i" : seg000:0100 ; Format : MS-DOS COM-file seg000:0100 ; Base Address: 1000h Range: 10100h-1011Fh Loaded length: 1Fh seg000:0100 seg000:0100 .686p seg000:0100 .mmx seg000:0100 .model tiny seg000:0100 seg000:0100 ; =========================================================================== seg000:0100 seg000:0100 ; Segment type: Pure code seg000:0100 seg000 segment byte public 'CODE' use16 seg000:0100 assume cs:seg000 seg000:0100 org 100h seg000:0100 assume es:nothing, ss:nothing, ds:seg000, fs:nothing, gs:nothing seg000:0100 seg000:0100 ; --------------- S U B R O U T I N E --------------------------------------- seg000:0100 seg000:0100 seg000:0100 public start seg000:0100 start proc near seg000:0100 mov dx, 111h seg000:0103 mov ah, 9 seg000:0105 int 21h ; DOS - PRINT STRING seg000:0105 ; DS:DX -> string terminated by "$" seg000:0107 mov ah, 0 seg000:0109 int 16h ; KEYBOARD - READ CHAR FROM BUFFER, WAIT IF EMPTY seg000:0109 ; Return: AH = scan code, AL = character seg000:010B mov ax, 4C00h seg000:010E int 21h ; DOS - 2+ - QUIT WITH EXIT CODE (EXIT) seg000:010E start endp ; AL = exit code seg000:010E seg000:010E ; ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| seg000:0110 db 57h ; W seg000:0111 db 69h ; i seg000:0112 db 74h ; t seg000:0113 db 61h ; a seg000:0114 db 6Ah ; j seg000:0115 db 20h seg000:0116 db 73h ; s seg000:0117 db 77h ; w seg000:0118 db 69h ; i seg000:0119 db 65h ; e seg000:011A db 63h ; c seg000:011B db 69h ; i seg000:011C db 65h ; e seg000:011D db 21h ; ! seg000:011E db 24h ; $ seg000:011E seg000 ends seg000:011E seg000:011E seg000:011E end start wskazuje drugiego element oto jak w prosty sposób można dobrać się do tablicy.
Technical Details
Message-ID:
<24af0d2c-efb1-40dd-b3e8-301177fc44bb@d16g2000yqb.googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!lublin.pl!uw.edu.pl!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!eweka.nl!lightspeed.eweka.nl!postnews.google.com!d16g2000yqb.googlegroups.com!not-for-mailReferences:
hvlmqm$ljb$1@mx1.internetia.pl <acaaee6e-5908-471b-a309-b7146d718425@b35g2000yqi.googlegroups.com> <i17lng$7gb$1@inews.gazeta.pl> <337ec0e6-4d8b-4496-a792-4503ce94e063@k39g2000yqb.googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!lublin.pl!uw.edu.pl!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!eweka.nl!lightspeed.eweka.nl!postnews.google.com!d16g2000yqb.googlegroups.com!not-for-mail From: przemo12146 <przemo12146@gmail.com> Newsgroups: pl.comp.lang.asm Subject: Re: Tablica Date: Fri, 9 Jul 2010 13:59:48 -0700 (PDT) Organization: http://groups.google.com Lines: 176 Message-ID: <24af0d2c-efb1-40dd-b3e8-301177fc44bb@d16g2000yqb.googlegroups.com> References: hvlmqm$ljb$1@mx1.internetia.pl <acaaee6e-5908-471b-a309-b7146d718425@b35g2000yqi.googlegroups.com> <i17lng$7gb$1@inews.gazeta.pl> <337ec0e6-4d8b-4496-a792-4503ce94e063@k39g2000yqb.googlegroups.com> NNTP-Posting-Host: 195.117.93.1 Mime-Version: 1.0 X-Trace: posting.google.com 1278709189 18317 127.0.0.1 (9 Jul 2010 20:59:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 9 Jul 2010 20:59:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d16g2000yqb.googlegroups.com; posting-host=195.117.93.1; posting-account=vJlzHgoAAAB4VQEIaOfBd-KwI2yffTmo User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.80 (Windows NT 5.1; U; pl) Presto/2.6.30 Version/10.60,gzip(gfe) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit