> For the complete documentation index, see [llms.txt](https://acristea.gitbook.io/bti-suport-seminar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acristea.gitbook.io/bti-suport-seminar/seminar-10/rulare-cod-in-limbaj-de-asamblare.md).

# Rulare cod în limbaj de asamblare

Pentru a lucra cu DOSBOX descărcați următoarele resurse:

{% embed url="<http://zota.ase.ro/bti/tasm.zip>" %}

Folderul tasm rezultta din dezarhivarea tasm.zipima se salveaza în C:/

{% embed url="<http://zota.ase.ro/bti/dosbox_setup_win.exe>" %}

Pentru a putea lucra cu tasm se rulează comanda

`Z:\> mount c: c:\tasm`

`Z:\> c:`

`C:\>`

<figure><img src="https://3764159134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLEuMc3jCaSbqilHud9lY%2Fuploads%2FurRe7XEfr6wzjDOg0SAw%2F2022-11-28_06h41_19.png?alt=media&amp;token=3591a219-17c6-44dc-abde-1ee6bd265734" alt=""><figcaption></figcaption></figure>

<pre class="language-asm6502" data-title="C:/tasm/seminar1.asm" data-line-numbers><code class="lang-asm6502">title test
.model small
.stack 100h
.data
    mesaj db 'Salut',13,10,'$'
.code
start:
<strong>    mov ax,@data
</strong>    mov ds,ax
    
    mov dx,offset mesaj
    
    mov ah,09h
    int 21h
    
    mov ah,4Ch
    int 21h
end start
</code></pre>

## .asm => .exe

<figure><img src="https://3764159134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLEuMc3jCaSbqilHud9lY%2Fuploads%2FMCBbK3UZgRV6OLVIvgAD%2F2022-11-27_18h32_45.png?alt=media&amp;token=92fdd4ac-e518-469f-bdec-e94e25620e26" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3764159134-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLEuMc3jCaSbqilHud9lY%2Fuploads%2FMmeMchqirQIfdUiyJSA6%2F2022-11-28_06h44_31.png?alt=media&amp;token=e4e86edf-11e7-41b0-9e7f-7e22570db7af" alt=""><figcaption></figcaption></figure>
