News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
L

Easy Question

Started by LambdaMikel, 05:51, 12 February 19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LambdaMikel

 :D Alright, that should be easy for you folks - does anybody have a BASIC program at hand that can return the file size / length in bytes from the Amsdos header, for a given file on disk? I can't believe AMSDOS doesn't have such a basic |RSX command...
Thanks!  8)

AMSDOS

Quote from: LambdaMikel on 05:51, 12 February 19
:D Alright, that should be easy for you folks - does anybody have a BASIC program at hand that can return the file size / length in bytes from the Amsdos header, for a given file on disk? I can't believe AMSDOS doesn't have such a basic |RSX command...
Thanks!  8)


Just to clutter up more additional RAM space? There's a number of Header Reader routines floating around, Phil Howard has one in Insider Dealing in AA52 and AA53 Forum has an One Liner which returns the Start Location and Length which looks like this:



10 MEMORY &1FFF:INPUT"Filename:",a$:LOAD a$:st=VAL("&"+HEX$(PEEK(&A76B),2)+HEX$(PEEK(&A76A),2)):PRINT"Start location: &",HEX$(st,4):PRINT"Length: &",HEX$(PEEK(&A76E),2);HEX$(PEEK(&A76D),2:MEMORY st-1


* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

LambdaMikel

Quote from: AMSDOS on 08:40, 12 February 19

Just to clutter up more additional RAM space? There's a number of Header Reader routines floating around, Phil Howard has one in Insider Dealing in AA52 and AA53 Forum has an One Liner which returns the Start Location and Length which looks like this:



10 MEMORY &1FFF:INPUT"Filename:",a$:LOAD a$:st=VAL("&"+HEX$(PEEK(&A76B),2)+HEX$(PEEK(&A76A),2)):PRINT"Start location: &",HEX$(st,4):PRINT"Length: &",HEX$(PEEK(&A76E),2);HEX$(PEEK(&A76D),2:MEMORY st-1

Thanks! Just what I was looking for.

Powered by SMFPacks Menu Editor Mod