<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Catzie.net Blog &#187; assembly language</title>
	<atom:link href="http://blog.catzie.net/tag/assembly-language/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.catzie.net</link>
	<description>Programming, Networking, and other Downloads by Catzie</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:19:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Assembly Language: a simple shop/store program</title>
		<link>http://blog.catzie.net/assembly-language-a-simple-shop-store-program/</link>
		<comments>http://blog.catzie.net/assembly-language-a-simple-shop-store-program/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 02:52:03 +0000</pubDate>
		<dc:creator>Catzie</dc:creator>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[assembly language]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://blog.catzie.net/?p=157</guid>
		<description><![CDATA[A small program I made a year ago in Turbo Assembler. It&#8217;s a shop displaying four items, each item having 9 stocks. The user is first prompted for which item he/she wishes to buy, for the quantity of the purchase, and if he wants to buy again. The program closes once the shop runs out [...]]]></description>
			<content:encoded><![CDATA[<p>A small program I made a year ago in Turbo Assembler. </p>
<p><center><img src="http://img.photobucket.com/albums/v209/catzie/str.jpg" alt="tasm shop assembly language" /></center></p>
<p>It&#8217;s a shop displaying four items, each item having 9 stocks. The user is first prompted for which item he/she wishes to buy, for the quantity of the purchase, and if he wants to buy again. The program closes once the shop runs out of stock.</p>
<p><span id="more-157"></span></p>
<div class="code">
.model small<br />
.code<br />
org 100h<br />
s: jmp main<br />
;&#8212;-Coded by Catzie Keng of http://catzie.net<br />
;&#8212;- VARIABLES &#8212;-</p>
<p>m01 db &#8220;ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&#8221;,10,13,&#8221;$&#8221;<br />
m02 db &#8220;º             M Y   S T O R E               º&#8221;,10,13,&#8221;$&#8221;<br />
m03 db &#8220;º                                           º&#8221;,10,13,&#8221;$&#8221;<br />
m04 db &#8220;º   ÚÄÄÄ¿      ÚÄÄÄ¿      ÚÄÄÄ¿     ÚÄÄÄ¿   º&#8221;,10,13,&#8221;$&#8221;<br />
m05 db &#8220;º   ³   ³      ³   ³      ³   ³     ³   ³   º&#8221;,10,13,&#8221;$&#8221;<br />
m06 db &#8220;º   ÀÄÄÄÙ      ÀÄÄÄÙ      ÀÄÄÄÙ     ÀÄÄÄÙ   º&#8221;,10,13,&#8221;$&#8221;<br />
m07 db &#8220;º     A        B          C         D     º&#8221;,10,13,&#8221;$&#8221;<br />
m08 db &#8220;º                                           º&#8221;,10,13,&#8221;$&#8221;<br />
m09 db &#8220;ºÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄº&#8221;,10,13,&#8221;$&#8221;<br />
m10 db &#8220;º                                           º&#8221;,10,13,&#8221;$&#8221;<br />
m11 db &#8220;º                                           º&#8221;,10,13,&#8221;$&#8221;<br />
m12 db &#8220;º Buy:( )   Qty:( )   Try Again?[Y/N]:( )   º&#8221;,10,13,&#8221;$&#8221;<br />
m13 db &#8220;º                                           º&#8221;,10,13,&#8221;$&#8221;<br />
m14 db &#8220;º                                           º&#8221;,10,13,&#8221;$&#8221;<br />
m15 db &#8220;º                                           º&#8221;,10,13,&#8221;$&#8221;<br />
m16 db &#8220;ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼&#8221;,10,13,&#8221;$&#8221;</p>
<p>A db 39H,&#8221;$&#8221;<br />
B db 39H,&#8221;$&#8221;<br />
C db 39H,&#8221;$&#8221;<br />
D db 39H,&#8221;$&#8221;</p>
<p>spacer1 db &#8221;                                           $&#8221;</p>
<p>vBelowZERO db &#8220;Not enough items to sell.$&#8221;<br />
vClose db &#8220;All items sold out! Thank you.$&#8221;</p>
<p>main proc near<br />
mov ax,03<br />
int 10h</p>
<p>cls1: cmp A,&#8221;0&#8243;<br />
je cls2<br />
jne clsNOT<br />
cls2: cmp B,&#8221;0&#8243;<br />
je cls3<br />
jne clsNOT<br />
cls3: cmp C,&#8221;0&#8243;<br />
je cls4<br />
jne clsNOT<br />
cls4: cmp D,&#8221;0&#8243;<br />
je cls5<br />
jne clsNOT</p>
<p>cls5: call closeProg<br />
call exit</p>
<p>clsNOT:<br />
call dispMenu</p>
<p>call qtyA<br />
call qtyB<br />
call qtyC<br />
call qtyD</p>
<p>call clrError</p>
<p>call buyCursor<br />
call input    ;input for Buy<br />
cmp al,&#8221;A&#8221;<br />
je inA<br />
cmp al,&#8221;B&#8221;<br />
je inB<br />
cmp al,&#8221;C&#8221;<br />
je in_C<br />
cmp al,&#8221;D&#8221;<br />
je inD</p>
<p>inA:call inputA<br />
call tryAgain</p>
<p>inB:call inputB<br />
call tryAgain</p>
<p>in_C:call inputC<br />
call tryAgain</p>
<p>inD:call inputD<br />
call tryAgain</p>
<p>call exit</p>
<p>;&#8212;-Coded by Catzie Keng of http://catzie.net<br />
;&#8212;&#8212;- inputA, inputB, inputC, inputD &#8212;&#8212;-<br />
inputA proc<br />
call qtyCursor<br />
call input    ;input for Qty<br />
add A,30h<br />
sub A,al<br />
call qtyA<br />
call tryAgain<br />
inputA endp</p>
<p>inputB proc<br />
call qtyCursor<br />
call input    ;input for Qty<br />
add B,30h<br />
sub B,al<br />
call qtyB<br />
call tryAgain<br />
inputB endp</p>
<p>inputC proc<br />
call qtyCursor<br />
call input    ;input for Qty<br />
add C,30h<br />
sub C,al<br />
call qtyC<br />
call tryAgain<br />
inputC endp</p>
<p>inputD proc<br />
call qtyCursor<br />
call input    ;input for Qty<br />
add D,30h<br />
sub D,al<br />
call qtyD<br />
call tryAgain<br />
inputD endp</p>
<p>;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>closeProg proc<br />
mov ah,2<br />
mov bh,0<br />
mov dl,4<br />
mov dh,13<br />
int 10h<br />
mov ah,9<br />
lea dx,vClose<br />
int 21h<br />
ret<br />
closeProg endp</p>
<p>tryAgain proc<br />
call tryAgainCursor<br />
call input<br />
cmp al,&#8221;N&#8221;<br />
je exit1<br />
cmp al,&#8221;Y&#8221;<br />
je again<br />
again: call main<br />
exit1:call exit<br />
ret<br />
tryAgain endp</p>
<p>;&#8212;&#8212;- qtyA, qtyB, qtyC, qtyD &#8212;&#8212;-<br />
qtyA proc<br />
mov cl, al<br />
mov ah,2<br />
mov bh,0<br />
mov dl,6<br />
mov dh,4<br />
int 10h<br />
cmp A,30h    ;30h is 0<br />
jb belowZEROA</p>
<p>mov ah,9<br />
lea dx,A<br />
int 21h<br />
ret<br />
belowZEROA: call pBelowZERO<br />
add A,cl<br />
sub A, 30h<br />
ret<br />
qtyA endp</p>
<p>qtyB proc<br />
mov cl, al<br />
mov ah,2<br />
mov bh,0<br />
mov dl,17<br />
mov dh,4<br />
int 10h<br />
cmp B,30h    ;30h is 0<br />
jb belowZEROB</p>
<p>mov ah,9<br />
lea dx,B<br />
int 21h<br />
ret<br />
belowZEROB: call pBelowZERO<br />
add B,cl<br />
sub B, 30h<br />
ret<br />
qtyB endp</p>
<p>qtyC proc<br />
mov cl, al<br />
mov ah,2<br />
mov bh,0<br />
mov dl,28<br />
mov dh,4<br />
int 10h<br />
cmp C,30h    ;30h is 0<br />
jb belowZEROC</p>
<p>mov ah,9<br />
lea dx,C<br />
int 21h<br />
ret<br />
belowZEROC: call pBelowZERO<br />
add C,cl<br />
sub C, 30h<br />
ret<br />
qtyC endp</p>
<p>qtyD proc<br />
mov cl, al<br />
mov ah,2<br />
mov bh,0<br />
mov dl,38<br />
mov dh,4<br />
int 10h<br />
cmp D,30h    ;30h is 0<br />
jb belowZEROD</p>
<p>mov ah,9<br />
lea dx,D<br />
int 21h<br />
ret<br />
belowZEROD: call pBelowZERO<br />
add D,cl<br />
sub D,30h<br />
ret<br />
qtyD endp</p>
<p>;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
pBelowZERO proc<br />
mov ah,2<br />
mov bh,0<br />
mov dl,4<br />
mov dh,13<br />
int 10h<br />
mov ah,9<br />
lea dx,vBelowZERO<br />
int 21h<br />
ret<br />
pBelowZERO endp</p>
<p>clrError proc<br />
mov ah,2<br />
mov bh,0<br />
mov dl,1<br />
mov dh,13<br />
int 10h<br />
mov ah,9<br />
lea dx, spacer1<br />
int 21h<br />
ret<br />
clrError endp</p>
<p>tryAgainCursor proc<br />
mov ah,2<br />
mov bh,0<br />
mov dl,39<br />
mov dh,11<br />
int 10h<br />
ret<br />
tryAgainCursor endp</p>
<p>qtyCursor proc<br />
mov ah,2<br />
mov bh,0<br />
mov dl,17<br />
mov dh,11<br />
int 10h<br />
ret<br />
qtyCursor endp</p>
<p>input proc<br />
mov ah,1<br />
int 21h<br />
ret<br />
input endp</p>
<p>buyCursor proc<br />
mov ah,2<br />
mov bh,0<br />
mov dl,7<br />
mov dh,11<br />
int 10h<br />
ret<br />
buyCursor endp</p>
<p>dispMenu proc<br />
mov ah,9<br />
lea dx,m01<br />
int 21h<br />
lea dx,m02<br />
int 21h<br />
lea dx,m03<br />
int 21h<br />
lea dx,m04<br />
int 21h<br />
lea dx,m05<br />
int 21h<br />
lea dx,m06<br />
int 21h<br />
lea dx,m07<br />
int 21h<br />
lea dx,m08<br />
int 21h<br />
lea dx,m09<br />
int 21h<br />
lea dx,m10<br />
int 21h<br />
lea dx,m11<br />
int 21h<br />
lea dx,m12<br />
int 21h<br />
lea dx,m13<br />
int 21h<br />
lea dx,m14<br />
int 21h<br />
lea dx,m15<br />
int 21h<br />
lea dx,m16<br />
int 21h<br />
ret<br />
dispMenu endp</p>
<p>exit:<br />
;&#8212;-Coded by Catzie Keng of http://catzie.net<br />
int 20h<br />
main endp<br />
end s
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.catzie.net/assembly-language-a-simple-shop-store-program/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Assembly Language: check if a one-digit input number is odd or even</title>
		<link>http://blog.catzie.net/assembly-language-check-if-a-one-digit-input-number-is-odd-or-even/</link>
		<comments>http://blog.catzie.net/assembly-language-check-if-a-one-digit-input-number-is-odd-or-even/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 14:54:25 +0000</pubDate>
		<dc:creator>Catzie</dc:creator>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[assembly language]]></category>
		<category><![CDATA[odd or even number]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[source code]]></category>

		<guid isPermaLink="false">http://blog.catzie.net/?p=62</guid>
		<description><![CDATA[I coded this back when I was taking up Computer System Organization. It was a homework that I decided to share in my old blog. The program accepts a one-digit number as the input, and then shows whether that number is ODD or EVEN. The program uses the attribute byte to highlight ODD or EVEN [...]]]></description>
			<content:encoded><![CDATA[<p><center><img src="http://img.photobucket.com/albums/v209/catzie/oe.jpg" alt="assembly programming odd even number" /></center></p>
<p>I coded this back when I was taking up Computer System Organization. It was a homework that I decided to share in my old blog.</p>
<p>The program accepts a one-digit number as the input, and then shows whether that number is ODD or EVEN.</p>
<p>The program uses the attribute byte to highlight ODD or EVEN with a color.<br />
<span id="more-62"></span></p>
<div class="code">
;&#8212;Program coded by Catzie Keng of http://catzie.net</p>
<p>.model small<br />
.code<br />
org 100h</p>
<p>start: jmp main</p>
<p>;&#8212;&#8212;&#8211; VARS &#8212;&#8212;&#8212;<br />
header db &#8220;Input a number (0-9): $&#8221;<br />
footer db &#8220;Press Q to quit.$&#8221;<br />
vOdd db &#8220;O D D $&#8221;<br />
vEven db &#8220;E V E N $&#8221;</p>
<p>main proc near<br />
	mov ax,03			;clear screen<br />
	int 10h</p>
<p>repeat:<br />
	call cursor			;header<br />
	mov dl,0<br />
	mov dh,0<br />
	int 10h<br />
	mov ah,9<br />
	lea dx,header<br />
	int 21h</p>
<p>	call cursor 		;footer<br />
	mov dl,4<br />
	mov dh,8<br />
	int 10h<br />
	mov ah,9<br />
	lea dx,footer<br />
	int 21h</p>
<p>	call dispODD<br />
	call dispEVEN</p>
<p>	call cursor		;input<br />
	mov dl,23<br />
	mov dh,0<br />
	int 10h<br />
	call input</p>
<p>	cmp al,30h		;0<br />
	je pEven<br />
	cmp al,31h		;1<br />
	je pOdd<br />
	cmp al,32h		;2<br />
	je pEven<br />
	cmp al,33h		;3<br />
	je pOdd<br />
	cmp al,34h		;4<br />
	je pEven<br />
	cmp al,35h		;5<br />
	je pOdd<br />
	cmp al,36h		;6<br />
	je pEven<br />
	cmp al,37h		;7<br />
	je pOdd<br />
	cmp al,38h		;8<br />
	je pEven<br />
	cmp al,39h		;9<br />
	je pOdd<br />
	cmp al,&#8217;Q&#8217;<br />
	je terminate<br />
	cmp al,&#8217;q&#8217;<br />
	je terminate</p>
<p>	pEven:<br />
		call prEven<br />
		jmp repeat<br />
		call exit</p>
<p>	pOdd:<br />
		call prOdd<br />
		jmp repeat<br />
		call exit</p>
<p>	terminate:<br />
		call endCursor<br />
		call exit</p>
<p>	dispODD proc<br />
		call cursor			;display ODD<br />
		mov dl,10<br />
		mov dh,3<br />
		int 10h<br />
		mov ah,9<br />
		lea dx,vOdd<br />
		int 21h<br />
		ret<br />
	dispODD endp</p>
<p>	dispEVEN proc<br />
		call cursor			;display EVEN<br />
		mov dl,9<br />
		mov dh,5<br />
		int 10h<br />
		mov ah,9<br />
		lea dx,vEven<br />
		int 21h<br />
		ret<br />
	dispEVEN endp	</p>
<p>	prEven proc<br />
		mov al,&#8217; &#8216;<br />
		mov cx,1<br />
		mov bl,2fh<br />
		mov dh,5<br />
		x:	mov dl,8<br />
			mov ah,2<br />
			int 10h<br />
			push cx<br />
			mov ah,9<br />
			mov cx,9<br />
			int 10h<br />
			pop cx<br />
			inc dh<br />
			loop x<br />
		call dispEVEN</p>
<p>		mov al,&#8217; &#8216;				;cover odd<br />
		mov cx,1<br />
		mov bl,07h<br />
		mov dh,3<br />
		a: 	mov dl,8<br />
			mov ah,2<br />
			int 10h<br />
			push cx<br />
			mov ah,9<br />
			mov cx,9<br />
			int 10h<br />
			pop cx<br />
			inc dh<br />
			loop a<br />
		call dispODD<br />
		ret<br />
	prEven endp</p>
<p>	prOdd proc<br />
		mov al,&#8217; &#8216;<br />
		mov cx,1<br />
		mov bl,2fh<br />
		mov dh,3<br />
		y:	mov dl,8<br />
			mov ah,2<br />
			int 10h<br />
			push cx<br />
			mov ah,9<br />
			mov cx,9<br />
			int 10h<br />
			pop cx<br />
			inc dh<br />
			loop y<br />
		call dispODD	</p>
<p>		mov al,&#8217; &#8216;				;cover even<br />
		mov cx,1<br />
		mov bl,07h<br />
		mov dh,5<br />
		b: 	mov dl,8<br />
			mov ah,2<br />
			int 10h<br />
			push cx<br />
			mov ah,9<br />
			mov cx,9<br />
			int 10h<br />
			pop cx<br />
			inc dh<br />
			loop b<br />
		call dispEVEN<br />
		ret<br />
	prOdd endp<br />
main endp</p>
<p>;&#8212;Program coded by Catzie Keng of http://catzie.net</p>
<p>cursor proc<br />
	mov ah,2<br />
	mov bh,0<br />
	ret<br />
cursor endp</p>
<p>input proc<br />
	mov ah,1<br />
	int 21h<br />
	ret<br />
input endp</p>
<p>endCursor proc<br />
	call cursor<br />
	mov dl,0<br />
	mov dh,15<br />
	int 10h<br />
endCursor endp</p>
<p>exit proc<br />
	int 20h<br />
exit endp</p>
<p>end start<br />
;&#8212;Program coded by Catzie Keng of http://catzie.net
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.catzie.net/assembly-language-check-if-a-one-digit-input-number-is-odd-or-even/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Free Download- Turbo Assembler Version 2.0, SideKick version 1.56, Turbo Link Version 3.0, PILOT.EXE</title>
		<link>http://blog.catzie.net/tasm-tlink-sk-pilot/</link>
		<comments>http://blog.catzie.net/tasm-tlink-sk-pilot/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 14:06:01 +0000</pubDate>
		<dc:creator>Catzie</dc:creator>
				<category><![CDATA[Assembly Language]]></category>
		<category><![CDATA[assembly language]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tasm]]></category>
		<category><![CDATA[turbo assembler]]></category>

		<guid isPermaLink="false">http://blog.catzie.net/?p=31</guid>
		<description><![CDATA[contents of the zipped file: SK.COM SideKick version 1.56 Copyright © 1884-85 BORLAND Inc. PILOT.EXE PC – PILOT (Programmer’s Pop-Up) Freeware written by Tom Grubbe Edited by The Geographix Corporation. TLINK.EXE Turbo Link Version 3.0 Copyright © 1987-1990 Borland International TASM.EXE Turbo Assembler Version 2.0 Copyright © 1988-1990 Borland International Sample Source Code # 1 [...]]]></description>
			<content:encoded><![CDATA[<h3>contents of the zipped file:</h3>
<p>SK.COM<br />
SideKick version 1.56<br />
Copyright © 1884-85 BORLAND Inc.</p>
<p>PILOT.EXE<br />
PC – PILOT (Programmer’s Pop-Up)<br />
Freeware written by Tom Grubbe<br />
Edited by The Geographix Corporation.</p>
<p>TLINK.EXE<br />
Turbo Link Version 3.0<br />
Copyright © 1987-1990 Borland International</p>
<p>TASM.EXE<br />
Turbo Assembler Version 2.0<br />
Copyright © 1988-1990 Borland International<br />
<span id="more-31"></span><br />
<a class="downloadlink" href="http://blog.catzie.net/download/8" title=" downloaded 3920 times" >Turbo Assembler Version 2.0, SideKick version 1.56, Turbo Link Version 3.0, PILOT.EXE (3920)</a></p>
<p>Sample Source Code # 1</p>
<p>.model small<br />
.code<br />
org 100h<br />
;Coded by Catzie Keng of http://catzie.net<br />
start:<br />
mov ah,2<br />
mov dl,&#8217;A&#8217;<br />
x: int 21h<br />
inc dl<br />
mov bh, dl<br />
mov dl, 10<br />
int 21h<br />
mov dl, 13<br />
int 21h<br />
mov dl, bh<br />
cmp dl,&#8217;Z&#8217;<br />
jna x<br />
int 20h<br />
end start<br />
;Coded by Catzie Keng of http://catzie.net</p>
<p>Sample Source Code # 2</p>
<p>.model small<br />
.code<br />
org 100h<br />
;Coded by Catzie Keng of http://catzie.net<br />
start:</p>
<p>mov ax,03<br />
int 10h</p>
<p>mov ah,1<br />
int 21h<br />
mov bl,al</p>
<p>mov ah,1<br />
int 21h<br />
mov bh,al</p>
<p>mov ah,1<br />
int 21h<br />
mov ch,al</p>
<p>mov ah,2<br />
mov dl,10<br />
int 21h</p>
<p>mov dl,13<br />
int 21h</p>
<p>mov dl,ch<br />
int 21h</p>
<p>mov dl,bh<br />
int 21h</p>
<p>mov dl,bl<br />
int 21h</p>
<p>int 20h</p>
<p>end start<br />
;Coded by Catzie Keng of http://poochycat.com</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.catzie.net/tasm-tlink-sk-pilot/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

