Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!amdahl!dwl10 From: dwl10@amdahl.uts.amdahl.com (Dave Lowrey) Newsgroups: comp.sys.cbm Subject: 1541 coding question Message-ID: <24611@amdahl.uts.amdahl.com> Date: 14 Mar 88 17:17:07 GMT Organization: Amdahl Corporation, Houston TX Lines: 42 Keywords: 1541 rom I have a question regarding 1541 programming. I have been studying the ROM listings, and examples of programming the 1541 yourself, and have come upon an interesting bit of code that I don't fully understand. The scenerio is that we are in "Executed" code (JOB code 0xe0), and have JSR'ed to a subroutine that finds a header for a specific sector. Upon return from the subroutine, the following code is executed: (Note...addresses are not actual addresses from the ROM) c100 CLV c101 BVC $c101 .. .. .. I assume that the disk controller interrupts the 6502 when "something" happens, and the IRQ/NMI interrupt handeler sets the Overflow flag, so our "endless" loop ends. My question is: exactly why/when is the oveflow flag set, and who is setting it? There are several occurances of this code in the ROM. I also have sample programs from a book that do this, with the comments such as "Wait for header" and "wait for data". I would like specific info on what is happening here. Thanks..... -- ------------------------------------------------------------------- "Familiarity breeds attempt" Dave Lowrey Amdahl Corp. Houston, Texas (713)-850-8828 ...!{ihnp4,cbosgd,hplabs,oliveb}!amdahl!dwl10 [ The opinions expressed be those of the author and not necessarily those of his most eminent employer. ]