Change screen color using assembly in Turbo Pascal -


i have problems syntax in turbo pascal, in debug works no problem, can't make work in turbo pascal.

program foo;  begin asm     mov ah,06h;     mov bh,$21;     mov cx,$0000;     mov bx,$1950;      int 10h;     mov ah,00h;     int 16h;   end; end. 

i don't know wrong.

pd: means h, $ , b in thing?

int 10h / ah=06h needs value in al:

program foo;  begin     asm         mov ah, 06h         mov bh, $21         mov cx, $0000         mov bx, $1950      (* should rather `dx`? *)          mov al, 25         (* scroll 25 lines *)         int 10h          mov ah, 00h         int 16h     end; end. 

to clear entire window can set al 0 (mov al, 0 or xor al, al).

the suffix 'h' means hexadecimal number. prefix '$' means same. first assembly notation, second pascal notation. without suffix or prefix decimal number.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -