TASM PROGRAMMING BASICS

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ย. 2024

ความคิดเห็น • 2

  • @michellekennedy784
    @michellekennedy784 ปีที่แล้ว

    "Promosm"

  • @maxmuster7003
    @maxmuster7003 ปีที่แล้ว

    Using debug with a batch file to print colored text center align.
    Start from DosBox prompt with parameter attached:
    C:\>CENTER.BAT 8 1b "Hello World!"
    @echo off
    REM CENTER.BAT
    REM Need three parameter (%1 %2 %3) attached.
    REM Usage: CENTER.BAT row color "TEXT"
    echo acs:100>tmp.deb
    echo mov ax,B800>>tmp.deb
    echo mov es,ax>>tmp.deb
    echo mov di,%1>>tmp.deb
    echo mov bx,%1>>tmp.deb
    echo shl di,7>>tmp.deb
    echo shl bx,5>>tmp.deb
    echo add di,bx>>tmp.deb
    echo cld>>tmp.deb
    echo mov si,140>>tmp.deb
    echo lodsb>>tmp.deb
    echo cmp al,FF>>tmp.deb
    echo jnz 0117>>tmp.deb
    echo sub si,141>>tmp.deb
    echo mov bx,50>>tmp.deb
    echo mov cx,si>>tmp.deb
    echo sub bx,si>>tmp.deb
    echo shr bx,1>>tmp.deb
    echo shl bx,1>>tmp.deb
    echo add di,bx>>tmp.deb
    echo mov ah,%2>>tmp.deb
    echo mov si,140>>tmp.deb
    echo lodsb>>tmp.deb
    echo stosw>>tmp.deb
    echo dec cx>>tmp.deb
    echo jnz 0132>>tmp.deb
    echo ret>>tmp.deb
    echo org 140>>tmp.deb
    echo DB "%3", FF>>tmp.deb
    echo.>>tmp.deb
    echo n CENTER.COM>>tmp.deb
    echo rcx>>tmp.deb
    echo 90>>tmp.deb
    echo wcs:100>>tmp.deb
    echo q>>tmp.deb
    debugnul
    del tmp.deb
    CENTER.COM
    del CENTER.COM