Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old April 1st, 2007, 12:28 AM
aman19886 aman19886 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 3 aman19886 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 37 sec
Reputation Power: 0
Can You Please help me in this code

HI I hv the 32 bitmapping code and I hv made the data segment portion of 16bit code but I dont know what things to change will be really appricate if you can help me Thanks in advance

____________________________________________________

page 60,132

;-----------------------------------------------------------------------
;stack segment

sseg segment para stack 'stack'
db 120 dup(?) ;reserve 120 bytes for the stack
sseg ends

;-----------------------------------------------------------------------
;constants

;Define your constants here (EQU)

;-----------------------------------------------------------------------
;data segment

dseg segment para 'data'

;Declare your variables here

;BITMAP POS 1


ORG 0
B1 Dw 0H,0H,1H,0H,7H,0C000H,0AH,0A000H,12H,9000H,11H,1000H,9H,2000H,1FH,0F000H,77H,0DC00H,3B5H,5B80H
B2 Dw 2ADH,6A80H,28DH,6280H,285H,4280H,287H,0C280H,284H,4280H,29BH,0B280H,391H,1380H,119H,3100H
B3 Dw 11H,1000H,11H,1000H,11H,1000H,1FH,0F000H,12H,9000H,3CH,7800H
ORG 400
B4 Dw 0H,0H,1H,0H,7H,0C000H,0AH,0A000H,12H,9000H,11H,1000H,9H,2000H,1FH,0F000H,77H,0DC00H,7FB5H,5BFCH
B5 Dw 0C0ADH,6A06H,7F8DH,63FCH,5H,4000H,7H,0C000H,4H,4000H,1BH,0B000H,11H,1000H,19H,3000H
B6 Dw 11H,1000H,11H,1000H,11H,1000H,1FH,0F000H,12H,9000H,3CH,7800H
ORG 800
B7 Dw 100H,100H,381H,380H,287H,0C280H,28AH,0A280H,292H,9280H,291H,1280H,289H,2280H,29FH,0F280H,2F7H,0DE80H ,3B5H,5B80H
B8 Dw 2DH,6800H,0DH,6000H,5H,4000H,7H,0C000H,4H,4000H,1BH,0B000H,11H,1000H,19H,3000H
B9 Dw 11H,1000H,11H,1000H,11H,1000H,1FH,0F000H,12H,9000H,3CH,7800H
ORG 1200
B10 Dw 0H,0H,1H,0H,7H,0C000H,0AH,0A000H,12H,9000H,11H,1000H,9H,2000H,1FH,0F000H,77H,0DC00H,7FB5H,5BFCH
B11 Dw 0C0ADH,6A06H,7F8DH,63FCH,5H,4000H,7H,0C000H,4H,4000H,1BH,0B000H,11H,1000H,19H,3000H
B12 Dw 11H,1000H,11H,1000H,11H,1000H,1FH,0F000H,12H,9000H,3CH,7800H

CyclePos DB 4
totalImage DB 4
distancer DW 400

dseg ends

;----------------------------------------------------------------------
;code segment
cseg segment para 'code'

main proc far ;this is the program entry point
assume cs:cseg, ds:dseg, ss:sseg
mov ax,dseg ;load the data segment value
mov ds,ax ;assign value to ds





;place your program instructions here





keyboard: CALL DELAYPROG
MOV AL, CyclePos
CMP AL, 8
JNE DoCall
MOV [CyclePos], 4
DoCall: CALL DrawBitmap
MOV AL, CyclePos
INC AL
MOV [CyclePos], AL


mov ah,1
int 16H
jz keyboard



mov ah,4Ch ;set up interupt
int 21h ;Interupt to return to DOS
main endp





;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
ClearSCR PROC
CALL DELAYPROG
MOV AH, 06
MOV AL, 00
MOV BH, 07
MOV CH, 00
MOV CL, 00
MOV DH, 24
MOV DL, 79
INT 10H
RET
ClearSCR ENDP
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++


;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
DELAYPROG PROC
MOV CX, 0FFF0H
HOLDnow: IN AL, 61H
AND AL, 10H
CMP AL, AH
JE HOLDnow
MOV AH, AL
LOOP HOLDnow
RET

DELAYPROG ENDP
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++




;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
DrawBitmap PROC
call ClearSCR

MOV AH, 0
MOV AL, CyclePos
DIV totalImage
MOV AL, AH
MOV AH, 0
MUL distancer


MOV SI, AX

MOV AX, 0B800H
MOV ES, AX
SUB BX, BX
MOV DI, BX
MOV CX, 48
MOV DL, '*'
MOV DH, 00001111B
MOV BX, 2
PUSH BX

begLine: MOV BX, 1000000000000000B


Begprint: MOV AX, [SI]
AND AX, BX
CMP AX, BX
JNE NoMatch
MOV ES:[DI], DX

NoMatch: ADD DI, 2
SHR BX, 1
CMP BX, 0
JE DoneLine
JMP Begprint
DoneLine: INC SI
INC SI
POP BX
DEC BX
PUSH BX
CMP BX, 0
JNZ SameLine
POP BX
MOV BX, 2
PUSH BX
ADD DI, 96 ;128
SameLine: LOOP begLine
POP BX
MOV DL, CyclePos
OR DL, 00110000B
MOV ES:[DI], DX
CALL DELAYPROG
RET
DrawBitmap ENDP
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++





cseg ends
end main ;Program exit point
____________________________________________________

This is the stuff I hv done so far

____________________________________________________

page 60,132

;-----------------------------------------------------------------------
;stack segment

sseg segment para stack 'stack'
db 120 dup(?) ;reserve 120 bytes for the stack
sseg ends

;-----------------------------------------------------------------------
;constants

;Define your constants here (EQU)

;-----------------------------------------------------------------------
;data segment

dseg segment para 'data'

;Declare your variables here
;BITMAP POS 1
ORG 0
B1 DW1 0380h,0440h,0820h,0440h,0380h,0100h,0100h,1FF8h,0100h,0280h,0440h,0820h
ORG 400
B2 DW2 0380h,0440h,0820h,0440h,0380h,1108h,1108h,1FF8h,0100h,0100h,0280h,0440h,0820h
0RG 800
B3 DW3 0380h,0440h,0820h,0440h,0380h,0100h,0100h,1FF1h,1108h,1288h,0440h,0820h

CyclePos DB 3
totalImage DB 3
distancer DW 400

dseg ends

;----------------------------------------------------------------------
;code segment
cseg segment para 'code'

main proc far ;this is the program entry point
assume cs:cseg, ds:dseg, ss:sseg
mov ax,dseg ;load the data segment value
mov ds,ax ;assign value to ds



;place your program instructions here

keyboard: CALL DELAYPROG
MOV AL, CyclePos
CMP AL, 6
JNE DoCall
MOV [CyclePos], 3
DoCall: CALL DrawBitmap
MOV AL, CyclePos
INC AL
MOV [CyclePos], AL


mov ah,1
int 16H
jz keyboard



mov ah,4Ch ;set up interupt
int 21h ;Interupt to return to DOS
main endp





;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
ClearSCR PROC
CALL DELAYPROG
MOV AH, 06
MOV AL, 00
MOV BH, 07
MOV CH, 00
MOV CL, 00
MOV DH, 24
MOV DL, 79
INT 10H
RET
ClearSCR ENDP
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++


;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
DELAYPROG PROC
MOV CX, 0FFF0H
HOLDnow: IN AL, 61H
AND AL, 10H
CMP AL, AH
JE HOLDnow
MOV AH, AL
LOOP HOLDnow
RET

DELAYPROG ENDP
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++




;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
DrawBitmap PROC
call ClearSCR

MOV AH, 0
MOV AL, CyclePos
DIV totalImage
MOV AL, AH
MOV AH, 0
MUL distancer


MOV SI, AX

MOV AX, 0B800H
MOV ES, AX
SUB BX, BX
MOV DI, BX
MOV CX, 48
MOV DL, '*'
MOV DH, 00001111B
MOV BX, 2
PUSH BX

begLine: MOV BX, 1000000000000000B


Begprint: MOV AX, [SI]
AND AX, BX
CMP AX, BX
JNE NoMatch
MOV ES:[DI], DX

NoMatch: ADD DI, 2
SHR BX, 1
CMP BX, 0
JE DoneLine
JMP Begprint
DoneLine: INC SI
INC SI
POP BX
DEC BX
PUSH BX
CMP BX, 0
JNZ SameLine
POP BX
MOV BX, 2
PUSH BX
ADD DI, 96 ;128
SameLine: LOOP begLine
POP BX
MOV DL, CyclePos
OR DL, 00110000B
MOV ES:[DI], DX
CALL DELAYPROG
RET
DrawBitmap ENDP
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++





cseg ends
end main ;Program exit point

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Can You Please help me in this code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway