AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > 汇编语言

汇编源码--col

51自学网 2015-09-08 http://www.51zixue.net
;                          --COLOURS ROUTINE--; for tasm;cseg segmentassume cs:cseg, ds:csegorg 100Hbegin:                mov es,cs:[video]                mov ax,3                int 10h                mov cs:[col],0fh                mov di,18                lea si,colr2                call mess                mov cx,16                mov di,160                xor al,alrec1:                push cx                push di                lea si,colour                call mess                call hex2                mov bh,al                push cx                mov cx,16col2:                mov es:[di],byte ptr "#"                mov es:[di+1],bh                inc bh                add di,2                loop col2                pop cx                pop di                add di,160                add al,10h                add cs:[col],10h                pop cx                loop rec1                mov ah,2                mov bh,0                mov dh,17                mov dl,0                int 10h                mov ah,4ch                int 21hcol             db 0colour          db "Colour ",0colr2           db "0123456789ABCDEF",0colnum          db 0video           dw 0b800hhex2            proc near                push ax                and al,011110000b                shr al,4                call hex1                pop ax                push ax                and al,01111b                call hex1                pop ax                rethex2            endphex1            proc near                mov ah,cs:[col]                cmp al,10                jb hnum1                add al,'A'-10                jmp hnum2hnum1:                add al,'0'hnum2:                mov es:[di],ax                add di,2                rethex1            endpmess            proc                push ax                mov ah,cs:[col]conmess:                mov al,cs:[si]                or al,al                jz endmess                mov es:[di],ax                inc si                add di,2                jmp conmessendmess:                pop ax                retmess            endpcseg endsend begin

 

 

 
上一篇:汇编源码--ctrladel  下一篇:汇编源码--circle