Re: Two questions!: Scroll for Files

1999-10-25 Thread Manuel Bilderbeek

Hi Daniel! (And the other MSX users as well! :-)

I tried your program (SCROLL.BIN) to 'rotate' those filenames on the screen. 
Well, it works, but not all the time... :-|

Sometimes it works as it should, and other times the screen (0) is almost 
totally filled with the same character (I think it was something like an '=' 
character). When it goes wrong, the filling with the character happens very 
slowly and in a very irregular way. Sometimes, if I run it again, it does 
work.. I haven't been able to determine any condition for it to work. I use it 
similar to this way:

10 POKE HF3b0,78
20 FILES
30 BLOAD"SCROLL.BIN",R
40 POKE HF3B0,80

Grtjs, Manuel ((m)ICQ UIN 41947405)

PS: MSX 4 EVER! (Questions? See: http://www.faq.msxnet.org/)
PPS: Visit my homepage at http://www.sci.kun.nl/marie/home/manuelbi/ 




MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)




Re: Two questions!: Scroll for Files

1999-10-25 Thread Daniel Jorge Caetano

On Mon, 25 Oct 1999 10:45:02 +0200, Manuel Bilderbeek wrote:

Hi Daniel! (And the other MSX users as well! :-)
I tried your program (SCROLL.BIN) to 'rotate' those filenames on the screen. 
Well, it works, but not all the time... :-|
Sometimes it works as it should, and other times the screen (0) is almost 
totally filled with the same character (I think it was something like an '=' 
character). When it goes wrong, the filling with the character happens very 
slowly and in a very irregular way. Sometimes, if I run it again, it does 
work.. I haven't been able to determine any condition for it to work. I use it 
similar to this way:
(...)

  Maybe there is some bug in the program. I'll look for it ASAP... (-: I post
the results here.

 []'s Daniel Caetano ([EMAIL PROTECTED])

...Why look thru Windows? Open the door to the future: OS/2
OS/2 Sites: http://www.os2brasil.com.br/novidades/
http://www.os2brasil.com.br/novidades/drivers.shtml
http://www.geocities.com/SiliconValley/8752/os2hp/os2index.html
MSX Sites:  http://www.fudeba.cjb.net/ e http://www.msxnews.cjb.net/
MSX Phoenix:http://www.msxphoenix.cjb.net/



MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)




Re: Two questions!: Scroll for Files

1999-10-11 Thread Daniel Jorge Caetano

On Mon, 11 Oct 1999 17:36:58 +0200, Manuel Bilderbeek wrote:

 So, you can "rotate
 left"
 16 characters all contents, instead of copy the last two positions to the
 first
 two.
This is brilliant! I should shift the VRAM contents 16 bytes (actually more, 
since there's also some characters between 2 filenames (actually dirnames)) 
to the left... But then again: it is probably going wrong because of things 
 like WIDTH... Or isn't it? (And I'd need some kind of COPY routine for 
 screen 0 in VRAM...)
By the way: the width is NOT 80. The program first pokes a width 78 (or so), 
 then executes the FILES command, then pokes the width to 80 again and then 
 it 'draws' (with those line-characters) a rectangular around the files. At 
 least, that's how I remember it.

  I was looking on the VRAM using BrMSX... Well, the width have no changes
on how VRAM is treated (if you are always above 40 columns, of course). The
only changes is where you can write, but the memory remains on the same way
(at least, what I saw is the memory work just like if we have 80 columns /-:)
The only change is that some spaces are put before and after the "real" screen.

  Well... I'd done a little (and fast) routine using only LDIRVM and LDIRMV,
it runs on the address E800h (you can change this) and do the job ONLY when
on 78 characters (there is some changes on the numbers if you use a different
# of columns). It works also based on the Ok response. If you clear the OK
before execute the routine, all the screen will be rotated. The sequence should
be:

  BLOAD "SCROLL.BIN"
  DEFUSR=HE800
  WIDTH(78)
  FILES
  A=USR(0)
 
  And then change columns numbers and draw everything. When using FILES 
inside a program, the Ok will not appear, so, ALL the screen will be 
"switched". If you want to avoid it, just write:

  BLOAD "SCROLL.BIN"
  DEFUSR=HE800
  WIDTH(78)
  FILES
  PRINT " "
  A=USR(0)

  And when the routine finds a name ended started with space it will
stop.
  Well, you can optimize it if you want, but I just think you shoud disable
the screen while printing, because its fast, but causes an unconfortable 
sensation.

  The routine for CL80 for MSDOS is below. Just compile it using
CL80 and then remove the three first bytes, and rename it to something
.BIN. Attached is the compiled version also, ready to be loaded.



B_DCOMPREQU 00020h
B_LDIRVMEQU 0005Ch
B_LDIRMVEQU 00059h
B_ERAFNKEQU 000CCh
B_FILVRMEQU 00056h

.z80


.PHASE 0E800h-7
START:

DB  0FEh
DW  START1
DW  START1END
DW  START1

START1:
CALLB_ERAFNK
LD  HL,1*80 ; initial line*80
; Line 0 is "x:\path" line
PUSHHL
PUSHHL
PUSHHL
PUSHHL
; Comeca o LDIR
LDIRA:
LD  DE,26   ;(position in the line)
ADD HL,DE   ; Arrange VRAM address
LD  DE,WORK ; Points RAM buffer address
LD  BC,53   ; Number of characters
CALLB_LDIRMV; Go!
POP DE  ; Recall line initial address
LD  HL,WORK ; Points to RAM buffer address
LD  BC,53   ; Number of characters
CALLB_LDIRVM; Go!
POP HL  ; Recall line initial address
LD  DE,80   ; Points to the 1st char on the next line
ADD HL,DE
LD  DE,24*80; (number of lines*80)
CALLB_DCOMPR; Copare...
JP  Z,BACKENDSCR; Back to basic if equal (25th line)
LD  DE,WORK ; Points buffer
LD  BC,26   ; Number of characters
CALLB_LDIRMV; Go!
LD  A,(WORK+1)  ; (geth the 2nd letter)
CP  ' ' ; Verify end of dir (espaco)
JP  Z,BACKOK; Get out
LD  A,(WORK+2)  ; (get 3rd letter)
CP  'k' ; Verify if it is k (from Ok)
JP  Z,BACKOK; If it is, get out!
POP HL  ; Recall line initial Address
LD  DE,52   ; Points to destination on line
ADD HL,DE
EX  DE,HL
LD  HL,WORK ; Points buffer
LD  BC,26   ; Number of characters
CALLB_LDIRVM; Go!... Line ready.
POP HL  ; Gets line initial Address
LD  DE,80   ; Indicates number of characters in line
ADD HL,DE   ; Points to the second line
PUSHHL
PUSHHL
PUSHHL
PUSHHL
JP  LDIRA   

BACKOK:
POP HL  ; Get address of line
LD  DE,52   ; Points to destination on line
ADD HL,DE
LD  A,' '   ; write spaces
LD  BC,26