Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: COMMODORE 8032 FORTH Message-ID: <769.UUL1.3#5129@willett.UUCP> Date: 14 Apr 90 03:24:15 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 38 Date: 04-12-90 (05:54) Number: 3113 (Echo) To: CHARLIE HITSELBERGER Refer#: 3100 From: RANDY LAWRENCE Read: NO Subj: BLAZIN' FORTH FOR C64 Status: PUBLIC MESSAGE |offset number, in the range 0...169, I need to return a track/sector |pair. For instance, 0 yields 1/0, 1 yields 1/4, etc... you might try converting blocks to virtual sectors: 4 CONSTANT SECTORS/BLOCK : >VIRTUAL // BLOCKS TO VIRTUAL SECTORS SECTORS/BLOCK * ; I calculate that block 90 starts at track 17 sector 20, which is the start of the 3 sectors you would like to skip. What I would do is add 3 to the virtual sector number if we are above block 89; : CORRECT // virtual-sectors -- corrected-virtual-sectors DUP [ 89 >VIRTUAL ] LITERAL > IF 3 + THEN ; Then convert the virtual sectors to pysical tracks and sectors. Your final track and sector mapping word might look something like this: : >T&S // -- track sector BLK @ >VIRTUAL CORRECT >PYSICAL ; I hope this gives you an idea or two. BCNU, Randy Lawrence KA7WAG --- ~ EZ 1.27 ~ blah! blah! blah! ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'