Turbo Assembler	 Version 2.0	    13/12/11 10:48:36	    Page 1
last.ASM



      1				     lab MACRO row,col,num
      2				     push dx
      3				     mov ax,0600h
      4				     mov bh,07
      5				     mov cx,0000
      6				     mov dx,184fh
      7				     int 10h
      8				     pop dx
      9
     10				     mov bh,00
     11
     12				     mov ah,row
     13				     mov al,col
     14
     15				     and al,000fh
     16				     and ah,000fh
     17				     mov dh,ah
     18				     mov dl,al
     19
     20				     mov ah,02
     21				     mov al,0
     22				     int 10h
     23				     mov dx,num
     24				     mov ah,2
     25				     int 21h
     26				     ENDM
     27
     28	0000			     data segment
     29	0000  0000		     n dw (?)
     30	0002  45 6E 74 65 72 20	72+  char1 db "Enter row$"
     31	      6F 77 24
     32	000C  45 6E 74 65 72 20	63+  char2 db "Enter col$"
     33	      6F 6C 24
     34	0016  45 6E 74 65 72 20	6E+  char3 db "Enter num$"
     35	      75 6D 24
     36	0020			     data ends
     37
     38	0000			     store segment stack
     39	0000  80*(??)		     db	128 dup(?)
     40	0080			     store ends
     41
     42	0000			     code segment
     43				     assume cs:code,ds:data,ss:store
     44	0000			     start proc
     45	0000  B8 0000s		     mov ax, data
     46	0003  8E D8		     mov ds,ax
     47
     48	0005  BA 0002r		     mov dx, offset char1
     49	0008  B4 09		     mov ah, 9
     50	000A  CD 21		     int 21h
     51	000C  B4 02		     mov ah,2
     52	000E  B2 0A		     mov dl,10
     53	0010  CD 21		     int 21h
     54
     55	0012  B4 01		     mov ah,1
     56	0014  CD 21		     int 21h
     57	0016  8A F0		     mov dh,al
Turbo Assembler	 Version 2.0	    13/12/11 10:48:36	    Page 2
last.ASM



     58
     59	0018  52		     push dx
     60	0019  B4 02		     mov ah,2
     61	001B  B2 0A		     mov dl,10
     62	001D  CD 21		     int 21h
     63	001F  BA 000Cr		     mov dx, offset char2
     64	0022  B4 09		     mov ah, 9
     65	0024  CD 21		     int 21h
     66	0026  B4 02		     mov ah,2
     67	0028  B2 0A		     mov dl,10
     68	002A  CD 21		     int 21h
     69	002C  5A		     pop dx
     70	002D  B4 01		     mov ah,1
     71	002F  CD 21		     int 21h
     72	0031  8A D0		     mov dl,al
     73
     74	0033  52		     push dx
     75	0034  B4 02		     mov ah,2
     76	0036  B2 0A		     mov dl,10
     77	0038  CD 21		     int 21h
     78	003A  BA 0016r		     mov dx, offset char3
     79	003D  B4 09		     mov ah, 9
     80	003F  CD 21		     int 21h
     81	0041  B4 02		     mov ah,2
     82	0043  B2 0A		     mov dl,10
     83	0045  CD 21		     int 21h
     84	0047  5A		     pop dx
     85	0048  B4 01		     mov ah,1
     86	004A  CD 21		     int 21h
     87	004C  B4 00		     mov ah,0
     88	004E  A3 0000r		     mov n,ax
     89
     90				     lab dh,dl,n
1    91	0051  52		     push dx
1    92	0052  B8 0600		     mov ax,0600h
1    93	0055  B7 07		     mov bh,07
1    94	0057  B9 0000		     mov cx,0000
1    95	005A  BA 184F		     mov dx,184fh
1    96	005D  CD 10		     int 10h
1    97	005F  5A		     pop dx
1    98	0060  B7 00		     mov bh,00
1    99	0062  8A E6		     mov ah,dh
1   100	0064  8A C2		     mov al,dl
1   101	0066  24 0F		     and al,000fh
1   102	0068  80 E4 0F		     and ah,000fh
1   103	006B  8A F4		     mov dh,ah
1   104	006D  8A D0		     mov dl,al
1   105	006F  B4 02		     mov ah,02
1   106	0071  B0 00		     mov al,0
1   107	0073  CD 10		     int 10h
1   108	0075  8B 16 0000r	     mov dx,n
1   109	0079  B4 02		     mov ah,2
1   110	007B  CD 21		     int 21h
    111
    112	007D  B4 01		     mov ah,1
    113	007F  CD 21		     int 21h
    114
Turbo Assembler	 Version 2.0	    13/12/11 10:48:36	    Page 3
last.ASM



    115	0081  B4 4C		     mov ah,4ch
    116	0083  CD 21		     int 21h
    117	0085  CB		     retf
    118	0086			     start endp
    119	0086			     code ends
    120				     end start
Turbo Assembler	 Version 2.0	    13/12/11 10:48:36	    Page 4
Symbol Table




Symbol Name			  Type	 Value

??DATE				  Text	 "13/12/11"
??FILENAME			  Text	 "last	  "
??TIME				  Text	 "10:48:36"
??VERSION			  Number 0200
@CPU				  Text	 0101H
@CURSEG				  Text	 CODE
@FILENAME			  Text	 LAST
@WORDSIZE			  Text	 2
CHAR1				  Byte	 DATA:0002
CHAR2				  Byte	 DATA:000C
CHAR3				  Byte	 DATA:0016
N				  Word	 DATA:0000
START				  Near	 CODE:0000

Macro Name

LAB

Groups & Segments		  Bit Size Align  Combine Class

CODE				  16  0086 Para	  none
DATA				  16  0020 Para	  none
STORE				  16  0080 Para	  Stack
