Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
please help me with pixel plus 256
#1
please help me with putting a pixel plus file into a qbasic file:
can some one please edit this code so it works
i found it on a post...

'start
DEFINT A-Z
SUB HARloadPut (FileName$, Array() AS INTEGER)
l& = 0
FF= FREEFILE
OPEN FileName$ FOR BINARY AS #FF
l& = LOF(FF)
CLOSE #FF
Ints = (l& - 7) \ 2
$DYNAMIC
REDIM Array(Ints) AS INTEGER
DEF SEG = VARSEG(Array(0))
BLOAD FileName$, 0
DEF SEG
END SUB

SCREEN 13
DIM MyArray(0) AS INTEGER
HARloadPut "c:\pp256\images\hero.PUT", MyArray()
PUT (0,0), MyArray, PSET
'end



thanks in advance Big Grin
aRdEeP
Reply
#2
Add a comment character before the $DYNAMIC metacommand. This should work:
Code:
'start
DEFINT A-Z
SUB HARloadPut (FileName$, Array() AS INTEGER)
l& = 0
FF= FREEFILE
OPEN FileName$ FOR BINARY AS #FF
l& = LOF(FF)
CLOSE #FF
Ints = (l& - 7) \ 2
'$DYNAMIC
REDIM Array(Ints) AS INTEGER
DEF SEG = VARSEG(Array(0))
BLOAD FileName$, 0
DEF SEG
END SUB

SCREEN 13
'$DYNAMIC
DIM MyArray(0) AS INTEGER
HARloadPut "c:\pp256\images\hero.PUT", MyArray()
PUT (0,0), MyArray, PSET
'end
Reply
#3
Big Grin it works thank you so much Big Grin
aRdEeP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)