Search

sample sub menu of assembly w/ colors, color box, color txt,sub menu. etc.

;color box

model small.stack 100h.data
;----------------------------------------------------------------------------msg db " STORE INVENTORY" db 0Dh,0Ah,0Ah," [1]can goods [2]softdrinks" db 0Dh,0Ah,0Ah," [3]rices [4]noodles" db 0Dh,0Ah,0Ah," [0] exit $",0Ah cangoods_sub1 db " CAN GOODS" db 0Dh,0Ah,0Ah," 555 TUNA CENTURY TUNA" db 0Dh,0Ah,0Ah," CORNBEEF FAMILY BRAND SARDINES" db 0Dh,0Ah,0Ah," ----------------------------------------$",0Ah softdrinks_sub1 db " SOFTDRINKS" db 0Dh,0Ah,0Ah," COKE 7 UP" db 0Dh,0Ah,0Ah," PEPSI SPRITE" db 0Dh,0Ah,0Ah," ----------------------------------------$",0Ah rices_sub1 db " RICES" db 0Dh,0Ah,0Ah," BALIKATAN WHITE CORN" db 0Dh,0Ah,0Ah," NFA YELLOW CORN" db 0Dh,0Ah,0Ah," ----------------------------------------$",0Ah noodles_sub1 db " NOODLES" db 0Dh,0Ah,0Ah," LUCKY ME MAMI MAGGI" db 0Dh,0Ah,0Ah," PANCIT CANTON LOMI NOODLES" db 0Dh,0Ah,0Ah," ----------------------------------------$",0Ah ;-----------------------------------------------------------------------------sub2 db " [1] BACK TO MAIN MENU [2] DETAILS" db 0Dh,0Ah,0Ah," ----------------------------------------$",0Ah ;----------------------------------------------------------------------------detail db " EXPIRATION" db 0Dh,0Ah,0Ah," DATE EXPIRE ITEM" db 0Dh,0Ah,0Ah," jan 6,2010 LOMI NOODLES" db 0Dh,0Ah,0Ah," jun 13,2012 555 TUNA" db 0Dh,0Ah,0Ah," dec 25,2009 7 UP" db 0Dh,0Ah,0Ah," feb 6,2029 CENTURY TUNA" db 0Dh,0Ah,0Ah," ----------------------------------------" db 0Dh,0Ah,0Ah," press any key to back to main menu$",0Ah ;-----------------------------------------------------------------------------input db "Enter your choice:$";---------------------------
pawala db "error input$";--------------------------.codestart:
;--------------------clear screenmov ax, 0600hmov bh,07hmov cx,0000hmov dx,184fhint 10h;-------------------first box colorcall box_color;---------------------------
mov ax,@datamov ds,ax
;----------cursor location sa box
mov dh,2mov dl,26mov ah,02hxor bh,bhint 10hmov dx,offset msgmov ah,09hint 21h
mov dh,13mov dl,28mov ah,02hxor bh,bhint 10hmov dx,offset inputmov ah,09hint 21h
;----------cursor location sa txtmov dh,13mov dl,46mov ah,02hxor bh,bhint 10h
;----------------------inputmov ah, 01hint 21hmov dl,al
;----------------------enterxor ah,ahint 16h
;----------------akong if elsecmp dl, '1'je one1
cmp dl, '2'je two2
cmp dl, '3'je three3
cmp dl, '4'je four4cmp dl, '0'je humann
cmp dl, '0'jne start;---------------------------one1:call onetwo2:call twothree3:call threefour4:call fourhumann:call human;---------------------------one:call clrcall box_colormov dh,2mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset cangoods_sub1mov ah, 09hint 21hmov dh,9mov dl,20mov ah,02hxor bh,bhint 10hmov dx, offset sub2mov ah, 09hint 21hmov dh,13mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset inputmov ah, 09hint 21h
;--------------------------input charmov ah, 01hint 21hmov dl,al
xor ah,ahint 16h;------------------------------------ if elsecmp dl, '1'je back2cmp dl, '2'je detaill2jne one;---------------------------------back2:call startdetaill2:call clrcall box_colorcall detalyecall input_key;------------------------------
two:call clrcall box_colormov dh,2mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset softdrinks_sub1mov ah, 09hint 21hmov dh,9mov dl,20mov ah,02hxor bh,bhint 10hmov dx, offset sub2mov ah, 09hint 21hmov dh,13mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset inputmov ah, 09hint 21h;--------------------------input charmov ah, 01hint 21hmov dl,alxor ah,ahint 16h;------------------------------------ if elsecmp dl, '1'je back3cmp dl, '2'je detaill3jne two;---------------------------------back3:call startdetaill3:call clrcall box_colorcall detalyecall input_key;----------------------------------three:call clrcall box_colormov dh,2mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset rices_sub1mov ah, 09hint 21hmov dh,9mov dl,20mov ah,02hxor bh,bhint 10hmov dx, offset sub2mov ah, 09hint 21hmov dh,13mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset inputmov ah, 09hint 21h;--------------------------input charmov ah, 01hint 21hmov dl,al
xor ah,ahint 16h;------------------------------------ if elsecmp dl, '1'je back4cmp dl, '2'je detaill4jne three;---------------------------------back4:call startdetaill4:call clrcall box_colorcall detalyecall input_key;---------------------------------------four:call clrcall box_colormov dh,2mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset noodles_sub1mov ah, 09hint 21hmov dh,9mov dl,20mov ah,02hxor bh,bhint 10hmov dx, offset sub2mov ah, 09hint 21hmov dh,13mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset inputmov ah, 09hint 21h;--------------------------input charmov ah, 01hint 21hmov dl,al
xor ah,ahint 16h;------------------------------------ if elsecmp dl, '1'je back5cmp dl, '2'je detaill5jne four;---------------------------------back5:call startdetaill5:call clrcall box_colorcall detalyecall input_key;--------------------------------------------exit:call clrcall box_colormov dh,2mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset pawalamov ah, 09hint 21hcall human
;-----------------sa clear screenclr: mov ax, 0600hmov bh,07hmov cx,0000hmov dx,184fhint 10hret
cr_loc:;----------cursor location ;sa boxmov dh,20mov dl,26mov ah,02hxor bh,bhint 10hret
input_key:;----------------------inputmov ah, 01hint 21hmov dl,alcall start
box_color:;-----------------box color
mov ax, 0600h ;constantmov bh, 34h ;-------- color first color/ mov cx,0010h ;sinugdan size left sizemov dx,1043h ;--------size sa first color/main color sa right side ra ni------ ang 2c15h= ang 2 ky x2 ang pic boxint 10hret
;mov ax, 0600h;mov bh, 34h;mov cx,1019h;mov dx,1c25h;int 10h;ret;----------------------------detalye:mov dh,2mov dl,26mov ah,02hxor bh,bhint 10hmov dx, offset detailmov ah, 09hint 21hret;---------------sa terminatehuman: mov ax, 4c00hint 21h
end start

0 comments: