Sapresti indirizzarmi su un codice simile in modo da studiarlo?
Sarebbe la cosa più sbagliata... Visto che non hai mai fatto una cosa del genere devi fare uno sforzo iniziale nel pensare come risolvere il problema.
Per risolverlo devi ovviamente invocare degli interrupt (acquisizione da tastiera, stampa di un carattere sullo schermo, posizionamento del cursore, ...) e scrivere delle routine ad hoc (cancellazione dello schermo, gestione delle coordinate, ...).
Cose del genere per intenderci:
codice:
procedure ClrScr; assembler;
{ procedure to clear the screen }
asm
mov ax,VideoSegment { set the video segment }
mov es,ax
mov cx,25*80 { get number of characters on screen }
xor bx,bx { set start position on screen }
@@1:
mov byte ptr es:[bx],0 { clear character }
add bx,2 { move to next position }
loop @@1
end;
procedure GotoXY ( x, y : byte ); assembler;
{ procedure to move the cursor to the specified coordinates }
asm
mov dh,y { set DH=y-1 }
dec dh
mov dl,x { set DL=x-1 }
dec dl
mov bh,0 { set page number=0 }
mov ah,2 { set service number }
int 10h { call video interrupt }
end;
(ovviamente queste sono routine Pascal basate sul BASM, l'importante è comprendere il principio)
NOTA: non potrai fare a meno di consultare la Ralf Brown's Interrupt List.