| Rev | Line |  | 
|---|
| [26] | 1 | ;Copyright (C) 2008, 2009 by Mattia Monga <mattia.monga@unimi.it> | 
|---|
| [2] | 2 | bits 16                         ; 16 bit real mode | 
|---|
|  | 3 | org 0x7C00                      ; origine indirizzo 0000:7C00 | 
|---|
|  | 4 |  | 
|---|
|  | 5 | start: | 
|---|
|  | 6 | mov ax, 0xb800 ; text video memory | 
|---|
|  | 7 | mov ds, ax     ; ds non accessibile direttamente | 
|---|
|  | 8 | mov bx, 10 | 
|---|
|  | 9 | write: | 
|---|
|  | 10 | cmp bx, 0 | 
|---|
|  | 11 | jz end | 
|---|
|  | 12 | mov byte [ds:bx], 'm'    ; indirizzamento relativo a ds | 
|---|
|  | 13 | mov byte [ds:bx+1], 0x0F ; attrib = white on black | 
|---|
|  | 14 | sub bx, 2 | 
|---|
|  | 15 | jmp write | 
|---|
|  | 16 | end: | 
|---|
|  | 17 | hlt | 
|---|
|  | 18 |  | 
|---|
|  | 19 | times 510-($-$$) db 0 ; 0-padding | 
|---|
|  | 20 | dw 0xAA55 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.