Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pur-phy.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!inuxc!pur-ee!CS-Mordred!Pucc-H:Physics:clt From: clt@pur-phy.UUCP (Carrick Talmadge) Newsgroups: net.micro.apple Subject: Re: Language cards . . . (6502) (long) Message-ID: <1360@pur-phy.UUCP> Date: Mon, 25-Jun-84 13:04:56 EDT Article-I.D.: pur-phy.1360 Posted: Mon Jun 25 13:04:56 1984 Date-Received: Thu, 28-Jun-84 02:33:29 EDT Organization: Purdue University Physics Dept. Lines: 105 [Take that, you filthy line eater!] This is a bit long, but I thought it might be of general interest... >How can you get the system let you write to the language card? > >I want to use it for a program and all I can manage to do is to load > int basic into it(not what I want!). Hopefully, the following will answer your questions: Memory Organization ------------------- The Ramcard has 16K of memory, but has an address space allowed for it (forgetting for the momment $C080-$C08F) of $D000-$FFFF, or 12K. To "fit" the entire ram address space into this area, two 4K segments of memory share the space from $D000-$DFFF. When you select either bank one or bank two, you automatically select one of the two 4K segments plus the other 8K from $E000-$FFFF. The figure below illustrates this. _________________ $FFFF | | | | | | | | |_______________| $F000 | | | | | | | | ________|_______________|________ $E000 | | | | | | | BANK 1 | BANK 2 | | | | |_______________|_______________| $D000 Ram Selection/Deselection ------------------------- ADDRESS Action $C080 Read-Deselect Ram(Enable Rom). Write protect Ram $C081 Read-Deselect Ram. Two sucessive Reads write enables Ram. $C082 Read-Deselect Ram(Enable Rom). Write protect Ram $C083 Read-Select Ram. Two sucessive Reads write enables Ram. $C084 (Decodes same as $C080). $C085 (Decodes same as $C081) $C086 (Decodes same as $C082). $C087 (Decodes same as $C083) $C088-$C08F Same action as (ADDRESS-8), except selects/deselects Bank 1 of Ram. Example: ; ; RAMSET ; Sets up ram card for usage. Note that it doesn't ; copy Basic Rom (excepting enough Rom for Hires graphics ; routines). ; RAMSET LDA $C081 LDA $C081 Enable Ramcard for writing ; ; Next a macro to move from,to,length ; This copies the Rom from $F300-$FFFF to ram ; MOV $F300,$F300,$D00 LDA $C083 LDA $C083 Finally fully enable second Bank of Ram ; (Read enable as well as write enable). -------------------- Source: What's Where in the Apple by W.F. Luebbert (Micro Ink) Notice than you should use reads, rather than writes, as the latter will give unpredictable results (a write will select a memory location twice, but in rapid sucession, so that the ramcard will notice two address selections only part of the time). Hope this helps some. Carrick Talmadge UUCP: {decvax,ucbvax,harpo,allegra,inuxc,seismo,teklabs}!pur-ee!Physics:clt INTERNET: clt @ pur-phy.UUCP