test3.asm

来自「汇编语言 参考书 包含作业与答案 从入门到精通 通俗易懂」· 汇编 代码 · 共 91 行

ASM
91
字号
	.model	small
	.stack 100h
	.data
		strings		db	'kznvlkjxjsjafnxvnksaroiew'
		num		db	?
		linex		db	?
		liney		db	?
		temp1		dw	?
		temp2		dw	?
		temp3		dw	?
	.code
	.startup
	
main	proc	far	
start:
	mov	ax,@data
	mov	ds,ax
	
	mov	bh,0h		;读当前光标的位置
	mov	ah,3h
	INT	10h
	
	mov	linex,dh		;
	mov	liney,dl
	
	;mov	ah,0fh
	;INT	10h
	mov	al,12h
	mov	ah,0h
	INT	10h
	
	mov	dl,9h  ;linex
	mov	dh,0h
	;mov	num,0h
	mov	cx,16
	dec	cx
	lea	si,strings
writex:
	push	cx
	mov	bl,0f1h  ;liney
	mov	bh,0h
	
	mov	cx,8
	dec	cx
	mov	ah,[si]

writey:
	shl	ah,1
	mov	temp1,ax
	jnc	iszero
	mov	temp2,ax
	xor	al,al
	jmp	goon
iszero:
	mov	temp3,ax
	mov	al,7h
goon:
	push	ax
	mov	ah,0ch
	xchg	cx,bx
	push	bx
	xor	bx,bx
	INT	10h
	pop	bx
	xchg	cx,bx	
	pop	ax
	
	inc	bx
	loop	writey
	
	pop	cx
	inc	dx
	inc	si
	loop	writex
	
.exit	
main	ENDP

;judge_pixel	proc	near
;	push	dx
;	push	cx
	
;	mov	
	
;	pop	cx
;	pop	dx
	
	
;judge_pixel	ENDP
END
	

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?