print numbers on the screen.(show_str and dtoc function)
2009-09-20 22:46
561 查看
;show_str, dtoc functions. ;by:double; date:2009-09-20; ver:0.1 assume cs:codesg,ss:stacksg,ds:datasg datasg segment dw 123,12666,1,8,3,38,339,284,374,11124 db 12 dup (0) datasg ends stacksg segment dw 32 dup (0) stacksg ends codesg segment start: mov ax,stacksg mov ss,ax mov sp,64 mov ax,datasg mov ds,ax mov di,0 mov si,20 mov cx,10 mov bh,10 ;bh row number mov bl,8 ;bl col number s: mov ax,ds:[di] call dtoc ;push cx ;mov cl,00001010b ;mov ch,0 call show_str ;pop cx add di,2 add bh,1 loop s mov ax,4c00h int 21h dtoc: push si push bx push cx push bp push dx mov bx,0 mov bp,0ah s1: mov dx,0 div bp add dl,30h push dx inc bx mov cx,ax jcxz ok jmp short s1 ok: mov cx,bx s2: pop dx mov ds:[si],dl inc si loop s2 mov byte ptr ds:[si],0 pop dx pop bp pop cx pop bx pop si ret show_str: push ax push bx push es push si push di push cx push dx mov di,0 mov ax,0b800h mov es,ax mov al,0a0h mov ah,0 mul bh mov dx,ax mov al,2 mov ah,0 mul bl add dx,ax mov bx,dx s3: mov cl,ds:[si] mov ch,0 jcxz ok1 mov es:[bx+di],cl inc di ;mov es:[bx+di],dl mov byte ptr es:[bx+di],00001010b inc di inc si jmp short s3 ok1: pop dx pop cx pop di pop si pop es pop bx pop ax ret codesg ends end start
相关文章推荐
- [20160731]read a file and print it on the screen
- 每日一命令(10)cat (concatenate files and print on the standard output)
- The Result of an Interesting and Useful Program on Floating Numbers
- show div and mouse can move on the div
- cat - concatenate files and print on the standard output
- 【论文:麦克风阵列增强】Speech Enhancement Based on the General Transfer Function GSC and Postfiltering
- cat - concatenate files and print on the standard output
- Codeforces Round #429 (Div. 2/Div. 1) [ A/_. Generous Kefa ] [ B/_. Godsend ] [ C/A. Leha and Function ] [ D/B. Leha and another game about graph ] [ E/C. On the Bench ] [ _/D. Destiny ]
- 3.8 - Using the Print Function
- Clicking the dock icon to show the app on Mac
- ui-grid cannot rendered correctly when using ng-show/ng-hide, if you press F12 on the keyboard, it c
- [Ruby on Rails Issue] When Setting Sqlite version on the Gemfile, Show error "An error occurred while installing sqlite3 ",
- A Function to Do All My SQL Statements Based On All The Others Comments
- Setting the background color and background alpha on a Flex PopUpButton control’s pop up menu
- Instant Run performed a full build and install since the installation on the device does not match t
- How To Reclaim Wasted Space on The Segment (Table, Index and LOB) and Tablespace Levels (文档 ID 16827
- Mail merge region 'tablePrint' is badly formed. TableStart and TableEnd should be in the same sectio
- On blocking the SMS sending and dialing in Android
- Exchange the numbers of row and array of a two-dimensional array, and form a new two-dimensional ar
- Could not install the app on the device, read the error above for details. Make sure you have an And