Home » Archimedes archive » Acorn User » Acorn User - Shareware Collection (1993).adf » Zap » !Zap/Docs/E-Zapcalls
!Zap/Docs/E-Zapcalls
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » Acorn User - Shareware Collection (1993).adf » Zap |
Filename: | !Zap/Docs/E-Zapcalls |
Read OK: | ✔ |
File size: | 45A0 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
************************************************************************* * >E-ZapCalls Documentation of Zap entry points (how to call zap) * ************************************************************************* Zap does NOT have a SWI interface as it uses registers R8-R10 to point to data blocks, and these cannot be passed to swi's. To call Zap you will need to know the address of the Zap module workspace (ie it's private word). If you are an extension mode then this will be passed to you in R12 whenever you are called by one of your entry points. However, for the first call you make to zap, when you add your module to it's list via Zap_Addmode, you will not know it. Then you should use OS_Module 18 to find it. Eg, SYS "XOS_Module",18,"Zap" TO R0,R1,R2,R3,workspace% Now, the first word in Zap's workspace will contain the address of a table of Zap's entry points. Thus to call the entry point (documented below) at offset a% I suggest you use the basic macro given below. REM Call zap at entry offset a% REM Entry: R0-R11=args R12=zap workspace REM Exit : R0-R11=returned values R12 preserved R14 corrupted DEF FNcall(a%) [OPTpass LDR R14,[R12] \ get start of zap table ADD R14,R14,#a% \ address of the sub STMFD R13!,{R14} \ save address on stack MOV R14,PC \ return address (with flags) LDMFD R13!,{PC} \ call the sub ]:="" The names of the routines are listed below in the order in which they appear in the table. Thus the first, Zap_AddMode, is at offset 0. The second, Zap_Claim is at offset 4, etc. These values are defined for you in the program E-Library. In general these routines have the following entry/exit conditions: \E R0-R11=arguments R12=zap's workspace R13=user stack R14=return address \X R1-R13 preserved. R0 and Flags ALTERED. V set if error and R0=error block Thus if I write: \E R8 \X R1=3 Then I mean that on entry R8 was the window block pointer, R12 zap's workspace etc. And on exit that R1=3, R2-R13 saved, R0 corrupted etc. If I omit the \E or \X then I mean the standard entry/exit conditions hold. Errors should be passed back to zap by the entry point through which the module was called (with V flag set and R0=error block pointer). Please note that for most calls, Zap must be paged in as the current task! This will be so if you are an extension mode. For a table/summary of the zap call names for including in your source, see the file E-Library. Zap_AddMode Adds a new Zap extension mode. This should be called after the module Zap is loaded, but before it starts up as a new task. Zap need not be paged in for this call. \E R0=address of table of entry points (see file E-entry) Zap_Claim Claims a block of workspace in Zap's heap. \E R0=number of bytes required \X R0=pointer to the heap block Zap_Ensure Ensures a zap heap block is of a given size. \E R0=pointer to the heap block R1=number of bytes required. \X R0=new heap block pointer of (possibly moved) extended block. Zap_Free Free a zap heap block after use. \E R0=pointer to heap block to free Zap_MoveBytes Moves a block of memory. The movement may be up or down by any amount. The data is ALWAYS preserved no matter where the destination is. This routine is highly optimised and should be used for moving any large block of data. Zap need not be paged in. \E R1=source byte address R2=destination byte address R3=number of bytes to move \X R1-R3 corrupted Zap_SplitBuffer This splits a file held in zap at the indicated file offset ready for insertion/deletion of data. It also ensures that file buffer has a given amount of room free. See E-File. \E R0=file offset to split at R1=minimum number of bytes to have free in the split R9 Zap_NewTxtStatus This updates the screen after changes are made to a file. This is very low level and you should use Zap_Command when possible. Zap_SaveTxtStatus should be called first. \E R0/R1 as for SaveTxtStatus and R2=new input caret offset. Zap_SaveTxtStatus This is a low level call used by Zap_DoCommand when changing a file. You should use Zap_Command/Zap_DoCommand in preference. Any file changes done using this call are NOT saved in the undo buffer. Ie, don't use it. To use it you specify the area of the file to be changed (R0 to R2) and the amount of the change (in R1). After making the change you use Zap_NewTxtStatus to update the screen. \E R0=file offset of first byte in file to be changed. R1=proposed signed change in size of file. R2=file offset of first character which is unchanged. Zap_Command This should be used for inserting/deleting/replacing data in a file. Its action is to call the mode entry point named e_command. See E-Entry. The mode's default action is then to call Zap_DoCommand. The commands are automatically placed in the undo buffer. If you are doing a sequence of insertions/deletions then please use Zap_Start/StopOp. \E R0=command number: 1=insert 2=delete 3=replace (forward) 4=replace (backward). Add &10 if command is to be buffered in one block (and thus undone in one key press). R1=file offset for command to take place at. R2=number of bytes being inserted/deleted/replaced. R3=data to insert/replace with for commands 1,3,4. R8=window on file to be altered/0 if none. R9=file to be altered. NB If you don't specify the window then it won't know which mode to call, so this command will just call Zap_DoCommand. Zap_NewWinStatus This recreates a window after some display parameters have changed. Use Zap_SaveWinStatus before changing any parameters. \E R8/R9 Zap_SaveWinStatus This is used before changing any of the 'w_*' window parameters which would effect the display. See E-Window. The current cursor position, scroll offsets etc are saved. After changing the window parameters call Zap_NewWinStatus. Zap will do it's best to recreate the window with the new attributes, preserving the position of the cursor on screen. \E R8/R9 Zap_ReplaceArea This command replaces one area of text with another (not necessarily of the same length) by performing the minimum number of insertions/deletions/simple replaces using Zap_Command. In BASIC mode it also retokenises the line as necessary. This is used during a search and replace. See mode entry point e_replace. \E R1=file offset of original data R2=length of original data R3=address of replacement data R4=length of replacement data R8/R9 Zap_PlotCaret This command plots a caret in its new position automatically removing it from its old position. Ie, it just calls Zap_ClearCaret then Zap_SetCaret. \E R10=caret block Zap_ReflectCaret This acts as Zap_PlotCaret but only uses c_off, updating the c_loff and c_col offsets from this. Ie, it just calls Zap_UpdateCaret then Zap_PlotCaret. \E R10=caret block Zap_SetCaret This updates the area of the window containing the the caret given on entry. Hence it's effect is usually to draw the caret at it's (new) position. See E-Cursors. \E R10=caret block Zap_ClearCaret As for Zap_SetCaret, but it updates the area of the window where the caret last was (stored in the c_o* variables). Hence the caret is in effect removed from its old position. See E-Cursors. \E R10=caret block Zap_DoCommand This acts as Zap_Command but actually performs the action rather than calling the extension mode. \E As for Zap_Command. Zap_ShowCursor This call makes sure that a given cursor can be seen in its window (by changing the scroll offsets if necessary). It does not redraw the cursor in general (though changing the scroll offsets may cause it to be redrawn). \E R10=cursor block of cursor to show Zap_ReadVar Reads one of zaps internal variables. See the file E-Vars for the numbers. \E R1=variable number. \X R0=variable value. Zap_WriteVar Writes one of zaps internal variables. See the file E-Vars for the numbers. \E R1=variable number R0=new value Zap_SaveFile This saves a file to disc (using f_name as the file name). The file may not actually be saved if a dialogue box is opened. (Eg: 'file is older than version on disc box'). \E R8/R9 Zap_FillWords Fast word filling code. The block must be word aligned. Zap need not be paged in. \E R1=word to fill with. R2=address of memory to fill (word aligned). R3=number of bytes to fill (a multiple of 4). \X R0-R3 corrupted. Zap_UpdateLns This updates the line numbers column of a given window. This is usually done automatically by Zap_Command. This is used by the BASIC mode on a renumber. \E R0=first physical line to start from R8/R9 Zap_EachWindow This sub calls a given sub for each window on a given file. Each time it calls the sub pointed to in R10, it sets up R8 for that window. \E R0-R7=args to pass to the sub. R9=file (whose windows you are to call). R10=address of sub to call for each window on this file. The sub called has: \E R0-R7 as set up by you R8/R9 points to the given window \X Must preserve R1-R11 and VS on error etc. Zap_UpdateCaret This sub is called to update a caret position from a given file offset. Save the new offset of the caret in c_off. Call this. Then c_col, c_line, c_loff, c_width will be set up. See E-Cursors. \E R10=caret block Zap_GetWindState Updates the window block R8 (first few entries) by calling Wimp_GetWindowState. \E R8 Zap_StartOp Starts a sequence of operations. This should be used when performing a sequence of calls to Zap_Command. It causes all the file changes to be made with only ONE screen refresh, thus giving a much smoother update. After this has been called, all subsequent calls to Zap_Command before a Zap_StopOp call have their actions concatenated. When you call Zap_StopOp the screen is then updated. You MUST call Zap_StopOp before returning to Wimp_Poll. StartOp/ StopOp's can be nested to any depth (so only the last StopOp actually causes the screen to be updated). \E R9=file which will be operated on. Zap_StopOp Ends a StartOp/StopOp structure. \E R9=file which has been operated on. \X R0 and flags PRESERVED. Zap_CallMode Calls a mode entry point. See E-Entry for a list of entry points. The mode called is the mode of the window given in R8. \E R0-R10=parameters R8 R11=mode entry point offset \X As for the given mode entry point. Zap_CallGivenMode Calls a mode entry point of a specified mode. \E R0-R9=parameters R10=mode number R11=entry point offset \X As for the given mode entry point. Zap_ReadMode Read the address of a mode entry point table. You can alter the table pointed to in R1 to change any entry point of any mode. The linked table is the same as the entry point table declared as a new mode except that module offsets have be converted to addresses, e_module now contains the start address of the module and e_basemode now contains the address of that modes workspace. \E R0=mode number. \X R0=pointer to unlinked table in modes module / <=0 if invalid R1=pointer to linked table in zaps workspace / <=0 if invalid Zap_FindFile Given the name of a file, this call produces a window on that file (loading it if necessary). \E R0=file name. \X R8/R9=window on that file. Zap_FindWindow Given a file block pointer of a file already loaded, this call produces a window block pointer of a window on that file (opening it if necessary). \E R9 \X R8 Zap_ConvWindOff Converts a window offset to a window block pointer. See E-Windows. \E R0=offset of a window in the window list /-ve \X R8/R9=window and file /0 Zap_ConvFileOff Converts a file offset to a file block pointer. See E-File. \E R0=offset of a file in the file list/-ve \X R9=pointers to the file block/0 Zap_GetWindOff Converts a window block pointer to a window offset. See E-Windows. \E R8=window block pointer/0 \X R0=offset in the window list/-ve Zap_GetFileOff Converts a file block pointer to a file offset. See E-File. \E R9=file block pointer/0 \X R0=offset in the file list/-ve Zap_GotoOffset This call causes the given cursor to jump to a given file offset, leaving a mark behind at the previous position. \E R0=offset to go to R8-R9=file R10=cursor Zap_JumptoOffset As for GotoOffset but no mark left on jumping. \E R0=offset to go to R8-R9=file R10=cursor Zap_FindOffset Given the (x,y) position in work area characters, finds the file offset of the 'nearest' point in the file. See E-Windows. \E R2=x column (inc margin) R3=y row (from top) \X R0=file offset R1=file offset of physical line start R2/R3 clipped Zap_NewFileTitle Update the titlebars of all windows on a given file. \E R9=file Zap_InsertString Inserts a string at the end of a buffer using Zap_Command. \E R0=zero terminated string R8/R9 Zap_CreateFile Creates an empty file, possibly changing the opt_flags/format via BIC 'mask' EOR 'eor' when creating it. See E-Flags, E-Windows. It calls Zap_CreateWindBlock and Zap_CreateFileBlock etc. \E R0=file type R1=flags mask R2=flags eor R3=format mask R4=format eor \X R8/R9=newly created file (with open window). Zap_NewLinkEntry Adds a new link entry to the f_links list. See E-File for description of the links list format. This is used by throwback. A new block is created if the file name does not match that of the previous link block, or the flags differ. \E R0=data word R1=filename R4=file offset/-1 R5=flags R9=file. \X R0=0 if link added to last list entry/1 if new entry created. Zap_DefaultClick Calls the default mouse click handling code. See the entry point e_click. \E R1=depth (0=drag 1=click 2=double click etc) R2=x R3=y R4=buttons R8/R9 as for e_click. Zap_PutCaret Sets standard cursor editing mode and puts the cursor caret at a given file offset in a given file. \E R0=file offset R8/R9=file Zap_DiscardFile Kill a file and all windows on that file without prompting user. \E R9=file Zap_DeleteFile As for Zap_DiscardFile but prompts user if file altered etc. \E R9=file Zap_DiscardWindow Kill a window, and the file if auto-delete is on and this is the last window on that file. Don't prompt user. \E R8/R9 Zap_DeleteWindow As for Zap_DiscardWindow but prompts user if file altered etc. \E R8/R9 Zap_BuildMenu This is zaps 'variable length menu' building sub. See E-Menu for details on Zap's menu format. \E R0=menu name (max 12 chars) R1=address of sub to generate the menu entries R2=address of menu updating sub/0 if none (see E-Menu) R3=address of menu interpret sub for all entries/0 (see E-Menu) R4=menu width in chars R8-R11=values to call the sub in R1 with on the first call. \X R0=pointer to wimp menu structure The sub passed in R1 has the following conditions: \E R0=buffer for you to put the next menu entry in (48 bytes) R5=address of menu structure start } R6=address of current menu entry } you don't need these R7=address of current buf entry } R8-R11=as returned from last call \X R0=index for this entry/-1 if no more entries (see E-Menu) R1-R7 saved R8-R11=updated (ie for your own use). Zap_ClearSel Clears currently selected area. Zap_CreateFileBlock Creates a new file block with currently configured options. f_ptr etc are set up for you. See E-File. Use Zap_Install file to load a file. \E R0=size to make buffer R1=filename of buffer R2/R3=load/exec \X R9=new file block (with file filled with rubbish). Zap_CreateWindBlk Creates a new window block with currently configured options. Window is opened on the screen etc. \E R9=file window is to be on. \X R8=New window on this file. Zap_GetSel Find out what area is selected. \X If CS then no valid selection If CC then R1=file offset R2=selection length R8/R9=file Zap_InsertMark Insert a marker. \E R0=file offset of mark R8/R9 Zap_InstallFile Load a file into zap. \E R0=filename \X R0=window offset of created window / -1 if not loaded. Zap_NewMode Change the display mode of a window. \E R0=new mode number R8/R9 (R8=0 to change options mode) Zap_NewTitle Update the titlebar on a given window. See also Zap_NewFileTitle. \E R8/R9 Zap_CallBaseMode As for Zap_CallMode except it calls the base mode instead. The window in R8 identifies the current mode. The entry point called is that of the base mode associated to this current mode. Hence, it would be used by a mode to call a base mode entry point which the current mode has redefined. \E R0-R10=parameters R8 R11=mode entry point offset (see E-Entry) \X As for the given mode entry point. Zap_NewView As for Zap_CreateWindBlk but 'clones' a given window image. \E R8/R9=window to clone from (R8=0 then don't clone) Zap_ReadSel Reads the currently selected region into a heap block. You must free the heap block when you have finished with the selection. \X R3=heap block with data and R2=length / R3=0 if no selection Zap_Replace Calls the zap file search and replace code using the current search string. \E R1=0 for selective/1 for global/2 for continue selective R3=start offset in file R4=direction (+1/-1) R8/R9 Zap_Search Calls the zap wildcard search code. \E R0=search string (as typed by user) R1=output type (0=cursor 1=tobuffer 2=none) R3=start offset in file R4=search direction (+1/-1) R5=object type (0=string 2=word 4=assembler instruction) R8/R9 \X If R1=0 or 2 on entry then R0=match offset/-ve if none. Zap_Select Selects a given region, and puts carets back to default mode. \E R2=start offset R3=end offset R8/R9 Zap_AlterSel As for Zap_Select but doesn't restore caret modes. \E R2=start offset R3=end offset R8/R9 Zap_OffLineCol Converts a file offset to and x,y coordinate in the window work area. See also Zap_FindOffset. See E-Windows. \E R0=file offset R8/R9 \X R0=start of line offset R2=column (inc margin) R3=row
00000000 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000040 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 2a 20 3e 45 2d 5a |*********.* >E-Z| 00000050 61 70 43 61 6c 6c 73 09 44 6f 63 75 6d 65 6e 74 |apCalls.Document| 00000060 61 74 69 6f 6e 20 6f 66 20 5a 61 70 20 65 6e 74 |ation of Zap ent| 00000070 72 79 20 70 6f 69 6e 74 73 20 28 68 6f 77 20 74 |ry points (how t| 00000080 6f 20 63 61 6c 6c 20 7a 61 70 29 09 2a 0a 2a 2a |o call zap).*.**| 00000090 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000000d0 2a 2a 2a 2a 2a 2a 2a 0a 0a 5a 61 70 20 64 6f 65 |*******..Zap doe| 000000e0 73 20 4e 4f 54 20 68 61 76 65 20 61 20 53 57 49 |s NOT have a SWI| 000000f0 20 69 6e 74 65 72 66 61 63 65 20 61 73 20 69 74 | interface as it| 00000100 20 75 73 65 73 20 72 65 67 69 73 74 65 72 73 20 | uses registers | 00000110 52 38 2d 52 31 30 20 74 6f 20 70 6f 69 6e 74 20 |R8-R10 to point | 00000120 74 6f 0a 64 61 74 61 20 62 6c 6f 63 6b 73 2c 20 |to.data blocks, | 00000130 61 6e 64 20 74 68 65 73 65 20 63 61 6e 6e 6f 74 |and these cannot| 00000140 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 73 77 | be passed to sw| 00000150 69 27 73 2e 20 54 6f 20 63 61 6c 6c 20 5a 61 70 |i's. To call Zap| 00000160 20 79 6f 75 20 77 69 6c 6c 20 6e 65 65 64 0a 74 | you will need.t| 00000170 6f 20 6b 6e 6f 77 20 74 68 65 20 61 64 64 72 65 |o know the addre| 00000180 73 73 20 6f 66 20 74 68 65 20 5a 61 70 20 6d 6f |ss of the Zap mo| 00000190 64 75 6c 65 20 77 6f 72 6b 73 70 61 63 65 20 28 |dule workspace (| 000001a0 69 65 20 69 74 27 73 20 70 72 69 76 61 74 65 20 |ie it's private | 000001b0 77 6f 72 64 29 2e 20 49 66 0a 79 6f 75 20 61 72 |word). If.you ar| 000001c0 65 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 6d |e an extension m| 000001d0 6f 64 65 20 74 68 65 6e 20 74 68 69 73 20 77 69 |ode then this wi| 000001e0 6c 6c 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 |ll be passed to | 000001f0 79 6f 75 20 69 6e 20 52 31 32 20 77 68 65 6e 65 |you in R12 whene| 00000200 76 65 72 20 79 6f 75 0a 61 72 65 20 63 61 6c 6c |ver you.are call| 00000210 65 64 20 62 79 20 6f 6e 65 20 6f 66 20 79 6f 75 |ed by one of you| 00000220 72 20 65 6e 74 72 79 20 70 6f 69 6e 74 73 2e 20 |r entry points. | 00000230 48 6f 77 65 76 65 72 2c 20 66 6f 72 20 74 68 65 |However, for the| 00000240 20 66 69 72 73 74 20 63 61 6c 6c 20 79 6f 75 20 | first call you | 00000250 6d 61 6b 65 0a 74 6f 20 7a 61 70 2c 20 77 68 65 |make.to zap, whe| 00000260 6e 20 79 6f 75 20 61 64 64 20 79 6f 75 72 20 6d |n you add your m| 00000270 6f 64 75 6c 65 20 74 6f 20 69 74 27 73 20 6c 69 |odule to it's li| 00000280 73 74 20 76 69 61 20 5a 61 70 5f 41 64 64 6d 6f |st via Zap_Addmo| 00000290 64 65 2c 20 79 6f 75 20 77 69 6c 6c 20 6e 6f 74 |de, you will not| 000002a0 0a 6b 6e 6f 77 20 69 74 2e 20 54 68 65 6e 20 79 |.know it. Then y| 000002b0 6f 75 20 73 68 6f 75 6c 64 20 75 73 65 20 4f 53 |ou should use OS| 000002c0 5f 4d 6f 64 75 6c 65 20 31 38 20 74 6f 20 66 69 |_Module 18 to fi| 000002d0 6e 64 20 69 74 2e 20 45 67 2c 0a 0a 20 53 59 53 |nd it. Eg,.. SYS| 000002e0 20 22 58 4f 53 5f 4d 6f 64 75 6c 65 22 2c 31 38 | "XOS_Module",18| 000002f0 2c 22 5a 61 70 22 20 54 4f 20 52 30 2c 52 31 2c |,"Zap" TO R0,R1,| 00000300 52 32 2c 52 33 2c 77 6f 72 6b 73 70 61 63 65 25 |R2,R3,workspace%| 00000310 0a 0a 4e 6f 77 2c 20 74 68 65 20 66 69 72 73 74 |..Now, the first| 00000320 20 77 6f 72 64 20 69 6e 20 5a 61 70 27 73 20 77 | word in Zap's w| 00000330 6f 72 6b 73 70 61 63 65 20 77 69 6c 6c 20 63 6f |orkspace will co| 00000340 6e 74 61 69 6e 20 74 68 65 20 61 64 64 72 65 73 |ntain the addres| 00000350 73 20 6f 66 20 61 20 74 61 62 6c 65 20 6f 66 0a |s of a table of.| 00000360 5a 61 70 27 73 20 65 6e 74 72 79 20 70 6f 69 6e |Zap's entry poin| 00000370 74 73 2e 20 54 68 75 73 20 74 6f 20 63 61 6c 6c |ts. Thus to call| 00000380 20 74 68 65 20 65 6e 74 72 79 20 70 6f 69 6e 74 | the entry point| 00000390 20 28 64 6f 63 75 6d 65 6e 74 65 64 20 62 65 6c | (documented bel| 000003a0 6f 77 29 20 61 74 20 6f 66 66 73 65 74 0a 61 25 |ow) at offset.a%| 000003b0 20 49 20 73 75 67 67 65 73 74 20 79 6f 75 20 75 | I suggest you u| 000003c0 73 65 20 74 68 65 20 62 61 73 69 63 20 6d 61 63 |se the basic mac| 000003d0 72 6f 20 67 69 76 65 6e 20 62 65 6c 6f 77 2e 0a |ro given below..| 000003e0 0a 20 20 20 20 52 45 4d 20 43 61 6c 6c 20 7a 61 |. REM Call za| 000003f0 70 20 61 74 20 65 6e 74 72 79 20 6f 66 66 73 65 |p at entry offse| 00000400 74 20 61 25 0a 20 20 20 20 52 45 4d 20 45 6e 74 |t a%. REM Ent| 00000410 72 79 3a 20 52 30 2d 52 31 31 3d 61 72 67 73 20 |ry: R0-R11=args | 00000420 52 31 32 3d 7a 61 70 20 77 6f 72 6b 73 70 61 63 |R12=zap workspac| 00000430 65 0a 20 20 20 20 52 45 4d 20 45 78 69 74 20 3a |e. REM Exit :| 00000440 20 52 30 2d 52 31 31 3d 72 65 74 75 72 6e 65 64 | R0-R11=returned| 00000450 20 76 61 6c 75 65 73 20 52 31 32 20 70 72 65 73 | values R12 pres| 00000460 65 72 76 65 64 20 52 31 34 20 63 6f 72 72 75 70 |erved R14 corrup| 00000470 74 65 64 0a 20 20 20 20 0a 20 20 20 20 44 45 46 |ted. . DEF| 00000480 20 46 4e 63 61 6c 6c 28 61 25 29 0a 20 20 20 20 | FNcall(a%). | 00000490 5b 4f 50 54 70 61 73 73 0a 20 20 20 20 4c 44 52 |[OPTpass. LDR| 000004a0 20 52 31 34 2c 5b 52 31 32 5d 09 09 5c 20 67 65 | R14,[R12]..\ ge| 000004b0 74 20 73 74 61 72 74 20 6f 66 20 7a 61 70 20 74 |t start of zap t| 000004c0 61 62 6c 65 0a 20 20 20 20 41 44 44 20 52 31 34 |able. ADD R14| 000004d0 2c 52 31 34 2c 23 61 25 09 09 5c 20 61 64 64 72 |,R14,#a%..\ addr| 000004e0 65 73 73 20 6f 66 20 74 68 65 20 73 75 62 0a 20 |ess of the sub. | 000004f0 20 20 20 53 54 4d 46 44 20 52 31 33 21 2c 7b 52 | STMFD R13!,{R| 00000500 31 34 7d 09 09 5c 20 73 61 76 65 20 61 64 64 72 |14}..\ save addr| 00000510 65 73 73 20 6f 6e 20 73 74 61 63 6b 0a 20 20 20 |ess on stack. | 00000520 20 4d 4f 56 20 52 31 34 2c 50 43 09 09 09 5c 20 | MOV R14,PC...\ | 00000530 72 65 74 75 72 6e 20 61 64 64 72 65 73 73 20 28 |return address (| 00000540 77 69 74 68 20 66 6c 61 67 73 29 0a 20 20 20 20 |with flags). | 00000550 4c 44 4d 46 44 20 52 31 33 21 2c 7b 50 43 7d 09 |LDMFD R13!,{PC}.| 00000560 09 5c 20 63 61 6c 6c 20 74 68 65 20 73 75 62 20 |.\ call the sub | 00000570 0a 20 20 20 20 5d 3a 3d 22 22 0a 0a 54 68 65 20 |. ]:=""..The | 00000580 6e 61 6d 65 73 20 6f 66 20 74 68 65 20 72 6f 75 |names of the rou| 00000590 74 69 6e 65 73 20 61 72 65 20 6c 69 73 74 65 64 |tines are listed| 000005a0 20 62 65 6c 6f 77 20 69 6e 20 74 68 65 20 6f 72 | below in the or| 000005b0 64 65 72 20 69 6e 20 77 68 69 63 68 20 74 68 65 |der in which the| 000005c0 79 20 61 70 70 65 61 72 0a 69 6e 20 74 68 65 20 |y appear.in the | 000005d0 74 61 62 6c 65 2e 20 54 68 75 73 20 74 68 65 20 |table. Thus the | 000005e0 66 69 72 73 74 2c 20 5a 61 70 5f 41 64 64 4d 6f |first, Zap_AddMo| 000005f0 64 65 2c 20 69 73 20 61 74 20 6f 66 66 73 65 74 |de, is at offset| 00000600 20 30 2e 20 54 68 65 20 73 65 63 6f 6e 64 2c 0a | 0. The second,.| 00000610 5a 61 70 5f 43 6c 61 69 6d 20 69 73 20 61 74 20 |Zap_Claim is at | 00000620 6f 66 66 73 65 74 20 34 2c 20 65 74 63 2e 20 54 |offset 4, etc. T| 00000630 68 65 73 65 20 76 61 6c 75 65 73 20 61 72 65 20 |hese values are | 00000640 64 65 66 69 6e 65 64 20 66 6f 72 20 79 6f 75 20 |defined for you | 00000650 69 6e 20 74 68 65 0a 70 72 6f 67 72 61 6d 20 45 |in the.program E| 00000660 2d 4c 69 62 72 61 72 79 2e 0a 0a 49 6e 20 67 65 |-Library...In ge| 00000670 6e 65 72 61 6c 20 74 68 65 73 65 20 72 6f 75 74 |neral these rout| 00000680 69 6e 65 73 20 68 61 76 65 20 74 68 65 20 66 6f |ines have the fo| 00000690 6c 6c 6f 77 69 6e 67 20 65 6e 74 72 79 2f 65 78 |llowing entry/ex| 000006a0 69 74 20 63 6f 6e 64 69 74 69 6f 6e 73 3a 0a 0a |it conditions:..| 000006b0 20 5c 45 20 52 30 2d 52 31 31 3d 61 72 67 75 6d | \E R0-R11=argum| 000006c0 65 6e 74 73 20 52 31 32 3d 7a 61 70 27 73 20 77 |ents R12=zap's w| 000006d0 6f 72 6b 73 70 61 63 65 20 52 31 33 3d 75 73 65 |orkspace R13=use| 000006e0 72 20 73 74 61 63 6b 20 52 31 34 3d 72 65 74 75 |r stack R14=retu| 000006f0 72 6e 20 61 64 64 72 65 73 73 0a 20 5c 58 20 52 |rn address. \X R| 00000700 31 2d 52 31 33 20 70 72 65 73 65 72 76 65 64 2e |1-R13 preserved.| 00000710 20 52 30 20 61 6e 64 20 46 6c 61 67 73 20 41 4c | R0 and Flags AL| 00000720 54 45 52 45 44 2e 20 56 20 73 65 74 20 69 66 20 |TERED. V set if | 00000730 65 72 72 6f 72 20 61 6e 64 20 52 30 3d 65 72 72 |error and R0=err| 00000740 6f 72 20 62 6c 6f 63 6b 0a 0a 54 68 75 73 20 69 |or block..Thus i| 00000750 66 20 49 20 77 72 69 74 65 3a 0a 0a 20 5c 45 20 |f I write:.. \E | 00000760 52 38 0a 20 5c 58 20 52 31 3d 33 0a 0a 54 68 65 |R8. \X R1=3..The| 00000770 6e 20 49 20 6d 65 61 6e 20 74 68 61 74 20 6f 6e |n I mean that on| 00000780 20 65 6e 74 72 79 20 52 38 20 77 61 73 20 74 68 | entry R8 was th| 00000790 65 20 77 69 6e 64 6f 77 20 62 6c 6f 63 6b 20 70 |e window block p| 000007a0 6f 69 6e 74 65 72 2c 20 52 31 32 20 7a 61 70 27 |ointer, R12 zap'| 000007b0 73 0a 77 6f 72 6b 73 70 61 63 65 20 65 74 63 2e |s.workspace etc.| 000007c0 20 41 6e 64 20 6f 6e 20 65 78 69 74 20 74 68 61 | And on exit tha| 000007d0 74 20 52 31 3d 33 2c 20 52 32 2d 52 31 33 20 73 |t R1=3, R2-R13 s| 000007e0 61 76 65 64 2c 20 52 30 20 63 6f 72 72 75 70 74 |aved, R0 corrupt| 000007f0 65 64 20 65 74 63 2e 20 49 66 20 49 0a 6f 6d 69 |ed etc. If I.omi| 00000800 74 20 74 68 65 20 5c 45 20 6f 72 20 5c 58 20 74 |t the \E or \X t| 00000810 68 65 6e 20 49 20 6d 65 61 6e 20 74 68 65 20 73 |hen I mean the s| 00000820 74 61 6e 64 61 72 64 20 65 6e 74 72 79 2f 65 78 |tandard entry/ex| 00000830 69 74 20 63 6f 6e 64 69 74 69 6f 6e 73 20 68 6f |it conditions ho| 00000840 6c 64 2e 0a 0a 45 72 72 6f 72 73 20 73 68 6f 75 |ld...Errors shou| 00000850 6c 64 20 62 65 20 70 61 73 73 65 64 20 62 61 63 |ld be passed bac| 00000860 6b 20 74 6f 20 7a 61 70 20 62 79 20 74 68 65 20 |k to zap by the | 00000870 65 6e 74 72 79 20 70 6f 69 6e 74 20 74 68 72 6f |entry point thro| 00000880 75 67 68 20 77 68 69 63 68 20 74 68 65 0a 6d 6f |ugh which the.mo| 00000890 64 75 6c 65 20 77 61 73 20 63 61 6c 6c 65 64 20 |dule was called | 000008a0 28 77 69 74 68 20 56 20 66 6c 61 67 20 73 65 74 |(with V flag set| 000008b0 20 61 6e 64 20 52 30 3d 65 72 72 6f 72 20 62 6c | and R0=error bl| 000008c0 6f 63 6b 20 70 6f 69 6e 74 65 72 29 2e 20 50 6c |ock pointer). Pl| 000008d0 65 61 73 65 20 6e 6f 74 65 0a 74 68 61 74 20 66 |ease note.that f| 000008e0 6f 72 20 6d 6f 73 74 20 63 61 6c 6c 73 2c 20 5a |or most calls, Z| 000008f0 61 70 20 6d 75 73 74 20 62 65 20 70 61 67 65 64 |ap must be paged| 00000900 20 69 6e 20 61 73 20 74 68 65 20 63 75 72 72 65 | in as the curre| 00000910 6e 74 20 74 61 73 6b 21 20 54 68 69 73 20 77 69 |nt task! This wi| 00000920 6c 6c 20 62 65 0a 73 6f 20 69 66 20 79 6f 75 20 |ll be.so if you | 00000930 61 72 65 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e |are an extension| 00000940 20 6d 6f 64 65 2e 0a 0a 46 6f 72 20 61 20 74 61 | mode...For a ta| 00000950 62 6c 65 2f 73 75 6d 6d 61 72 79 20 6f 66 20 74 |ble/summary of t| 00000960 68 65 20 7a 61 70 20 63 61 6c 6c 20 6e 61 6d 65 |he zap call name| 00000970 73 20 66 6f 72 20 69 6e 63 6c 75 64 69 6e 67 20 |s for including | 00000980 69 6e 20 79 6f 75 72 20 73 6f 75 72 63 65 2c 20 |in your source, | 00000990 73 65 65 0a 74 68 65 20 66 69 6c 65 20 45 2d 4c |see.the file E-L| 000009a0 69 62 72 61 72 79 2e 0a 0a 5a 61 70 5f 41 64 64 |ibrary...Zap_Add| 000009b0 4d 6f 64 65 0a 41 64 64 73 20 61 20 6e 65 77 20 |Mode.Adds a new | 000009c0 5a 61 70 20 65 78 74 65 6e 73 69 6f 6e 20 6d 6f |Zap extension mo| 000009d0 64 65 2e 20 54 68 69 73 20 73 68 6f 75 6c 64 20 |de. This should | 000009e0 62 65 20 63 61 6c 6c 65 64 20 61 66 74 65 72 20 |be called after | 000009f0 74 68 65 20 6d 6f 64 75 6c 65 20 5a 61 70 20 69 |the module Zap i| 00000a00 73 0a 6c 6f 61 64 65 64 2c 20 62 75 74 20 62 65 |s.loaded, but be| 00000a10 66 6f 72 65 20 69 74 20 73 74 61 72 74 73 20 75 |fore it starts u| 00000a20 70 20 61 73 20 61 20 6e 65 77 20 74 61 73 6b 2e |p as a new task.| 00000a30 20 5a 61 70 20 6e 65 65 64 20 6e 6f 74 20 62 65 | Zap need not be| 00000a40 20 70 61 67 65 64 20 69 6e 20 66 6f 72 0a 74 68 | paged in for.th| 00000a50 69 73 20 63 61 6c 6c 2e 0a 09 5c 45 20 52 30 3d |is call...\E R0=| 00000a60 61 64 64 72 65 73 73 20 6f 66 20 74 61 62 6c 65 |address of table| 00000a70 20 6f 66 20 65 6e 74 72 79 20 70 6f 69 6e 74 73 | of entry points| 00000a80 20 28 73 65 65 20 66 69 6c 65 20 45 2d 65 6e 74 | (see file E-ent| 00000a90 72 79 29 0a 0a 5a 61 70 5f 43 6c 61 69 6d 0a 43 |ry)..Zap_Claim.C| 00000aa0 6c 61 69 6d 73 20 61 20 62 6c 6f 63 6b 20 6f 66 |laims a block of| 00000ab0 20 77 6f 72 6b 73 70 61 63 65 20 69 6e 20 5a 61 | workspace in Za| 00000ac0 70 27 73 20 68 65 61 70 2e 0a 09 5c 45 20 52 30 |p's heap...\E R0| 00000ad0 3d 6e 75 6d 62 65 72 20 6f 66 20 62 79 74 65 73 |=number of bytes| 00000ae0 20 72 65 71 75 69 72 65 64 0a 09 5c 58 20 52 30 | required..\X R0| 00000af0 3d 70 6f 69 6e 74 65 72 20 74 6f 20 74 68 65 20 |=pointer to the | 00000b00 68 65 61 70 20 62 6c 6f 63 6b 0a 0a 5a 61 70 5f |heap block..Zap_| 00000b10 45 6e 73 75 72 65 0a 45 6e 73 75 72 65 73 20 61 |Ensure.Ensures a| 00000b20 20 7a 61 70 20 68 65 61 70 20 62 6c 6f 63 6b 20 | zap heap block | 00000b30 69 73 20 6f 66 20 61 20 67 69 76 65 6e 20 73 69 |is of a given si| 00000b40 7a 65 2e 0a 09 5c 45 20 52 30 3d 70 6f 69 6e 74 |ze...\E R0=point| 00000b50 65 72 20 74 6f 20 74 68 65 20 68 65 61 70 20 62 |er to the heap b| 00000b60 6c 6f 63 6b 0a 09 20 20 20 52 31 3d 6e 75 6d 62 |lock.. R1=numb| 00000b70 65 72 20 6f 66 20 62 79 74 65 73 20 72 65 71 75 |er of bytes requ| 00000b80 69 72 65 64 2e 0a 09 5c 58 20 52 30 3d 6e 65 77 |ired...\X R0=new| 00000b90 20 68 65 61 70 20 62 6c 6f 63 6b 20 70 6f 69 6e | heap block poin| 00000ba0 74 65 72 20 6f 66 20 28 70 6f 73 73 69 62 6c 79 |ter of (possibly| 00000bb0 20 6d 6f 76 65 64 29 20 65 78 74 65 6e 64 65 64 | moved) extended| 00000bc0 20 62 6c 6f 63 6b 2e 0a 0a 5a 61 70 5f 46 72 65 | block...Zap_Fre| 00000bd0 65 0a 46 72 65 65 20 61 20 7a 61 70 20 68 65 61 |e.Free a zap hea| 00000be0 70 20 62 6c 6f 63 6b 20 61 66 74 65 72 20 75 73 |p block after us| 00000bf0 65 2e 0a 09 5c 45 20 52 30 3d 70 6f 69 6e 74 65 |e...\E R0=pointe| 00000c00 72 20 74 6f 20 68 65 61 70 20 62 6c 6f 63 6b 20 |r to heap block | 00000c10 74 6f 20 66 72 65 65 0a 0a 5a 61 70 5f 4d 6f 76 |to free..Zap_Mov| 00000c20 65 42 79 74 65 73 0a 4d 6f 76 65 73 20 61 20 62 |eBytes.Moves a b| 00000c30 6c 6f 63 6b 20 6f 66 20 6d 65 6d 6f 72 79 2e 20 |lock of memory. | 00000c40 54 68 65 20 6d 6f 76 65 6d 65 6e 74 20 6d 61 79 |The movement may| 00000c50 20 62 65 20 75 70 20 6f 72 20 64 6f 77 6e 20 62 | be up or down b| 00000c60 79 20 61 6e 79 20 61 6d 6f 75 6e 74 2e 20 54 68 |y any amount. Th| 00000c70 65 0a 64 61 74 61 20 69 73 20 41 4c 57 41 59 53 |e.data is ALWAYS| 00000c80 20 70 72 65 73 65 72 76 65 64 20 6e 6f 20 6d 61 | preserved no ma| 00000c90 74 74 65 72 20 77 68 65 72 65 20 74 68 65 20 64 |tter where the d| 00000ca0 65 73 74 69 6e 61 74 69 6f 6e 20 69 73 2e 20 54 |estination is. T| 00000cb0 68 69 73 20 72 6f 75 74 69 6e 65 20 69 73 0a 68 |his routine is.h| 00000cc0 69 67 68 6c 79 20 6f 70 74 69 6d 69 73 65 64 20 |ighly optimised | 00000cd0 61 6e 64 20 73 68 6f 75 6c 64 20 62 65 20 75 73 |and should be us| 00000ce0 65 64 20 66 6f 72 20 6d 6f 76 69 6e 67 20 61 6e |ed for moving an| 00000cf0 79 20 6c 61 72 67 65 20 62 6c 6f 63 6b 20 6f 66 |y large block of| 00000d00 20 64 61 74 61 2e 20 5a 61 70 0a 6e 65 65 64 20 | data. Zap.need | 00000d10 6e 6f 74 20 62 65 20 70 61 67 65 64 20 69 6e 2e |not be paged in.| 00000d20 0a 09 5c 45 20 52 31 3d 73 6f 75 72 63 65 20 62 |..\E R1=source b| 00000d30 79 74 65 20 61 64 64 72 65 73 73 0a 09 20 20 20 |yte address.. | 00000d40 52 32 3d 64 65 73 74 69 6e 61 74 69 6f 6e 20 62 |R2=destination b| 00000d50 79 74 65 20 61 64 64 72 65 73 73 0a 09 20 20 20 |yte address.. | 00000d60 52 33 3d 6e 75 6d 62 65 72 20 6f 66 20 62 79 74 |R3=number of byt| 00000d70 65 73 20 74 6f 20 6d 6f 76 65 0a 09 5c 58 20 52 |es to move..\X R| 00000d80 31 2d 52 33 20 63 6f 72 72 75 70 74 65 64 0a 0a |1-R3 corrupted..| 00000d90 5a 61 70 5f 53 70 6c 69 74 42 75 66 66 65 72 0a |Zap_SplitBuffer.| 00000da0 54 68 69 73 20 73 70 6c 69 74 73 20 61 20 66 69 |This splits a fi| 00000db0 6c 65 20 68 65 6c 64 20 69 6e 20 7a 61 70 20 61 |le held in zap a| 00000dc0 74 20 74 68 65 20 69 6e 64 69 63 61 74 65 64 20 |t the indicated | 00000dd0 66 69 6c 65 20 6f 66 66 73 65 74 20 72 65 61 64 |file offset read| 00000de0 79 20 66 6f 72 0a 69 6e 73 65 72 74 69 6f 6e 2f |y for.insertion/| 00000df0 64 65 6c 65 74 69 6f 6e 20 6f 66 20 64 61 74 61 |deletion of data| 00000e00 2e 20 49 74 20 61 6c 73 6f 20 65 6e 73 75 72 65 |. It also ensure| 00000e10 73 20 74 68 61 74 20 66 69 6c 65 20 62 75 66 66 |s that file buff| 00000e20 65 72 20 68 61 73 20 61 20 67 69 76 65 6e 0a 61 |er has a given.a| 00000e30 6d 6f 75 6e 74 20 6f 66 20 72 6f 6f 6d 20 66 72 |mount of room fr| 00000e40 65 65 2e 20 53 65 65 20 45 2d 46 69 6c 65 2e 0a |ee. See E-File..| 00000e50 09 5c 45 20 52 30 3d 66 69 6c 65 20 6f 66 66 73 |.\E R0=file offs| 00000e60 65 74 20 74 6f 20 73 70 6c 69 74 20 61 74 0a 09 |et to split at..| 00000e70 20 20 20 52 31 3d 6d 69 6e 69 6d 75 6d 20 6e 75 | R1=minimum nu| 00000e80 6d 62 65 72 20 6f 66 20 62 79 74 65 73 20 74 6f |mber of bytes to| 00000e90 20 68 61 76 65 20 66 72 65 65 20 69 6e 20 74 68 | have free in th| 00000ea0 65 20 73 70 6c 69 74 20 52 39 0a 0a 5a 61 70 5f |e split R9..Zap_| 00000eb0 4e 65 77 54 78 74 53 74 61 74 75 73 0a 54 68 69 |NewTxtStatus.Thi| 00000ec0 73 20 75 70 64 61 74 65 73 20 74 68 65 20 73 63 |s updates the sc| 00000ed0 72 65 65 6e 20 61 66 74 65 72 20 63 68 61 6e 67 |reen after chang| 00000ee0 65 73 20 61 72 65 20 6d 61 64 65 20 74 6f 20 61 |es are made to a| 00000ef0 20 66 69 6c 65 2e 20 54 68 69 73 20 69 73 20 76 | file. This is v| 00000f00 65 72 79 20 6c 6f 77 0a 6c 65 76 65 6c 20 61 6e |ery low.level an| 00000f10 64 20 79 6f 75 20 73 68 6f 75 6c 64 20 75 73 65 |d you should use| 00000f20 20 5a 61 70 5f 43 6f 6d 6d 61 6e 64 20 77 68 65 | Zap_Command whe| 00000f30 6e 20 70 6f 73 73 69 62 6c 65 2e 20 5a 61 70 5f |n possible. Zap_| 00000f40 53 61 76 65 54 78 74 53 74 61 74 75 73 20 73 68 |SaveTxtStatus sh| 00000f50 6f 75 6c 64 0a 62 65 20 63 61 6c 6c 65 64 20 66 |ould.be called f| 00000f60 69 72 73 74 2e 0a 09 5c 45 20 52 30 2f 52 31 20 |irst...\E R0/R1 | 00000f70 61 73 20 66 6f 72 20 53 61 76 65 54 78 74 53 74 |as for SaveTxtSt| 00000f80 61 74 75 73 20 61 6e 64 20 52 32 3d 6e 65 77 20 |atus and R2=new | 00000f90 69 6e 70 75 74 20 63 61 72 65 74 20 6f 66 66 73 |input caret offs| 00000fa0 65 74 2e 0a 0a 5a 61 70 5f 53 61 76 65 54 78 74 |et...Zap_SaveTxt| 00000fb0 53 74 61 74 75 73 0a 54 68 69 73 20 69 73 20 61 |Status.This is a| 00000fc0 20 6c 6f 77 20 6c 65 76 65 6c 20 63 61 6c 6c 20 | low level call | 00000fd0 75 73 65 64 20 62 79 20 5a 61 70 5f 44 6f 43 6f |used by Zap_DoCo| 00000fe0 6d 6d 61 6e 64 20 77 68 65 6e 20 63 68 61 6e 67 |mmand when chang| 00000ff0 69 6e 67 20 61 20 66 69 6c 65 2e 20 59 6f 75 0a |ing a file. You.| 00001000 73 68 6f 75 6c 64 20 75 73 65 20 5a 61 70 5f 43 |should use Zap_C| 00001010 6f 6d 6d 61 6e 64 2f 5a 61 70 5f 44 6f 43 6f 6d |ommand/Zap_DoCom| 00001020 6d 61 6e 64 20 69 6e 20 70 72 65 66 65 72 65 6e |mand in preferen| 00001030 63 65 2e 20 41 6e 79 20 66 69 6c 65 20 63 68 61 |ce. Any file cha| 00001040 6e 67 65 73 20 64 6f 6e 65 0a 75 73 69 6e 67 20 |nges done.using | 00001050 74 68 69 73 20 63 61 6c 6c 20 61 72 65 20 4e 4f |this call are NO| 00001060 54 20 73 61 76 65 64 20 69 6e 20 74 68 65 20 75 |T saved in the u| 00001070 6e 64 6f 20 62 75 66 66 65 72 2e 20 49 65 2c 20 |ndo buffer. Ie, | 00001080 64 6f 6e 27 74 20 75 73 65 20 69 74 2e 20 54 6f |don't use it. To| 00001090 20 75 73 65 20 69 74 0a 79 6f 75 20 73 70 65 63 | use it.you spec| 000010a0 69 66 79 20 74 68 65 20 61 72 65 61 20 6f 66 20 |ify the area of | 000010b0 74 68 65 20 66 69 6c 65 20 74 6f 20 62 65 20 63 |the file to be c| 000010c0 68 61 6e 67 65 64 20 28 52 30 20 74 6f 20 52 32 |hanged (R0 to R2| 000010d0 29 20 61 6e 64 20 74 68 65 20 61 6d 6f 75 6e 74 |) and the amount| 000010e0 20 6f 66 0a 74 68 65 20 63 68 61 6e 67 65 20 28 | of.the change (| 000010f0 69 6e 20 52 31 29 2e 20 41 66 74 65 72 20 6d 61 |in R1). After ma| 00001100 6b 69 6e 67 20 74 68 65 20 63 68 61 6e 67 65 20 |king the change | 00001110 79 6f 75 20 75 73 65 20 5a 61 70 5f 4e 65 77 54 |you use Zap_NewT| 00001120 78 74 53 74 61 74 75 73 20 74 6f 0a 75 70 64 61 |xtStatus to.upda| 00001130 74 65 20 74 68 65 20 73 63 72 65 65 6e 2e 0a 09 |te the screen...| 00001140 5c 45 20 52 30 3d 66 69 6c 65 20 6f 66 66 73 65 |\E R0=file offse| 00001150 74 20 6f 66 20 66 69 72 73 74 20 62 79 74 65 20 |t of first byte | 00001160 69 6e 20 66 69 6c 65 20 74 6f 20 62 65 20 63 68 |in file to be ch| 00001170 61 6e 67 65 64 2e 0a 09 20 20 20 52 31 3d 70 72 |anged... R1=pr| 00001180 6f 70 6f 73 65 64 20 73 69 67 6e 65 64 20 63 68 |oposed signed ch| 00001190 61 6e 67 65 20 69 6e 20 73 69 7a 65 20 6f 66 20 |ange in size of | 000011a0 66 69 6c 65 2e 0a 09 20 20 20 52 32 3d 66 69 6c |file... R2=fil| 000011b0 65 20 6f 66 66 73 65 74 20 6f 66 20 66 69 72 73 |e offset of firs| 000011c0 74 20 63 68 61 72 61 63 74 65 72 20 77 68 69 63 |t character whic| 000011d0 68 20 69 73 20 75 6e 63 68 61 6e 67 65 64 2e 0a |h is unchanged..| 000011e0 0a 5a 61 70 5f 43 6f 6d 6d 61 6e 64 0a 54 68 69 |.Zap_Command.Thi| 000011f0 73 20 73 68 6f 75 6c 64 20 62 65 20 75 73 65 64 |s should be used| 00001200 20 66 6f 72 20 69 6e 73 65 72 74 69 6e 67 2f 64 | for inserting/d| 00001210 65 6c 65 74 69 6e 67 2f 72 65 70 6c 61 63 69 6e |eleting/replacin| 00001220 67 20 64 61 74 61 20 69 6e 20 61 20 66 69 6c 65 |g data in a file| 00001230 2e 20 49 74 73 20 0a 61 63 74 69 6f 6e 20 69 73 |. Its .action is| 00001240 20 74 6f 20 63 61 6c 6c 20 74 68 65 20 6d 6f 64 | to call the mod| 00001250 65 20 65 6e 74 72 79 20 70 6f 69 6e 74 20 6e 61 |e entry point na| 00001260 6d 65 64 20 65 5f 63 6f 6d 6d 61 6e 64 2e 20 53 |med e_command. S| 00001270 65 65 20 45 2d 45 6e 74 72 79 2e 20 54 68 65 0a |ee E-Entry. The.| 00001280 6d 6f 64 65 27 73 20 64 65 66 61 75 6c 74 20 61 |mode's default a| 00001290 63 74 69 6f 6e 20 69 73 20 74 68 65 6e 20 74 6f |ction is then to| 000012a0 20 63 61 6c 6c 20 5a 61 70 5f 44 6f 43 6f 6d 6d | call Zap_DoComm| 000012b0 61 6e 64 2e 20 54 68 65 20 63 6f 6d 6d 61 6e 64 |and. The command| 000012c0 73 20 61 72 65 0a 61 75 74 6f 6d 61 74 69 63 61 |s are.automatica| 000012d0 6c 6c 79 20 70 6c 61 63 65 64 20 69 6e 20 74 68 |lly placed in th| 000012e0 65 20 75 6e 64 6f 20 62 75 66 66 65 72 2e 20 49 |e undo buffer. I| 000012f0 66 20 79 6f 75 20 61 72 65 20 64 6f 69 6e 67 20 |f you are doing | 00001300 61 20 73 65 71 75 65 6e 63 65 20 6f 66 0a 69 6e |a sequence of.in| 00001310 73 65 72 74 69 6f 6e 73 2f 64 65 6c 65 74 69 6f |sertions/deletio| 00001320 6e 73 20 74 68 65 6e 20 70 6c 65 61 73 65 20 75 |ns then please u| 00001330 73 65 20 5a 61 70 5f 53 74 61 72 74 2f 53 74 6f |se Zap_Start/Sto| 00001340 70 4f 70 2e 0a 09 5c 45 20 52 30 3d 63 6f 6d 6d |pOp...\E R0=comm| 00001350 61 6e 64 20 6e 75 6d 62 65 72 3a 20 31 3d 69 6e |and number: 1=in| 00001360 73 65 72 74 20 32 3d 64 65 6c 65 74 65 20 33 3d |sert 2=delete 3=| 00001370 72 65 70 6c 61 63 65 20 28 66 6f 72 77 61 72 64 |replace (forward| 00001380 29 0a 09 20 20 20 20 34 3d 72 65 70 6c 61 63 65 |).. 4=replace| 00001390 20 28 62 61 63 6b 77 61 72 64 29 2e 20 41 64 64 | (backward). Add| 000013a0 20 26 31 30 20 69 66 20 63 6f 6d 6d 61 6e 64 20 | &10 if command | 000013b0 69 73 20 74 6f 20 62 65 20 62 75 66 66 65 72 65 |is to be buffere| 000013c0 64 0a 09 20 20 20 20 69 6e 20 6f 6e 65 20 62 6c |d.. in one bl| 000013d0 6f 63 6b 20 28 61 6e 64 20 74 68 75 73 20 75 6e |ock (and thus un| 000013e0 64 6f 6e 65 20 69 6e 20 6f 6e 65 20 6b 65 79 20 |done in one key | 000013f0 70 72 65 73 73 29 2e 0a 09 20 20 20 52 31 3d 66 |press)... R1=f| 00001400 69 6c 65 20 6f 66 66 73 65 74 20 66 6f 72 20 63 |ile offset for c| 00001410 6f 6d 6d 61 6e 64 20 74 6f 20 74 61 6b 65 20 70 |ommand to take p| 00001420 6c 61 63 65 20 61 74 2e 0a 09 20 20 20 52 32 3d |lace at... R2=| 00001430 6e 75 6d 62 65 72 20 6f 66 20 62 79 74 65 73 20 |number of bytes | 00001440 62 65 69 6e 67 20 69 6e 73 65 72 74 65 64 2f 64 |being inserted/d| 00001450 65 6c 65 74 65 64 2f 72 65 70 6c 61 63 65 64 2e |eleted/replaced.| 00001460 0a 09 20 20 20 52 33 3d 64 61 74 61 20 74 6f 20 |.. R3=data to | 00001470 69 6e 73 65 72 74 2f 72 65 70 6c 61 63 65 20 77 |insert/replace w| 00001480 69 74 68 20 66 6f 72 20 63 6f 6d 6d 61 6e 64 73 |ith for commands| 00001490 20 31 2c 33 2c 34 2e 0a 09 20 20 20 52 38 3d 77 | 1,3,4... R8=w| 000014a0 69 6e 64 6f 77 20 6f 6e 20 66 69 6c 65 20 74 6f |indow on file to| 000014b0 20 62 65 20 61 6c 74 65 72 65 64 2f 30 20 69 66 | be altered/0 if| 000014c0 20 6e 6f 6e 65 2e 0a 09 20 20 20 52 39 3d 66 69 | none... R9=fi| 000014d0 6c 65 20 74 6f 20 62 65 20 61 6c 74 65 72 65 64 |le to be altered| 000014e0 2e 0a 09 4e 42 20 49 66 20 79 6f 75 20 64 6f 6e |...NB If you don| 000014f0 27 74 20 73 70 65 63 69 66 79 20 74 68 65 20 77 |'t specify the w| 00001500 69 6e 64 6f 77 20 74 68 65 6e 20 69 74 20 77 6f |indow then it wo| 00001510 6e 27 74 20 6b 6e 6f 77 20 77 68 69 63 68 20 6d |n't know which m| 00001520 6f 64 65 20 74 6f 0a 09 63 61 6c 6c 2c 20 73 6f |ode to..call, so| 00001530 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 | this command wi| 00001540 6c 6c 20 6a 75 73 74 20 63 61 6c 6c 20 5a 61 70 |ll just call Zap| 00001550 5f 44 6f 43 6f 6d 6d 61 6e 64 2e 0a 0a 5a 61 70 |_DoCommand...Zap| 00001560 5f 4e 65 77 57 69 6e 53 74 61 74 75 73 0a 54 68 |_NewWinStatus.Th| 00001570 69 73 20 72 65 63 72 65 61 74 65 73 20 61 20 77 |is recreates a w| 00001580 69 6e 64 6f 77 20 61 66 74 65 72 20 73 6f 6d 65 |indow after some| 00001590 20 64 69 73 70 6c 61 79 20 70 61 72 61 6d 65 74 | display paramet| 000015a0 65 72 73 20 68 61 76 65 20 63 68 61 6e 67 65 64 |ers have changed| 000015b0 2e 20 55 73 65 0a 5a 61 70 5f 53 61 76 65 57 69 |. Use.Zap_SaveWi| 000015c0 6e 53 74 61 74 75 73 20 62 65 66 6f 72 65 20 63 |nStatus before c| 000015d0 68 61 6e 67 69 6e 67 20 61 6e 79 20 70 61 72 61 |hanging any para| 000015e0 6d 65 74 65 72 73 2e 0a 09 5c 45 20 52 38 2f 52 |meters...\E R8/R| 000015f0 39 0a 09 0a 5a 61 70 5f 53 61 76 65 57 69 6e 53 |9...Zap_SaveWinS| 00001600 74 61 74 75 73 0a 54 68 69 73 20 69 73 20 75 73 |tatus.This is us| 00001610 65 64 20 62 65 66 6f 72 65 20 63 68 61 6e 67 69 |ed before changi| 00001620 6e 67 20 61 6e 79 20 6f 66 20 74 68 65 20 27 77 |ng any of the 'w| 00001630 5f 2a 27 20 77 69 6e 64 6f 77 20 70 61 72 61 6d |_*' window param| 00001640 65 74 65 72 73 20 77 68 69 63 68 20 77 6f 75 6c |eters which woul| 00001650 64 0a 65 66 66 65 63 74 20 74 68 65 20 64 69 73 |d.effect the dis| 00001660 70 6c 61 79 2e 20 53 65 65 20 45 2d 57 69 6e 64 |play. See E-Wind| 00001670 6f 77 2e 20 54 68 65 20 63 75 72 72 65 6e 74 20 |ow. The current | 00001680 63 75 72 73 6f 72 20 70 6f 73 69 74 69 6f 6e 2c |cursor position,| 00001690 20 73 63 72 6f 6c 6c 20 6f 66 66 73 65 74 73 0a | scroll offsets.| 000016a0 65 74 63 20 61 72 65 20 73 61 76 65 64 2e 20 41 |etc are saved. A| 000016b0 66 74 65 72 20 63 68 61 6e 67 69 6e 67 20 74 68 |fter changing th| 000016c0 65 20 77 69 6e 64 6f 77 20 70 61 72 61 6d 65 74 |e window paramet| 000016d0 65 72 73 20 63 61 6c 6c 20 5a 61 70 5f 4e 65 77 |ers call Zap_New| 000016e0 57 69 6e 53 74 61 74 75 73 2e 0a 5a 61 70 20 77 |WinStatus..Zap w| 000016f0 69 6c 6c 20 64 6f 20 69 74 27 73 20 62 65 73 74 |ill do it's best| 00001700 20 74 6f 20 72 65 63 72 65 61 74 65 20 74 68 65 | to recreate the| 00001710 20 77 69 6e 64 6f 77 20 77 69 74 68 20 74 68 65 | window with the| 00001720 20 6e 65 77 20 61 74 74 72 69 62 75 74 65 73 2c | new attributes,| 00001730 0a 70 72 65 73 65 72 76 69 6e 67 20 74 68 65 20 |.preserving the | 00001740 70 6f 73 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 |position of the | 00001750 63 75 72 73 6f 72 20 6f 6e 20 73 63 72 65 65 6e |cursor on screen| 00001760 2e 0a 09 5c 45 20 52 38 2f 52 39 0a 0a 5a 61 70 |...\E R8/R9..Zap| 00001770 5f 52 65 70 6c 61 63 65 41 72 65 61 0a 54 68 69 |_ReplaceArea.Thi| 00001780 73 20 63 6f 6d 6d 61 6e 64 20 72 65 70 6c 61 63 |s command replac| 00001790 65 73 20 6f 6e 65 20 61 72 65 61 20 6f 66 20 74 |es one area of t| 000017a0 65 78 74 20 77 69 74 68 20 61 6e 6f 74 68 65 72 |ext with another| 000017b0 20 28 6e 6f 74 20 6e 65 63 65 73 73 61 72 69 6c | (not necessaril| 000017c0 79 20 6f 66 20 74 68 65 0a 73 61 6d 65 20 6c 65 |y of the.same le| 000017d0 6e 67 74 68 29 20 62 79 20 70 65 72 66 6f 72 6d |ngth) by perform| 000017e0 69 6e 67 20 74 68 65 20 6d 69 6e 69 6d 75 6d 20 |ing the minimum | 000017f0 6e 75 6d 62 65 72 20 6f 66 20 69 6e 73 65 72 74 |number of insert| 00001800 69 6f 6e 73 2f 64 65 6c 65 74 69 6f 6e 73 2f 73 |ions/deletions/s| 00001810 69 6d 70 6c 65 0a 72 65 70 6c 61 63 65 73 20 75 |imple.replaces u| 00001820 73 69 6e 67 20 5a 61 70 5f 43 6f 6d 6d 61 6e 64 |sing Zap_Command| 00001830 2e 20 49 6e 20 42 41 53 49 43 20 6d 6f 64 65 20 |. In BASIC mode | 00001840 69 74 20 61 6c 73 6f 20 72 65 74 6f 6b 65 6e 69 |it also retokeni| 00001850 73 65 73 20 74 68 65 20 6c 69 6e 65 20 61 73 0a |ses the line as.| 00001860 6e 65 63 65 73 73 61 72 79 2e 20 54 68 69 73 20 |necessary. This | 00001870 69 73 20 75 73 65 64 20 64 75 72 69 6e 67 20 61 |is used during a| 00001880 20 73 65 61 72 63 68 20 61 6e 64 20 72 65 70 6c | search and repl| 00001890 61 63 65 2e 20 53 65 65 20 6d 6f 64 65 20 65 6e |ace. See mode en| 000018a0 74 72 79 20 70 6f 69 6e 74 0a 65 5f 72 65 70 6c |try point.e_repl| 000018b0 61 63 65 2e 0a 09 5c 45 20 52 31 3d 66 69 6c 65 |ace...\E R1=file| 000018c0 20 6f 66 66 73 65 74 20 6f 66 20 6f 72 69 67 69 | offset of origi| 000018d0 6e 61 6c 20 64 61 74 61 0a 09 20 20 20 52 32 3d |nal data.. R2=| 000018e0 6c 65 6e 67 74 68 20 6f 66 20 6f 72 69 67 69 6e |length of origin| 000018f0 61 6c 20 64 61 74 61 0a 09 20 20 20 52 33 3d 61 |al data.. R3=a| 00001900 64 64 72 65 73 73 20 6f 66 20 72 65 70 6c 61 63 |ddress of replac| 00001910 65 6d 65 6e 74 20 64 61 74 61 0a 09 20 20 20 52 |ement data.. R| 00001920 34 3d 6c 65 6e 67 74 68 20 6f 66 20 72 65 70 6c |4=length of repl| 00001930 61 63 65 6d 65 6e 74 20 64 61 74 61 20 52 38 2f |acement data R8/| 00001940 52 39 0a 09 20 20 20 0a 5a 61 70 5f 50 6c 6f 74 |R9.. .Zap_Plot| 00001950 43 61 72 65 74 0a 54 68 69 73 20 63 6f 6d 6d 61 |Caret.This comma| 00001960 6e 64 20 70 6c 6f 74 73 20 61 20 63 61 72 65 74 |nd plots a caret| 00001970 20 69 6e 20 69 74 73 20 6e 65 77 20 70 6f 73 69 | in its new posi| 00001980 74 69 6f 6e 20 61 75 74 6f 6d 61 74 69 63 61 6c |tion automatical| 00001990 6c 79 20 72 65 6d 6f 76 69 6e 67 20 69 74 20 66 |ly removing it f| 000019a0 72 6f 6d 0a 69 74 73 20 6f 6c 64 20 70 6f 73 69 |rom.its old posi| 000019b0 74 69 6f 6e 2e 20 49 65 2c 20 69 74 20 6a 75 73 |tion. Ie, it jus| 000019c0 74 20 63 61 6c 6c 73 20 5a 61 70 5f 43 6c 65 61 |t calls Zap_Clea| 000019d0 72 43 61 72 65 74 20 74 68 65 6e 20 5a 61 70 5f |rCaret then Zap_| 000019e0 53 65 74 43 61 72 65 74 2e 0a 09 5c 45 20 52 31 |SetCaret...\E R1| 000019f0 30 3d 63 61 72 65 74 20 62 6c 6f 63 6b 0a 0a 5a |0=caret block..Z| 00001a00 61 70 5f 52 65 66 6c 65 63 74 43 61 72 65 74 0a |ap_ReflectCaret.| 00001a10 54 68 69 73 20 61 63 74 73 20 61 73 20 5a 61 70 |This acts as Zap| 00001a20 5f 50 6c 6f 74 43 61 72 65 74 20 62 75 74 20 6f |_PlotCaret but o| 00001a30 6e 6c 79 20 75 73 65 73 20 63 5f 6f 66 66 2c 20 |nly uses c_off, | 00001a40 75 70 64 61 74 69 6e 67 20 74 68 65 20 63 5f 6c |updating the c_l| 00001a50 6f 66 66 20 61 6e 64 20 63 5f 63 6f 6c 0a 6f 66 |off and c_col.of| 00001a60 66 73 65 74 73 20 66 72 6f 6d 20 74 68 69 73 2e |fsets from this.| 00001a70 20 49 65 2c 20 69 74 20 6a 75 73 74 20 63 61 6c | Ie, it just cal| 00001a80 6c 73 20 5a 61 70 5f 55 70 64 61 74 65 43 61 72 |ls Zap_UpdateCar| 00001a90 65 74 20 74 68 65 6e 20 5a 61 70 5f 50 6c 6f 74 |et then Zap_Plot| 00001aa0 43 61 72 65 74 2e 0a 09 5c 45 20 52 31 30 3d 63 |Caret...\E R10=c| 00001ab0 61 72 65 74 20 62 6c 6f 63 6b 0a 0a 5a 61 70 5f |aret block..Zap_| 00001ac0 53 65 74 43 61 72 65 74 0a 54 68 69 73 20 75 70 |SetCaret.This up| 00001ad0 64 61 74 65 73 20 74 68 65 20 61 72 65 61 20 6f |dates the area o| 00001ae0 66 20 74 68 65 20 77 69 6e 64 6f 77 20 63 6f 6e |f the window con| 00001af0 74 61 69 6e 69 6e 67 20 74 68 65 20 74 68 65 20 |taining the the | 00001b00 63 61 72 65 74 20 67 69 76 65 6e 20 6f 6e 20 65 |caret given on e| 00001b10 6e 74 72 79 2e 0a 48 65 6e 63 65 20 69 74 27 73 |ntry..Hence it's| 00001b20 20 65 66 66 65 63 74 20 69 73 20 75 73 75 61 6c | effect is usual| 00001b30 6c 79 20 74 6f 20 64 72 61 77 20 74 68 65 20 63 |ly to draw the c| 00001b40 61 72 65 74 20 61 74 20 69 74 27 73 20 28 6e 65 |aret at it's (ne| 00001b50 77 29 20 70 6f 73 69 74 69 6f 6e 2e 20 53 65 65 |w) position. See| 00001b60 0a 45 2d 43 75 72 73 6f 72 73 2e 0a 09 5c 45 20 |.E-Cursors...\E | 00001b70 52 31 30 3d 63 61 72 65 74 20 62 6c 6f 63 6b 0a |R10=caret block.| 00001b80 0a 5a 61 70 5f 43 6c 65 61 72 43 61 72 65 74 0a |.Zap_ClearCaret.| 00001b90 41 73 20 66 6f 72 20 5a 61 70 5f 53 65 74 43 61 |As for Zap_SetCa| 00001ba0 72 65 74 2c 20 62 75 74 20 69 74 20 75 70 64 61 |ret, but it upda| 00001bb0 74 65 73 20 74 68 65 20 61 72 65 61 20 6f 66 20 |tes the area of | 00001bc0 74 68 65 20 77 69 6e 64 6f 77 20 77 68 65 72 65 |the window where| 00001bd0 20 74 68 65 20 63 61 72 65 74 0a 6c 61 73 74 20 | the caret.last | 00001be0 77 61 73 20 28 73 74 6f 72 65 64 20 69 6e 20 74 |was (stored in t| 00001bf0 68 65 20 63 5f 6f 2a 20 76 61 72 69 61 62 6c 65 |he c_o* variable| 00001c00 73 29 2e 20 48 65 6e 63 65 20 74 68 65 20 63 61 |s). Hence the ca| 00001c10 72 65 74 20 69 73 20 69 6e 20 65 66 66 65 63 74 |ret is in effect| 00001c20 20 72 65 6d 6f 76 65 64 0a 66 72 6f 6d 20 69 74 | removed.from it| 00001c30 73 20 6f 6c 64 20 70 6f 73 69 74 69 6f 6e 2e 20 |s old position. | 00001c40 53 65 65 20 45 2d 43 75 72 73 6f 72 73 2e 0a 09 |See E-Cursors...| 00001c50 5c 45 20 52 31 30 3d 63 61 72 65 74 20 62 6c 6f |\E R10=caret blo| 00001c60 63 6b 0a 0a 5a 61 70 5f 44 6f 43 6f 6d 6d 61 6e |ck..Zap_DoComman| 00001c70 64 0a 54 68 69 73 20 61 63 74 73 20 61 73 20 5a |d.This acts as Z| 00001c80 61 70 5f 43 6f 6d 6d 61 6e 64 20 62 75 74 20 61 |ap_Command but a| 00001c90 63 74 75 61 6c 6c 79 20 70 65 72 66 6f 72 6d 73 |ctually performs| 00001ca0 20 74 68 65 20 61 63 74 69 6f 6e 20 72 61 74 68 | the action rath| 00001cb0 65 72 20 74 68 61 6e 0a 63 61 6c 6c 69 6e 67 20 |er than.calling | 00001cc0 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 20 6d 6f |the extension mo| 00001cd0 64 65 2e 0a 09 5c 45 20 41 73 20 66 6f 72 20 5a |de...\E As for Z| 00001ce0 61 70 5f 43 6f 6d 6d 61 6e 64 2e 0a 0a 5a 61 70 |ap_Command...Zap| 00001cf0 5f 53 68 6f 77 43 75 72 73 6f 72 0a 54 68 69 73 |_ShowCursor.This| 00001d00 20 63 61 6c 6c 20 6d 61 6b 65 73 20 73 75 72 65 | call makes sure| 00001d10 20 74 68 61 74 20 61 20 67 69 76 65 6e 20 63 75 | that a given cu| 00001d20 72 73 6f 72 20 63 61 6e 20 62 65 20 73 65 65 6e |rsor can be seen| 00001d30 20 69 6e 20 69 74 73 20 77 69 6e 64 6f 77 20 28 | in its window (| 00001d40 62 79 0a 63 68 61 6e 67 69 6e 67 20 74 68 65 20 |by.changing the | 00001d50 73 63 72 6f 6c 6c 20 6f 66 66 73 65 74 73 20 69 |scroll offsets i| 00001d60 66 20 6e 65 63 65 73 73 61 72 79 29 2e 20 49 74 |f necessary). It| 00001d70 20 64 6f 65 73 20 6e 6f 74 20 72 65 64 72 61 77 | does not redraw| 00001d80 20 74 68 65 20 63 75 72 73 6f 72 0a 69 6e 20 67 | the cursor.in g| 00001d90 65 6e 65 72 61 6c 20 28 74 68 6f 75 67 68 20 63 |eneral (though c| 00001da0 68 61 6e 67 69 6e 67 20 74 68 65 20 73 63 72 6f |hanging the scro| 00001db0 6c 6c 20 6f 66 66 73 65 74 73 20 6d 61 79 20 63 |ll offsets may c| 00001dc0 61 75 73 65 20 69 74 20 74 6f 20 62 65 20 72 65 |ause it to be re| 00001dd0 64 72 61 77 6e 29 2e 0a 09 5c 45 20 52 31 30 3d |drawn)...\E R10=| 00001de0 63 75 72 73 6f 72 20 62 6c 6f 63 6b 20 6f 66 20 |cursor block of | 00001df0 63 75 72 73 6f 72 20 74 6f 20 73 68 6f 77 0a 0a |cursor to show..| 00001e00 5a 61 70 5f 52 65 61 64 56 61 72 0a 52 65 61 64 |Zap_ReadVar.Read| 00001e10 73 20 6f 6e 65 20 6f 66 20 7a 61 70 73 20 69 6e |s one of zaps in| 00001e20 74 65 72 6e 61 6c 20 76 61 72 69 61 62 6c 65 73 |ternal variables| 00001e30 2e 20 53 65 65 20 74 68 65 20 66 69 6c 65 20 45 |. See the file E| 00001e40 2d 56 61 72 73 20 66 6f 72 20 74 68 65 20 6e 75 |-Vars for the nu| 00001e50 6d 62 65 72 73 2e 0a 09 5c 45 20 52 31 3d 76 61 |mbers...\E R1=va| 00001e60 72 69 61 62 6c 65 20 6e 75 6d 62 65 72 2e 0a 09 |riable number...| 00001e70 5c 58 20 52 30 3d 76 61 72 69 61 62 6c 65 20 76 |\X R0=variable v| 00001e80 61 6c 75 65 2e 0a 0a 5a 61 70 5f 57 72 69 74 65 |alue...Zap_Write| 00001e90 56 61 72 0a 57 72 69 74 65 73 20 6f 6e 65 20 6f |Var.Writes one o| 00001ea0 66 20 7a 61 70 73 20 69 6e 74 65 72 6e 61 6c 20 |f zaps internal | 00001eb0 76 61 72 69 61 62 6c 65 73 2e 20 53 65 65 20 74 |variables. See t| 00001ec0 68 65 20 66 69 6c 65 20 45 2d 56 61 72 73 20 66 |he file E-Vars f| 00001ed0 6f 72 20 74 68 65 20 6e 75 6d 62 65 72 73 2e 0a |or the numbers..| 00001ee0 09 5c 45 20 52 31 3d 76 61 72 69 61 62 6c 65 20 |.\E R1=variable | 00001ef0 6e 75 6d 62 65 72 0a 09 20 20 20 52 30 3d 6e 65 |number.. R0=ne| 00001f00 77 20 76 61 6c 75 65 0a 0a 5a 61 70 5f 53 61 76 |w value..Zap_Sav| 00001f10 65 46 69 6c 65 0a 54 68 69 73 20 73 61 76 65 73 |eFile.This saves| 00001f20 20 61 20 66 69 6c 65 20 74 6f 20 64 69 73 63 20 | a file to disc | 00001f30 28 75 73 69 6e 67 20 66 5f 6e 61 6d 65 20 61 73 |(using f_name as| 00001f40 20 74 68 65 20 66 69 6c 65 20 6e 61 6d 65 29 2e | the file name).| 00001f50 20 54 68 65 20 66 69 6c 65 20 6d 61 79 20 6e 6f | The file may no| 00001f60 74 0a 61 63 74 75 61 6c 6c 79 20 62 65 20 73 61 |t.actually be sa| 00001f70 76 65 64 20 69 66 20 61 20 64 69 61 6c 6f 67 75 |ved if a dialogu| 00001f80 65 20 62 6f 78 20 69 73 20 6f 70 65 6e 65 64 2e |e box is opened.| 00001f90 20 28 45 67 3a 20 27 66 69 6c 65 20 69 73 20 6f | (Eg: 'file is o| 00001fa0 6c 64 65 72 20 74 68 61 6e 0a 76 65 72 73 69 6f |lder than.versio| 00001fb0 6e 20 6f 6e 20 64 69 73 63 20 62 6f 78 27 29 2e |n on disc box').| 00001fc0 0a 09 5c 45 20 52 38 2f 52 39 0a 0a 5a 61 70 5f |..\E R8/R9..Zap_| 00001fd0 46 69 6c 6c 57 6f 72 64 73 0a 46 61 73 74 20 77 |FillWords.Fast w| 00001fe0 6f 72 64 20 66 69 6c 6c 69 6e 67 20 63 6f 64 65 |ord filling code| 00001ff0 2e 20 54 68 65 20 62 6c 6f 63 6b 20 6d 75 73 74 |. The block must| 00002000 20 62 65 20 77 6f 72 64 20 61 6c 69 67 6e 65 64 | be word aligned| 00002010 2e 20 5a 61 70 20 6e 65 65 64 20 6e 6f 74 20 62 |. Zap need not b| 00002020 65 20 70 61 67 65 64 0a 69 6e 2e 0a 09 5c 45 20 |e paged.in...\E | 00002030 52 31 3d 77 6f 72 64 20 74 6f 20 66 69 6c 6c 20 |R1=word to fill | 00002040 77 69 74 68 2e 0a 09 20 20 20 52 32 3d 61 64 64 |with... R2=add| 00002050 72 65 73 73 20 6f 66 20 6d 65 6d 6f 72 79 20 74 |ress of memory t| 00002060 6f 20 66 69 6c 6c 20 28 77 6f 72 64 20 61 6c 69 |o fill (word ali| 00002070 67 6e 65 64 29 2e 0a 09 20 20 20 52 33 3d 6e 75 |gned)... R3=nu| 00002080 6d 62 65 72 20 6f 66 20 62 79 74 65 73 20 74 6f |mber of bytes to| 00002090 20 66 69 6c 6c 20 28 61 20 6d 75 6c 74 69 70 6c | fill (a multipl| 000020a0 65 20 6f 66 20 34 29 2e 0a 09 5c 58 20 52 30 2d |e of 4)...\X R0-| 000020b0 52 33 20 63 6f 72 72 75 70 74 65 64 2e 0a 0a 5a |R3 corrupted...Z| 000020c0 61 70 5f 55 70 64 61 74 65 4c 6e 73 0a 54 68 69 |ap_UpdateLns.Thi| 000020d0 73 20 75 70 64 61 74 65 73 20 74 68 65 20 6c 69 |s updates the li| 000020e0 6e 65 20 6e 75 6d 62 65 72 73 20 63 6f 6c 75 6d |ne numbers colum| 000020f0 6e 20 6f 66 20 61 20 67 69 76 65 6e 20 77 69 6e |n of a given win| 00002100 64 6f 77 2e 20 54 68 69 73 20 69 73 20 75 73 75 |dow. This is usu| 00002110 61 6c 6c 79 20 64 6f 6e 65 0a 61 75 74 6f 6d 61 |ally done.automa| 00002120 74 69 63 61 6c 6c 79 20 62 79 20 5a 61 70 5f 43 |tically by Zap_C| 00002130 6f 6d 6d 61 6e 64 2e 20 54 68 69 73 20 69 73 20 |ommand. This is | 00002140 75 73 65 64 20 62 79 20 74 68 65 20 42 41 53 49 |used by the BASI| 00002150 43 20 6d 6f 64 65 20 6f 6e 20 61 20 72 65 6e 75 |C mode on a renu| 00002160 6d 62 65 72 2e 0a 09 5c 45 20 52 30 3d 66 69 72 |mber...\E R0=fir| 00002170 73 74 20 70 68 79 73 69 63 61 6c 20 6c 69 6e 65 |st physical line| 00002180 20 74 6f 20 73 74 61 72 74 20 66 72 6f 6d 20 52 | to start from R| 00002190 38 2f 52 39 0a 0a 5a 61 70 5f 45 61 63 68 57 69 |8/R9..Zap_EachWi| 000021a0 6e 64 6f 77 0a 54 68 69 73 20 73 75 62 20 63 61 |ndow.This sub ca| 000021b0 6c 6c 73 20 61 20 67 69 76 65 6e 20 73 75 62 20 |lls a given sub | 000021c0 66 6f 72 20 65 61 63 68 20 77 69 6e 64 6f 77 20 |for each window | 000021d0 6f 6e 20 61 20 67 69 76 65 6e 20 66 69 6c 65 2e |on a given file.| 000021e0 20 45 61 63 68 20 74 69 6d 65 20 69 74 0a 63 61 | Each time it.ca| 000021f0 6c 6c 73 20 74 68 65 20 73 75 62 20 70 6f 69 6e |lls the sub poin| 00002200 74 65 64 20 74 6f 20 69 6e 20 52 31 30 2c 20 69 |ted to in R10, i| 00002210 74 20 73 65 74 73 20 75 70 20 52 38 20 66 6f 72 |t sets up R8 for| 00002220 20 74 68 61 74 20 77 69 6e 64 6f 77 2e 0a 09 5c | that window...\| 00002230 45 20 52 30 2d 52 37 3d 61 72 67 73 20 74 6f 20 |E R0-R7=args to | 00002240 70 61 73 73 20 74 6f 20 74 68 65 20 73 75 62 2e |pass to the sub.| 00002250 0a 09 20 20 20 52 39 3d 66 69 6c 65 20 28 77 68 |.. R9=file (wh| 00002260 6f 73 65 20 77 69 6e 64 6f 77 73 20 79 6f 75 20 |ose windows you | 00002270 61 72 65 20 74 6f 20 63 61 6c 6c 29 2e 0a 09 20 |are to call)... | 00002280 20 20 52 31 30 3d 61 64 64 72 65 73 73 20 6f 66 | R10=address of| 00002290 20 73 75 62 20 74 6f 20 63 61 6c 6c 20 66 6f 72 | sub to call for| 000022a0 20 65 61 63 68 20 77 69 6e 64 6f 77 20 6f 6e 20 | each window on | 000022b0 74 68 69 73 20 66 69 6c 65 2e 0a 09 54 68 65 20 |this file...The | 000022c0 73 75 62 20 63 61 6c 6c 65 64 20 68 61 73 3a 0a |sub called has:.| 000022d0 09 09 5c 45 20 52 30 2d 52 37 20 61 73 20 73 65 |..\E R0-R7 as se| 000022e0 74 20 75 70 20 62 79 20 79 6f 75 0a 09 09 20 20 |t up by you... | 000022f0 20 52 38 2f 52 39 20 70 6f 69 6e 74 73 20 74 6f | R8/R9 points to| 00002300 20 74 68 65 20 67 69 76 65 6e 20 77 69 6e 64 6f | the given windo| 00002310 77 0a 09 09 5c 58 20 4d 75 73 74 20 70 72 65 73 |w...\X Must pres| 00002320 65 72 76 65 20 52 31 2d 52 31 31 20 61 6e 64 20 |erve R1-R11 and | 00002330 56 53 20 6f 6e 20 65 72 72 6f 72 20 65 74 63 2e |VS on error etc.| 00002340 0a 0a 5a 61 70 5f 55 70 64 61 74 65 43 61 72 65 |..Zap_UpdateCare| 00002350 74 0a 54 68 69 73 20 73 75 62 20 69 73 20 63 61 |t.This sub is ca| 00002360 6c 6c 65 64 20 74 6f 20 75 70 64 61 74 65 20 61 |lled to update a| 00002370 20 63 61 72 65 74 20 70 6f 73 69 74 69 6f 6e 20 | caret position | 00002380 66 72 6f 6d 20 61 20 67 69 76 65 6e 20 66 69 6c |from a given fil| 00002390 65 20 6f 66 66 73 65 74 2e 20 53 61 76 65 0a 74 |e offset. Save.t| 000023a0 68 65 20 6e 65 77 20 6f 66 66 73 65 74 20 6f 66 |he new offset of| 000023b0 20 74 68 65 20 63 61 72 65 74 20 69 6e 20 63 5f | the caret in c_| 000023c0 6f 66 66 2e 20 43 61 6c 6c 20 74 68 69 73 2e 20 |off. Call this. | 000023d0 54 68 65 6e 20 63 5f 63 6f 6c 2c 20 63 5f 6c 69 |Then c_col, c_li| 000023e0 6e 65 2c 20 63 5f 6c 6f 66 66 2c 0a 63 5f 77 69 |ne, c_loff,.c_wi| 000023f0 64 74 68 20 77 69 6c 6c 20 62 65 20 73 65 74 20 |dth will be set | 00002400 75 70 2e 20 53 65 65 20 45 2d 43 75 72 73 6f 72 |up. See E-Cursor| 00002410 73 2e 0a 09 5c 45 20 52 31 30 3d 63 61 72 65 74 |s...\E R10=caret| 00002420 20 62 6c 6f 63 6b 0a 0a 5a 61 70 5f 47 65 74 57 | block..Zap_GetW| 00002430 69 6e 64 53 74 61 74 65 0a 55 70 64 61 74 65 73 |indState.Updates| 00002440 20 74 68 65 20 77 69 6e 64 6f 77 20 62 6c 6f 63 | the window bloc| 00002450 6b 20 52 38 20 28 66 69 72 73 74 20 66 65 77 20 |k R8 (first few | 00002460 65 6e 74 72 69 65 73 29 20 62 79 20 63 61 6c 6c |entries) by call| 00002470 69 6e 67 0a 57 69 6d 70 5f 47 65 74 57 69 6e 64 |ing.Wimp_GetWind| 00002480 6f 77 53 74 61 74 65 2e 0a 09 5c 45 20 52 38 0a |owState...\E R8.| 00002490 0a 5a 61 70 5f 53 74 61 72 74 4f 70 0a 53 74 61 |.Zap_StartOp.Sta| 000024a0 72 74 73 20 61 20 73 65 71 75 65 6e 63 65 20 6f |rts a sequence o| 000024b0 66 20 6f 70 65 72 61 74 69 6f 6e 73 2e 20 54 68 |f operations. Th| 000024c0 69 73 20 73 68 6f 75 6c 64 20 62 65 20 75 73 65 |is should be use| 000024d0 64 20 77 68 65 6e 20 70 65 72 66 6f 72 6d 69 6e |d when performin| 000024e0 67 20 61 0a 73 65 71 75 65 6e 63 65 20 6f 66 20 |g a.sequence of | 000024f0 63 61 6c 6c 73 20 74 6f 20 5a 61 70 5f 43 6f 6d |calls to Zap_Com| 00002500 6d 61 6e 64 2e 20 49 74 20 63 61 75 73 65 73 20 |mand. It causes | 00002510 61 6c 6c 20 74 68 65 20 66 69 6c 65 20 63 68 61 |all the file cha| 00002520 6e 67 65 73 20 74 6f 20 62 65 20 6d 61 64 65 0a |nges to be made.| 00002530 77 69 74 68 20 6f 6e 6c 79 20 4f 4e 45 20 73 63 |with only ONE sc| 00002540 72 65 65 6e 20 72 65 66 72 65 73 68 2c 20 74 68 |reen refresh, th| 00002550 75 73 20 67 69 76 69 6e 67 20 61 20 6d 75 63 68 |us giving a much| 00002560 20 73 6d 6f 6f 74 68 65 72 20 75 70 64 61 74 65 | smoother update| 00002570 2e 20 41 66 74 65 72 20 74 68 69 73 0a 68 61 73 |. After this.has| 00002580 20 62 65 65 6e 20 63 61 6c 6c 65 64 2c 20 61 6c | been called, al| 00002590 6c 20 73 75 62 73 65 71 75 65 6e 74 20 63 61 6c |l subsequent cal| 000025a0 6c 73 20 74 6f 20 5a 61 70 5f 43 6f 6d 6d 61 6e |ls to Zap_Comman| 000025b0 64 20 62 65 66 6f 72 65 20 61 20 5a 61 70 5f 53 |d before a Zap_S| 000025c0 74 6f 70 4f 70 20 63 61 6c 6c 0a 68 61 76 65 20 |topOp call.have | 000025d0 74 68 65 69 72 20 61 63 74 69 6f 6e 73 20 63 6f |their actions co| 000025e0 6e 63 61 74 65 6e 61 74 65 64 2e 20 57 68 65 6e |ncatenated. When| 000025f0 20 79 6f 75 20 63 61 6c 6c 20 5a 61 70 5f 53 74 | you call Zap_St| 00002600 6f 70 4f 70 20 74 68 65 20 73 63 72 65 65 6e 20 |opOp the screen | 00002610 69 73 20 74 68 65 6e 0a 75 70 64 61 74 65 64 2e |is then.updated.| 00002620 20 59 6f 75 20 4d 55 53 54 20 63 61 6c 6c 20 5a | You MUST call Z| 00002630 61 70 5f 53 74 6f 70 4f 70 20 62 65 66 6f 72 65 |ap_StopOp before| 00002640 20 72 65 74 75 72 6e 69 6e 67 20 74 6f 20 57 69 | returning to Wi| 00002650 6d 70 5f 50 6f 6c 6c 2e 20 53 74 61 72 74 4f 70 |mp_Poll. StartOp| 00002660 2f 0a 53 74 6f 70 4f 70 27 73 20 63 61 6e 20 62 |/.StopOp's can b| 00002670 65 20 6e 65 73 74 65 64 20 74 6f 20 61 6e 79 20 |e nested to any | 00002680 64 65 70 74 68 20 28 73 6f 20 6f 6e 6c 79 20 74 |depth (so only t| 00002690 68 65 20 6c 61 73 74 20 53 74 6f 70 4f 70 20 61 |he last StopOp a| 000026a0 63 74 75 61 6c 6c 79 20 63 61 75 73 65 73 0a 74 |ctually causes.t| 000026b0 68 65 20 73 63 72 65 65 6e 20 74 6f 20 62 65 20 |he screen to be | 000026c0 75 70 64 61 74 65 64 29 2e 0a 09 5c 45 20 52 39 |updated)...\E R9| 000026d0 3d 66 69 6c 65 20 77 68 69 63 68 20 77 69 6c 6c |=file which will| 000026e0 20 62 65 20 6f 70 65 72 61 74 65 64 20 6f 6e 2e | be operated on.| 000026f0 0a 0a 5a 61 70 5f 53 74 6f 70 4f 70 0a 45 6e 64 |..Zap_StopOp.End| 00002700 73 20 61 20 53 74 61 72 74 4f 70 2f 53 74 6f 70 |s a StartOp/Stop| 00002710 4f 70 20 73 74 72 75 63 74 75 72 65 2e 0a 09 5c |Op structure...\| 00002720 45 20 52 39 3d 66 69 6c 65 20 77 68 69 63 68 20 |E R9=file which | 00002730 68 61 73 20 62 65 65 6e 20 6f 70 65 72 61 74 65 |has been operate| 00002740 64 20 6f 6e 2e 0a 09 5c 58 20 52 30 20 61 6e 64 |d on...\X R0 and| 00002750 20 66 6c 61 67 73 20 50 52 45 53 45 52 56 45 44 | flags PRESERVED| 00002760 2e 0a 0a 5a 61 70 5f 43 61 6c 6c 4d 6f 64 65 0a |...Zap_CallMode.| 00002770 43 61 6c 6c 73 20 61 20 6d 6f 64 65 20 65 6e 74 |Calls a mode ent| 00002780 72 79 20 70 6f 69 6e 74 2e 20 53 65 65 20 45 2d |ry point. See E-| 00002790 45 6e 74 72 79 20 66 6f 72 20 61 20 6c 69 73 74 |Entry for a list| 000027a0 20 6f 66 20 65 6e 74 72 79 20 70 6f 69 6e 74 73 | of entry points| 000027b0 2e 20 54 68 65 20 6d 6f 64 65 0a 63 61 6c 6c 65 |. The mode.calle| 000027c0 64 20 69 73 20 74 68 65 20 6d 6f 64 65 20 6f 66 |d is the mode of| 000027d0 20 74 68 65 20 77 69 6e 64 6f 77 20 67 69 76 65 | the window give| 000027e0 6e 20 69 6e 20 52 38 2e 0a 09 5c 45 20 52 30 2d |n in R8...\E R0-| 000027f0 52 31 30 3d 70 61 72 61 6d 65 74 65 72 73 20 52 |R10=parameters R| 00002800 38 20 52 31 31 3d 6d 6f 64 65 20 65 6e 74 72 79 |8 R11=mode entry| 00002810 20 70 6f 69 6e 74 20 6f 66 66 73 65 74 0a 09 5c | point offset..\| 00002820 58 20 41 73 20 66 6f 72 20 74 68 65 20 67 69 76 |X As for the giv| 00002830 65 6e 20 6d 6f 64 65 20 65 6e 74 72 79 20 70 6f |en mode entry po| 00002840 69 6e 74 2e 0a 0a 5a 61 70 5f 43 61 6c 6c 47 69 |int...Zap_CallGi| 00002850 76 65 6e 4d 6f 64 65 0a 43 61 6c 6c 73 20 61 20 |venMode.Calls a | 00002860 6d 6f 64 65 20 65 6e 74 72 79 20 70 6f 69 6e 74 |mode entry point| 00002870 20 6f 66 20 61 20 73 70 65 63 69 66 69 65 64 20 | of a specified | 00002880 6d 6f 64 65 2e 0a 09 5c 45 20 52 30 2d 52 39 3d |mode...\E R0-R9=| 00002890 70 61 72 61 6d 65 74 65 72 73 20 52 31 30 3d 6d |parameters R10=m| 000028a0 6f 64 65 20 6e 75 6d 62 65 72 20 52 31 31 3d 65 |ode number R11=e| 000028b0 6e 74 72 79 20 70 6f 69 6e 74 20 6f 66 66 73 65 |ntry point offse| 000028c0 74 0a 09 5c 58 20 41 73 20 66 6f 72 20 74 68 65 |t..\X As for the| 000028d0 20 67 69 76 65 6e 20 6d 6f 64 65 20 65 6e 74 72 | given mode entr| 000028e0 79 20 70 6f 69 6e 74 2e 0a 0a 5a 61 70 5f 52 65 |y point...Zap_Re| 000028f0 61 64 4d 6f 64 65 0a 52 65 61 64 20 74 68 65 20 |adMode.Read the | 00002900 61 64 64 72 65 73 73 20 6f 66 20 61 20 6d 6f 64 |address of a mod| 00002910 65 20 65 6e 74 72 79 20 70 6f 69 6e 74 20 74 61 |e entry point ta| 00002920 62 6c 65 2e 20 59 6f 75 20 63 61 6e 20 61 6c 74 |ble. You can alt| 00002930 65 72 20 74 68 65 20 74 61 62 6c 65 20 70 6f 69 |er the table poi| 00002940 6e 74 65 64 0a 74 6f 20 69 6e 20 52 31 20 74 6f |nted.to in R1 to| 00002950 20 63 68 61 6e 67 65 20 61 6e 79 20 65 6e 74 72 | change any entr| 00002960 79 20 70 6f 69 6e 74 20 6f 66 20 61 6e 79 20 6d |y point of any m| 00002970 6f 64 65 2e 20 54 68 65 20 6c 69 6e 6b 65 64 20 |ode. The linked | 00002980 74 61 62 6c 65 20 69 73 20 74 68 65 20 73 61 6d |table is the sam| 00002990 65 0a 61 73 20 74 68 65 20 65 6e 74 72 79 20 70 |e.as the entry p| 000029a0 6f 69 6e 74 20 74 61 62 6c 65 20 64 65 63 6c 61 |oint table decla| 000029b0 72 65 64 20 61 73 20 61 20 6e 65 77 20 6d 6f 64 |red as a new mod| 000029c0 65 20 65 78 63 65 70 74 20 74 68 61 74 20 6d 6f |e except that mo| 000029d0 64 75 6c 65 20 6f 66 66 73 65 74 73 0a 68 61 76 |dule offsets.hav| 000029e0 65 20 62 65 20 63 6f 6e 76 65 72 74 65 64 20 74 |e be converted t| 000029f0 6f 20 61 64 64 72 65 73 73 65 73 2c 20 65 5f 6d |o addresses, e_m| 00002a00 6f 64 75 6c 65 20 6e 6f 77 20 63 6f 6e 74 61 69 |odule now contai| 00002a10 6e 73 20 74 68 65 20 73 74 61 72 74 20 61 64 64 |ns the start add| 00002a20 72 65 73 73 20 6f 66 0a 74 68 65 20 6d 6f 64 75 |ress of.the modu| 00002a30 6c 65 20 61 6e 64 20 65 5f 62 61 73 65 6d 6f 64 |le and e_basemod| 00002a40 65 20 6e 6f 77 20 63 6f 6e 74 61 69 6e 73 20 74 |e now contains t| 00002a50 68 65 20 61 64 64 72 65 73 73 20 6f 66 20 74 68 |he address of th| 00002a60 61 74 20 6d 6f 64 65 73 20 77 6f 72 6b 73 70 61 |at modes workspa| 00002a70 63 65 2e 0a 09 5c 45 20 52 30 3d 6d 6f 64 65 20 |ce...\E R0=mode | 00002a80 6e 75 6d 62 65 72 2e 0a 09 5c 58 20 52 30 3d 70 |number...\X R0=p| 00002a90 6f 69 6e 74 65 72 20 74 6f 20 75 6e 6c 69 6e 6b |ointer to unlink| 00002aa0 65 64 20 74 61 62 6c 65 20 69 6e 20 6d 6f 64 65 |ed table in mode| 00002ab0 73 20 6d 6f 64 75 6c 65 20 2f 20 3c 3d 30 20 69 |s module / <=0 i| 00002ac0 66 20 69 6e 76 61 6c 69 64 0a 09 20 20 20 52 31 |f invalid.. R1| 00002ad0 3d 70 6f 69 6e 74 65 72 20 74 6f 20 6c 69 6e 6b |=pointer to link| 00002ae0 65 64 20 74 61 62 6c 65 20 69 6e 20 7a 61 70 73 |ed table in zaps| 00002af0 20 77 6f 72 6b 73 70 61 63 65 20 2f 20 3c 3d 30 | workspace / <=0| 00002b00 20 69 66 20 69 6e 76 61 6c 69 64 0a 0a 5a 61 70 | if invalid..Zap| 00002b10 5f 46 69 6e 64 46 69 6c 65 0a 47 69 76 65 6e 20 |_FindFile.Given | 00002b20 74 68 65 20 6e 61 6d 65 20 6f 66 20 61 20 66 69 |the name of a fi| 00002b30 6c 65 2c 20 74 68 69 73 20 63 61 6c 6c 20 70 72 |le, this call pr| 00002b40 6f 64 75 63 65 73 20 61 20 77 69 6e 64 6f 77 20 |oduces a window | 00002b50 6f 6e 20 74 68 61 74 20 66 69 6c 65 20 28 6c 6f |on that file (lo| 00002b60 61 64 69 6e 67 0a 69 74 20 69 66 20 6e 65 63 65 |ading.it if nece| 00002b70 73 73 61 72 79 29 2e 0a 09 5c 45 20 52 30 3d 66 |ssary)...\E R0=f| 00002b80 69 6c 65 20 6e 61 6d 65 2e 0a 09 5c 58 20 52 38 |ile name...\X R8| 00002b90 2f 52 39 3d 77 69 6e 64 6f 77 20 6f 6e 20 74 68 |/R9=window on th| 00002ba0 61 74 20 66 69 6c 65 2e 0a 0a 5a 61 70 5f 46 69 |at file...Zap_Fi| 00002bb0 6e 64 57 69 6e 64 6f 77 0a 47 69 76 65 6e 20 61 |ndWindow.Given a| 00002bc0 20 66 69 6c 65 20 62 6c 6f 63 6b 20 70 6f 69 6e | file block poin| 00002bd0 74 65 72 20 6f 66 20 61 20 66 69 6c 65 20 61 6c |ter of a file al| 00002be0 72 65 61 64 79 20 6c 6f 61 64 65 64 2c 20 74 68 |ready loaded, th| 00002bf0 69 73 20 63 61 6c 6c 20 70 72 6f 64 75 63 65 73 |is call produces| 00002c00 20 61 0a 77 69 6e 64 6f 77 20 62 6c 6f 63 6b 20 | a.window block | 00002c10 70 6f 69 6e 74 65 72 20 6f 66 20 61 20 77 69 6e |pointer of a win| 00002c20 64 6f 77 20 6f 6e 20 74 68 61 74 20 66 69 6c 65 |dow on that file| 00002c30 20 28 6f 70 65 6e 69 6e 67 20 69 74 20 69 66 20 | (opening it if | 00002c40 6e 65 63 65 73 73 61 72 79 29 2e 0a 09 5c 45 20 |necessary)...\E | 00002c50 52 39 0a 09 5c 58 20 52 38 0a 0a 5a 61 70 5f 43 |R9..\X R8..Zap_C| 00002c60 6f 6e 76 57 69 6e 64 4f 66 66 0a 43 6f 6e 76 65 |onvWindOff.Conve| 00002c70 72 74 73 20 61 20 77 69 6e 64 6f 77 20 6f 66 66 |rts a window off| 00002c80 73 65 74 20 74 6f 20 61 20 77 69 6e 64 6f 77 20 |set to a window | 00002c90 62 6c 6f 63 6b 20 70 6f 69 6e 74 65 72 2e 20 53 |block pointer. S| 00002ca0 65 65 20 45 2d 57 69 6e 64 6f 77 73 2e 0a 09 5c |ee E-Windows...\| 00002cb0 45 20 52 30 3d 6f 66 66 73 65 74 20 6f 66 20 61 |E R0=offset of a| 00002cc0 20 77 69 6e 64 6f 77 20 69 6e 20 74 68 65 20 77 | window in the w| 00002cd0 69 6e 64 6f 77 20 6c 69 73 74 20 2f 2d 76 65 0a |indow list /-ve.| 00002ce0 09 5c 58 20 52 38 2f 52 39 3d 77 69 6e 64 6f 77 |.\X R8/R9=window| 00002cf0 20 61 6e 64 20 66 69 6c 65 20 2f 30 0a 0a 5a 61 | and file /0..Za| 00002d00 70 5f 43 6f 6e 76 46 69 6c 65 4f 66 66 0a 43 6f |p_ConvFileOff.Co| 00002d10 6e 76 65 72 74 73 20 61 20 66 69 6c 65 20 6f 66 |nverts a file of| 00002d20 66 73 65 74 20 74 6f 20 61 20 66 69 6c 65 20 62 |fset to a file b| 00002d30 6c 6f 63 6b 20 70 6f 69 6e 74 65 72 2e 20 53 65 |lock pointer. Se| 00002d40 65 20 45 2d 46 69 6c 65 2e 0a 09 5c 45 20 52 30 |e E-File...\E R0| 00002d50 3d 6f 66 66 73 65 74 20 6f 66 20 61 20 66 69 6c |=offset of a fil| 00002d60 65 20 69 6e 20 74 68 65 20 66 69 6c 65 20 6c 69 |e in the file li| 00002d70 73 74 2f 2d 76 65 0a 09 5c 58 20 52 39 3d 70 6f |st/-ve..\X R9=po| 00002d80 69 6e 74 65 72 73 20 74 6f 20 74 68 65 20 66 69 |inters to the fi| 00002d90 6c 65 20 62 6c 6f 63 6b 2f 30 0a 0a 5a 61 70 5f |le block/0..Zap_| 00002da0 47 65 74 57 69 6e 64 4f 66 66 0a 43 6f 6e 76 65 |GetWindOff.Conve| 00002db0 72 74 73 20 61 20 77 69 6e 64 6f 77 20 62 6c 6f |rts a window blo| 00002dc0 63 6b 20 70 6f 69 6e 74 65 72 20 74 6f 20 61 20 |ck pointer to a | 00002dd0 77 69 6e 64 6f 77 20 6f 66 66 73 65 74 2e 20 53 |window offset. S| 00002de0 65 65 20 45 2d 57 69 6e 64 6f 77 73 2e 0a 09 5c |ee E-Windows...\| 00002df0 45 20 52 38 3d 77 69 6e 64 6f 77 20 62 6c 6f 63 |E R8=window bloc| 00002e00 6b 20 70 6f 69 6e 74 65 72 2f 30 0a 09 5c 58 20 |k pointer/0..\X | 00002e10 52 30 3d 6f 66 66 73 65 74 20 69 6e 20 74 68 65 |R0=offset in the| 00002e20 20 77 69 6e 64 6f 77 20 6c 69 73 74 2f 2d 76 65 | window list/-ve| 00002e30 0a 0a 5a 61 70 5f 47 65 74 46 69 6c 65 4f 66 66 |..Zap_GetFileOff| 00002e40 0a 43 6f 6e 76 65 72 74 73 20 61 20 66 69 6c 65 |.Converts a file| 00002e50 20 62 6c 6f 63 6b 20 70 6f 69 6e 74 65 72 20 74 | block pointer t| 00002e60 6f 20 61 20 66 69 6c 65 20 6f 66 66 73 65 74 2e |o a file offset.| 00002e70 20 53 65 65 20 45 2d 46 69 6c 65 2e 0a 09 5c 45 | See E-File...\E| 00002e80 20 52 39 3d 66 69 6c 65 20 62 6c 6f 63 6b 20 70 | R9=file block p| 00002e90 6f 69 6e 74 65 72 2f 30 0a 09 5c 58 20 52 30 3d |ointer/0..\X R0=| 00002ea0 6f 66 66 73 65 74 20 69 6e 20 74 68 65 20 66 69 |offset in the fi| 00002eb0 6c 65 20 6c 69 73 74 2f 2d 76 65 0a 0a 5a 61 70 |le list/-ve..Zap| 00002ec0 5f 47 6f 74 6f 4f 66 66 73 65 74 0a 54 68 69 73 |_GotoOffset.This| 00002ed0 20 63 61 6c 6c 20 63 61 75 73 65 73 20 74 68 65 | call causes the| 00002ee0 20 67 69 76 65 6e 20 63 75 72 73 6f 72 20 74 6f | given cursor to| 00002ef0 20 6a 75 6d 70 20 74 6f 20 61 20 67 69 76 65 6e | jump to a given| 00002f00 20 66 69 6c 65 20 6f 66 66 73 65 74 2c 20 6c 65 | file offset, le| 00002f10 61 76 69 6e 67 20 61 0a 6d 61 72 6b 20 62 65 68 |aving a.mark beh| 00002f20 69 6e 64 20 61 74 20 74 68 65 20 70 72 65 76 69 |ind at the previ| 00002f30 6f 75 73 20 70 6f 73 69 74 69 6f 6e 2e 0a 09 5c |ous position...\| 00002f40 45 20 52 30 3d 6f 66 66 73 65 74 20 74 6f 20 67 |E R0=offset to g| 00002f50 6f 20 74 6f 20 52 38 2d 52 39 3d 66 69 6c 65 20 |o to R8-R9=file | 00002f60 52 31 30 3d 63 75 72 73 6f 72 0a 0a 5a 61 70 5f |R10=cursor..Zap_| 00002f70 4a 75 6d 70 74 6f 4f 66 66 73 65 74 0a 41 73 20 |JumptoOffset.As | 00002f80 66 6f 72 20 47 6f 74 6f 4f 66 66 73 65 74 20 62 |for GotoOffset b| 00002f90 75 74 20 6e 6f 20 6d 61 72 6b 20 6c 65 66 74 20 |ut no mark left | 00002fa0 6f 6e 20 6a 75 6d 70 69 6e 67 2e 0a 09 5c 45 20 |on jumping...\E | 00002fb0 52 30 3d 6f 66 66 73 65 74 20 74 6f 20 67 6f 20 |R0=offset to go | 00002fc0 74 6f 20 52 38 2d 52 39 3d 66 69 6c 65 20 52 31 |to R8-R9=file R1| 00002fd0 30 3d 63 75 72 73 6f 72 0a 0a 5a 61 70 5f 46 69 |0=cursor..Zap_Fi| 00002fe0 6e 64 4f 66 66 73 65 74 0a 47 69 76 65 6e 20 74 |ndOffset.Given t| 00002ff0 68 65 20 28 78 2c 79 29 20 70 6f 73 69 74 69 6f |he (x,y) positio| 00003000 6e 20 69 6e 20 77 6f 72 6b 20 61 72 65 61 20 63 |n in work area c| 00003010 68 61 72 61 63 74 65 72 73 2c 20 66 69 6e 64 73 |haracters, finds| 00003020 20 74 68 65 20 66 69 6c 65 20 6f 66 66 73 65 74 | the file offset| 00003030 20 6f 66 0a 74 68 65 20 27 6e 65 61 72 65 73 74 | of.the 'nearest| 00003040 27 20 70 6f 69 6e 74 20 69 6e 20 74 68 65 20 66 |' point in the f| 00003050 69 6c 65 2e 20 53 65 65 20 45 2d 57 69 6e 64 6f |ile. See E-Windo| 00003060 77 73 2e 0a 09 5c 45 20 52 32 3d 78 20 63 6f 6c |ws...\E R2=x col| 00003070 75 6d 6e 20 28 69 6e 63 20 6d 61 72 67 69 6e 29 |umn (inc margin)| 00003080 20 52 33 3d 79 20 72 6f 77 20 28 66 72 6f 6d 20 | R3=y row (from | 00003090 74 6f 70 29 0a 09 5c 58 20 52 30 3d 66 69 6c 65 |top)..\X R0=file| 000030a0 20 6f 66 66 73 65 74 20 52 31 3d 66 69 6c 65 20 | offset R1=file | 000030b0 6f 66 66 73 65 74 20 6f 66 20 70 68 79 73 69 63 |offset of physic| 000030c0 61 6c 20 6c 69 6e 65 20 73 74 61 72 74 20 52 32 |al line start R2| 000030d0 2f 52 33 20 63 6c 69 70 70 65 64 0a 0a 5a 61 70 |/R3 clipped..Zap| 000030e0 5f 4e 65 77 46 69 6c 65 54 69 74 6c 65 0a 55 70 |_NewFileTitle.Up| 000030f0 64 61 74 65 20 74 68 65 20 74 69 74 6c 65 62 61 |date the titleba| 00003100 72 73 20 6f 66 20 61 6c 6c 20 77 69 6e 64 6f 77 |rs of all window| 00003110 73 20 6f 6e 20 61 20 67 69 76 65 6e 20 66 69 6c |s on a given fil| 00003120 65 2e 0a 09 5c 45 20 52 39 3d 66 69 6c 65 0a 0a |e...\E R9=file..| 00003130 5a 61 70 5f 49 6e 73 65 72 74 53 74 72 69 6e 67 |Zap_InsertString| 00003140 0a 49 6e 73 65 72 74 73 20 61 20 73 74 72 69 6e |.Inserts a strin| 00003150 67 20 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 |g at the end of | 00003160 61 20 62 75 66 66 65 72 20 75 73 69 6e 67 20 5a |a buffer using Z| 00003170 61 70 5f 43 6f 6d 6d 61 6e 64 2e 0a 09 5c 45 20 |ap_Command...\E | 00003180 52 30 3d 7a 65 72 6f 20 74 65 72 6d 69 6e 61 74 |R0=zero terminat| 00003190 65 64 20 73 74 72 69 6e 67 20 52 38 2f 52 39 0a |ed string R8/R9.| 000031a0 0a 5a 61 70 5f 43 72 65 61 74 65 46 69 6c 65 0a |.Zap_CreateFile.| 000031b0 43 72 65 61 74 65 73 20 61 6e 20 65 6d 70 74 79 |Creates an empty| 000031c0 20 66 69 6c 65 2c 20 70 6f 73 73 69 62 6c 79 20 | file, possibly | 000031d0 63 68 61 6e 67 69 6e 67 20 74 68 65 20 6f 70 74 |changing the opt| 000031e0 5f 66 6c 61 67 73 2f 66 6f 72 6d 61 74 20 76 69 |_flags/format vi| 000031f0 61 20 42 49 43 20 27 6d 61 73 6b 27 0a 45 4f 52 |a BIC 'mask'.EOR| 00003200 20 27 65 6f 72 27 20 77 68 65 6e 20 63 72 65 61 | 'eor' when crea| 00003210 74 69 6e 67 20 69 74 2e 20 53 65 65 20 45 2d 46 |ting it. See E-F| 00003220 6c 61 67 73 2c 20 45 2d 57 69 6e 64 6f 77 73 2e |lags, E-Windows.| 00003230 20 49 74 20 63 61 6c 6c 73 0a 5a 61 70 5f 43 72 | It calls.Zap_Cr| 00003240 65 61 74 65 57 69 6e 64 42 6c 6f 63 6b 20 61 6e |eateWindBlock an| 00003250 64 20 5a 61 70 5f 43 72 65 61 74 65 46 69 6c 65 |d Zap_CreateFile| 00003260 42 6c 6f 63 6b 20 65 74 63 2e 0a 09 5c 45 20 52 |Block etc...\E R| 00003270 30 3d 66 69 6c 65 20 74 79 70 65 0a 09 20 20 20 |0=file type.. | 00003280 52 31 3d 66 6c 61 67 73 20 6d 61 73 6b 0a 09 20 |R1=flags mask.. | 00003290 20 20 52 32 3d 66 6c 61 67 73 20 65 6f 72 0a 09 | R2=flags eor..| 000032a0 20 20 20 52 33 3d 66 6f 72 6d 61 74 20 6d 61 73 | R3=format mas| 000032b0 6b 0a 09 20 20 20 52 34 3d 66 6f 72 6d 61 74 20 |k.. R4=format | 000032c0 65 6f 72 0a 09 5c 58 20 52 38 2f 52 39 3d 6e 65 |eor..\X R8/R9=ne| 000032d0 77 6c 79 20 63 72 65 61 74 65 64 20 66 69 6c 65 |wly created file| 000032e0 20 28 77 69 74 68 20 6f 70 65 6e 20 77 69 6e 64 | (with open wind| 000032f0 6f 77 29 2e 0a 0a 5a 61 70 5f 4e 65 77 4c 69 6e |ow)...Zap_NewLin| 00003300 6b 45 6e 74 72 79 0a 41 64 64 73 20 61 20 6e 65 |kEntry.Adds a ne| 00003310 77 20 6c 69 6e 6b 20 65 6e 74 72 79 20 74 6f 20 |w link entry to | 00003320 74 68 65 20 66 5f 6c 69 6e 6b 73 20 6c 69 73 74 |the f_links list| 00003330 2e 20 53 65 65 20 45 2d 46 69 6c 65 20 66 6f 72 |. See E-File for| 00003340 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 | description of | 00003350 74 68 65 0a 6c 69 6e 6b 73 20 6c 69 73 74 20 66 |the.links list f| 00003360 6f 72 6d 61 74 2e 20 54 68 69 73 20 69 73 20 75 |ormat. This is u| 00003370 73 65 64 20 62 79 20 74 68 72 6f 77 62 61 63 6b |sed by throwback| 00003380 2e 20 41 20 6e 65 77 20 62 6c 6f 63 6b 20 69 73 |. A new block is| 00003390 20 63 72 65 61 74 65 64 20 69 66 20 74 68 65 0a | created if the.| 000033a0 66 69 6c 65 20 6e 61 6d 65 20 64 6f 65 73 20 6e |file name does n| 000033b0 6f 74 20 6d 61 74 63 68 20 74 68 61 74 20 6f 66 |ot match that of| 000033c0 20 74 68 65 20 70 72 65 76 69 6f 75 73 20 6c 69 | the previous li| 000033d0 6e 6b 20 62 6c 6f 63 6b 2c 20 6f 72 20 74 68 65 |nk block, or the| 000033e0 20 66 6c 61 67 73 0a 64 69 66 66 65 72 2e 0a 09 | flags.differ...| 000033f0 5c 45 20 52 30 3d 64 61 74 61 20 77 6f 72 64 0a |\E R0=data word.| 00003400 09 20 20 20 52 31 3d 66 69 6c 65 6e 61 6d 65 0a |. R1=filename.| 00003410 09 20 20 20 52 34 3d 66 69 6c 65 20 6f 66 66 73 |. R4=file offs| 00003420 65 74 2f 2d 31 0a 09 20 20 20 52 35 3d 66 6c 61 |et/-1.. R5=fla| 00003430 67 73 20 52 39 3d 66 69 6c 65 2e 0a 09 5c 58 20 |gs R9=file...\X | 00003440 52 30 3d 30 20 69 66 20 6c 69 6e 6b 20 61 64 64 |R0=0 if link add| 00003450 65 64 20 74 6f 20 6c 61 73 74 20 6c 69 73 74 20 |ed to last list | 00003460 65 6e 74 72 79 2f 31 20 69 66 20 6e 65 77 20 65 |entry/1 if new e| 00003470 6e 74 72 79 20 63 72 65 61 74 65 64 2e 0a 0a 5a |ntry created...Z| 00003480 61 70 5f 44 65 66 61 75 6c 74 43 6c 69 63 6b 0a |ap_DefaultClick.| 00003490 43 61 6c 6c 73 20 74 68 65 20 64 65 66 61 75 6c |Calls the defaul| 000034a0 74 20 6d 6f 75 73 65 20 63 6c 69 63 6b 20 68 61 |t mouse click ha| 000034b0 6e 64 6c 69 6e 67 20 63 6f 64 65 2e 20 53 65 65 |ndling code. See| 000034c0 20 74 68 65 20 65 6e 74 72 79 20 70 6f 69 6e 74 | the entry point| 000034d0 20 65 5f 63 6c 69 63 6b 2e 0a 09 5c 45 20 52 31 | e_click...\E R1| 000034e0 3d 64 65 70 74 68 20 28 30 3d 64 72 61 67 20 31 |=depth (0=drag 1| 000034f0 3d 63 6c 69 63 6b 20 32 3d 64 6f 75 62 6c 65 20 |=click 2=double | 00003500 63 6c 69 63 6b 20 65 74 63 29 0a 09 20 20 20 52 |click etc).. R| 00003510 32 3d 78 20 52 33 3d 79 0a 09 20 20 20 52 34 3d |2=x R3=y.. R4=| 00003520 62 75 74 74 6f 6e 73 0a 09 20 20 20 52 38 2f 52 |buttons.. R8/R| 00003530 39 20 61 73 20 66 6f 72 20 65 5f 63 6c 69 63 6b |9 as for e_click| 00003540 2e 0a 0a 5a 61 70 5f 50 75 74 43 61 72 65 74 0a |...Zap_PutCaret.| 00003550 53 65 74 73 20 73 74 61 6e 64 61 72 64 20 63 75 |Sets standard cu| 00003560 72 73 6f 72 20 65 64 69 74 69 6e 67 20 6d 6f 64 |rsor editing mod| 00003570 65 20 61 6e 64 20 70 75 74 73 20 74 68 65 20 63 |e and puts the c| 00003580 75 72 73 6f 72 20 63 61 72 65 74 20 61 74 20 61 |ursor caret at a| 00003590 20 67 69 76 65 6e 20 66 69 6c 65 0a 6f 66 66 73 | given file.offs| 000035a0 65 74 20 69 6e 20 61 20 67 69 76 65 6e 20 66 69 |et in a given fi| 000035b0 6c 65 2e 0a 09 5c 45 20 52 30 3d 66 69 6c 65 20 |le...\E R0=file | 000035c0 6f 66 66 73 65 74 20 52 38 2f 52 39 3d 66 69 6c |offset R8/R9=fil| 000035d0 65 0a 0a 5a 61 70 5f 44 69 73 63 61 72 64 46 69 |e..Zap_DiscardFi| 000035e0 6c 65 0a 4b 69 6c 6c 20 61 20 66 69 6c 65 20 61 |le.Kill a file a| 000035f0 6e 64 20 61 6c 6c 20 77 69 6e 64 6f 77 73 20 6f |nd all windows o| 00003600 6e 20 74 68 61 74 20 66 69 6c 65 20 77 69 74 68 |n that file with| 00003610 6f 75 74 20 70 72 6f 6d 70 74 69 6e 67 20 75 73 |out prompting us| 00003620 65 72 2e 0a 09 5c 45 20 52 39 3d 66 69 6c 65 0a |er...\E R9=file.| 00003630 0a 5a 61 70 5f 44 65 6c 65 74 65 46 69 6c 65 0a |.Zap_DeleteFile.| 00003640 41 73 20 66 6f 72 20 5a 61 70 5f 44 69 73 63 61 |As for Zap_Disca| 00003650 72 64 46 69 6c 65 20 62 75 74 20 70 72 6f 6d 70 |rdFile but promp| 00003660 74 73 20 75 73 65 72 20 69 66 20 66 69 6c 65 20 |ts user if file | 00003670 61 6c 74 65 72 65 64 20 65 74 63 2e 0a 09 5c 45 |altered etc...\E| 00003680 20 52 39 3d 66 69 6c 65 0a 0a 5a 61 70 5f 44 69 | R9=file..Zap_Di| 00003690 73 63 61 72 64 57 69 6e 64 6f 77 0a 4b 69 6c 6c |scardWindow.Kill| 000036a0 20 61 20 77 69 6e 64 6f 77 2c 20 61 6e 64 20 74 | a window, and t| 000036b0 68 65 20 66 69 6c 65 20 69 66 20 61 75 74 6f 2d |he file if auto-| 000036c0 64 65 6c 65 74 65 20 69 73 20 6f 6e 20 61 6e 64 |delete is on and| 000036d0 20 74 68 69 73 20 69 73 20 74 68 65 20 6c 61 73 | this is the las| 000036e0 74 20 77 69 6e 64 6f 77 0a 6f 6e 20 74 68 61 74 |t window.on that| 000036f0 20 66 69 6c 65 2e 20 44 6f 6e 27 74 20 70 72 6f | file. Don't pro| 00003700 6d 70 74 20 75 73 65 72 2e 0a 09 5c 45 20 52 38 |mpt user...\E R8| 00003710 2f 52 39 0a 0a 5a 61 70 5f 44 65 6c 65 74 65 57 |/R9..Zap_DeleteW| 00003720 69 6e 64 6f 77 0a 41 73 20 66 6f 72 20 5a 61 70 |indow.As for Zap| 00003730 5f 44 69 73 63 61 72 64 57 69 6e 64 6f 77 20 62 |_DiscardWindow b| 00003740 75 74 20 70 72 6f 6d 70 74 73 20 75 73 65 72 20 |ut prompts user | 00003750 69 66 20 66 69 6c 65 20 61 6c 74 65 72 65 64 20 |if file altered | 00003760 65 74 63 2e 0a 09 5c 45 20 52 38 2f 52 39 0a 0a |etc...\E R8/R9..| 00003770 5a 61 70 5f 42 75 69 6c 64 4d 65 6e 75 0a 54 68 |Zap_BuildMenu.Th| 00003780 69 73 20 69 73 20 7a 61 70 73 20 27 76 61 72 69 |is is zaps 'vari| 00003790 61 62 6c 65 20 6c 65 6e 67 74 68 20 6d 65 6e 75 |able length menu| 000037a0 27 20 62 75 69 6c 64 69 6e 67 20 73 75 62 2e 20 |' building sub. | 000037b0 53 65 65 20 45 2d 4d 65 6e 75 20 66 6f 72 20 64 |See E-Menu for d| 000037c0 65 74 61 69 6c 73 20 6f 6e 0a 5a 61 70 27 73 20 |etails on.Zap's | 000037d0 6d 65 6e 75 20 66 6f 72 6d 61 74 2e 0a 09 5c 45 |menu format...\E| 000037e0 20 52 30 3d 6d 65 6e 75 20 6e 61 6d 65 20 28 6d | R0=menu name (m| 000037f0 61 78 20 31 32 20 63 68 61 72 73 29 0a 09 20 20 |ax 12 chars).. | 00003800 20 52 31 3d 61 64 64 72 65 73 73 20 6f 66 20 73 | R1=address of s| 00003810 75 62 20 74 6f 20 67 65 6e 65 72 61 74 65 20 74 |ub to generate t| 00003820 68 65 20 6d 65 6e 75 20 65 6e 74 72 69 65 73 0a |he menu entries.| 00003830 09 20 20 20 52 32 3d 61 64 64 72 65 73 73 20 6f |. R2=address o| 00003840 66 20 6d 65 6e 75 20 75 70 64 61 74 69 6e 67 20 |f menu updating | 00003850 73 75 62 2f 30 20 69 66 20 6e 6f 6e 65 20 28 73 |sub/0 if none (s| 00003860 65 65 20 45 2d 4d 65 6e 75 29 0a 09 20 20 20 52 |ee E-Menu).. R| 00003870 33 3d 61 64 64 72 65 73 73 20 6f 66 20 6d 65 6e |3=address of men| 00003880 75 20 69 6e 74 65 72 70 72 65 74 20 73 75 62 20 |u interpret sub | 00003890 66 6f 72 20 61 6c 6c 20 65 6e 74 72 69 65 73 2f |for all entries/| 000038a0 30 20 28 73 65 65 20 45 2d 4d 65 6e 75 29 0a 09 |0 (see E-Menu)..| 000038b0 20 20 20 52 34 3d 6d 65 6e 75 20 77 69 64 74 68 | R4=menu width| 000038c0 20 69 6e 20 63 68 61 72 73 0a 09 20 20 20 52 38 | in chars.. R8| 000038d0 2d 52 31 31 3d 76 61 6c 75 65 73 20 74 6f 20 63 |-R11=values to c| 000038e0 61 6c 6c 20 74 68 65 20 73 75 62 20 69 6e 20 52 |all the sub in R| 000038f0 31 20 77 69 74 68 20 6f 6e 20 74 68 65 20 66 69 |1 with on the fi| 00003900 72 73 74 20 63 61 6c 6c 2e 0a 09 5c 58 20 52 30 |rst call...\X R0| 00003910 3d 70 6f 69 6e 74 65 72 20 74 6f 20 77 69 6d 70 |=pointer to wimp| 00003920 20 6d 65 6e 75 20 73 74 72 75 63 74 75 72 65 0a | menu structure.| 00003930 09 54 68 65 20 73 75 62 20 70 61 73 73 65 64 20 |.The sub passed | 00003940 69 6e 20 52 31 20 68 61 73 20 74 68 65 20 66 6f |in R1 has the fo| 00003950 6c 6c 6f 77 69 6e 67 20 63 6f 6e 64 69 74 69 6f |llowing conditio| 00003960 6e 73 3a 0a 09 20 20 20 20 20 5c 45 20 52 30 3d |ns:.. \E R0=| 00003970 62 75 66 66 65 72 20 66 6f 72 20 79 6f 75 20 74 |buffer for you t| 00003980 6f 20 70 75 74 20 74 68 65 20 6e 65 78 74 20 6d |o put the next m| 00003990 65 6e 75 20 65 6e 74 72 79 20 69 6e 20 28 34 38 |enu entry in (48| 000039a0 20 62 79 74 65 73 29 0a 09 09 52 35 3d 61 64 64 | bytes)...R5=add| 000039b0 72 65 73 73 20 6f 66 20 6d 65 6e 75 20 73 74 72 |ress of menu str| 000039c0 75 63 74 75 72 65 20 73 74 61 72 74 20 7d 0a 09 |ucture start }..| 000039d0 09 52 36 3d 61 64 64 72 65 73 73 20 6f 66 20 63 |.R6=address of c| 000039e0 75 72 72 65 6e 74 20 6d 65 6e 75 20 65 6e 74 72 |urrent menu entr| 000039f0 79 20 20 20 7d 20 79 6f 75 20 64 6f 6e 27 74 20 |y } you don't | 00003a00 6e 65 65 64 20 74 68 65 73 65 0a 09 09 52 37 3d |need these...R7=| 00003a10 61 64 64 72 65 73 73 20 6f 66 20 63 75 72 72 65 |address of curre| 00003a20 6e 74 20 62 75 66 20 65 6e 74 72 79 20 20 20 20 |nt buf entry | 00003a30 7d 0a 09 09 52 38 2d 52 31 31 3d 61 73 20 72 65 |}...R8-R11=as re| 00003a40 74 75 72 6e 65 64 20 66 72 6f 6d 20 6c 61 73 74 |turned from last| 00003a50 20 63 61 6c 6c 0a 09 20 20 20 20 20 5c 58 20 52 | call.. \X R| 00003a60 30 3d 69 6e 64 65 78 20 66 6f 72 20 74 68 69 73 |0=index for this| 00003a70 20 65 6e 74 72 79 2f 2d 31 20 69 66 20 6e 6f 20 | entry/-1 if no | 00003a80 6d 6f 72 65 20 65 6e 74 72 69 65 73 20 28 73 65 |more entries (se| 00003a90 65 20 45 2d 4d 65 6e 75 29 0a 09 20 20 20 20 20 |e E-Menu).. | 00003aa0 09 52 31 2d 52 37 20 73 61 76 65 64 0a 09 20 20 |.R1-R7 saved.. | 00003ab0 20 20 20 09 52 38 2d 52 31 31 3d 75 70 64 61 74 | .R8-R11=updat| 00003ac0 65 64 20 28 69 65 20 66 6f 72 20 79 6f 75 72 20 |ed (ie for your | 00003ad0 6f 77 6e 20 75 73 65 29 2e 0a 0a 5a 61 70 5f 43 |own use)...Zap_C| 00003ae0 6c 65 61 72 53 65 6c 0a 43 6c 65 61 72 73 20 63 |learSel.Clears c| 00003af0 75 72 72 65 6e 74 6c 79 20 73 65 6c 65 63 74 65 |urrently selecte| 00003b00 64 20 61 72 65 61 2e 0a 0a 5a 61 70 5f 43 72 65 |d area...Zap_Cre| 00003b10 61 74 65 46 69 6c 65 42 6c 6f 63 6b 0a 43 72 65 |ateFileBlock.Cre| 00003b20 61 74 65 73 20 61 20 6e 65 77 20 66 69 6c 65 20 |ates a new file | 00003b30 62 6c 6f 63 6b 20 77 69 74 68 20 63 75 72 72 65 |block with curre| 00003b40 6e 74 6c 79 20 63 6f 6e 66 69 67 75 72 65 64 20 |ntly configured | 00003b50 6f 70 74 69 6f 6e 73 2e 20 66 5f 70 74 72 20 65 |options. f_ptr e| 00003b60 74 63 20 61 72 65 20 73 65 74 0a 75 70 20 66 6f |tc are set.up fo| 00003b70 72 20 79 6f 75 2e 20 53 65 65 20 45 2d 46 69 6c |r you. See E-Fil| 00003b80 65 2e 20 55 73 65 20 5a 61 70 5f 49 6e 73 74 61 |e. Use Zap_Insta| 00003b90 6c 6c 20 66 69 6c 65 20 74 6f 20 6c 6f 61 64 20 |ll file to load | 00003ba0 61 20 66 69 6c 65 2e 0a 09 5c 45 20 52 30 3d 73 |a file...\E R0=s| 00003bb0 69 7a 65 20 74 6f 20 6d 61 6b 65 20 62 75 66 66 |ize to make buff| 00003bc0 65 72 0a 09 20 20 20 52 31 3d 66 69 6c 65 6e 61 |er.. R1=filena| 00003bd0 6d 65 20 6f 66 20 62 75 66 66 65 72 0a 09 20 20 |me of buffer.. | 00003be0 20 52 32 2f 52 33 3d 6c 6f 61 64 2f 65 78 65 63 | R2/R3=load/exec| 00003bf0 0a 09 5c 58 20 52 39 3d 6e 65 77 20 66 69 6c 65 |..\X R9=new file| 00003c00 20 62 6c 6f 63 6b 20 28 77 69 74 68 20 66 69 6c | block (with fil| 00003c10 65 20 66 69 6c 6c 65 64 20 77 69 74 68 20 72 75 |e filled with ru| 00003c20 62 62 69 73 68 29 2e 0a 09 0a 5a 61 70 5f 43 72 |bbish)....Zap_Cr| 00003c30 65 61 74 65 57 69 6e 64 42 6c 6b 0a 43 72 65 61 |eateWindBlk.Crea| 00003c40 74 65 73 20 61 20 6e 65 77 20 77 69 6e 64 6f 77 |tes a new window| 00003c50 20 62 6c 6f 63 6b 20 77 69 74 68 20 63 75 72 72 | block with curr| 00003c60 65 6e 74 6c 79 20 63 6f 6e 66 69 67 75 72 65 64 |ently configured| 00003c70 20 6f 70 74 69 6f 6e 73 2e 20 57 69 6e 64 6f 77 | options. Window| 00003c80 20 69 73 0a 6f 70 65 6e 65 64 20 6f 6e 20 74 68 | is.opened on th| 00003c90 65 20 73 63 72 65 65 6e 20 65 74 63 2e 0a 09 5c |e screen etc...\| 00003ca0 45 20 52 39 3d 66 69 6c 65 20 77 69 6e 64 6f 77 |E R9=file window| 00003cb0 20 69 73 20 74 6f 20 62 65 20 6f 6e 2e 0a 09 5c | is to be on...\| 00003cc0 58 20 52 38 3d 4e 65 77 20 77 69 6e 64 6f 77 20 |X R8=New window | 00003cd0 6f 6e 20 74 68 69 73 20 66 69 6c 65 2e 0a 09 0a |on this file....| 00003ce0 5a 61 70 5f 47 65 74 53 65 6c 0a 46 69 6e 64 20 |Zap_GetSel.Find | 00003cf0 6f 75 74 20 77 68 61 74 20 61 72 65 61 20 69 73 |out what area is| 00003d00 20 73 65 6c 65 63 74 65 64 2e 0a 09 5c 58 20 49 | selected...\X I| 00003d10 66 20 43 53 20 74 68 65 6e 20 6e 6f 20 76 61 6c |f CS then no val| 00003d20 69 64 20 73 65 6c 65 63 74 69 6f 6e 0a 09 20 20 |id selection.. | 00003d30 20 49 66 20 43 43 20 74 68 65 6e 20 52 31 3d 66 | If CC then R1=f| 00003d40 69 6c 65 20 6f 66 66 73 65 74 20 52 32 3d 73 65 |ile offset R2=se| 00003d50 6c 65 63 74 69 6f 6e 20 6c 65 6e 67 74 68 20 52 |lection length R| 00003d60 38 2f 52 39 3d 66 69 6c 65 0a 0a 5a 61 70 5f 49 |8/R9=file..Zap_I| 00003d70 6e 73 65 72 74 4d 61 72 6b 0a 49 6e 73 65 72 74 |nsertMark.Insert| 00003d80 20 61 20 6d 61 72 6b 65 72 2e 0a 09 5c 45 20 52 | a marker...\E R| 00003d90 30 3d 66 69 6c 65 20 6f 66 66 73 65 74 20 6f 66 |0=file offset of| 00003da0 20 6d 61 72 6b 20 52 38 2f 52 39 0a 0a 5a 61 70 | mark R8/R9..Zap| 00003db0 5f 49 6e 73 74 61 6c 6c 46 69 6c 65 0a 4c 6f 61 |_InstallFile.Loa| 00003dc0 64 20 61 20 66 69 6c 65 20 69 6e 74 6f 20 7a 61 |d a file into za| 00003dd0 70 2e 0a 09 5c 45 20 52 30 3d 66 69 6c 65 6e 61 |p...\E R0=filena| 00003de0 6d 65 0a 09 5c 58 20 52 30 3d 77 69 6e 64 6f 77 |me..\X R0=window| 00003df0 20 6f 66 66 73 65 74 20 6f 66 20 63 72 65 61 74 | offset of creat| 00003e00 65 64 20 77 69 6e 64 6f 77 20 2f 20 2d 31 20 69 |ed window / -1 i| 00003e10 66 20 6e 6f 74 20 6c 6f 61 64 65 64 2e 0a 0a 5a |f not loaded...Z| 00003e20 61 70 5f 4e 65 77 4d 6f 64 65 0a 43 68 61 6e 67 |ap_NewMode.Chang| 00003e30 65 20 74 68 65 20 64 69 73 70 6c 61 79 20 6d 6f |e the display mo| 00003e40 64 65 20 6f 66 20 61 20 77 69 6e 64 6f 77 2e 0a |de of a window..| 00003e50 09 5c 45 20 52 30 3d 6e 65 77 20 6d 6f 64 65 20 |.\E R0=new mode | 00003e60 6e 75 6d 62 65 72 20 52 38 2f 52 39 20 28 52 38 |number R8/R9 (R8| 00003e70 3d 30 20 74 6f 20 63 68 61 6e 67 65 20 6f 70 74 |=0 to change opt| 00003e80 69 6f 6e 73 20 6d 6f 64 65 29 0a 0a 5a 61 70 5f |ions mode)..Zap_| 00003e90 4e 65 77 54 69 74 6c 65 0a 55 70 64 61 74 65 20 |NewTitle.Update | 00003ea0 74 68 65 20 74 69 74 6c 65 62 61 72 20 6f 6e 20 |the titlebar on | 00003eb0 61 20 67 69 76 65 6e 20 77 69 6e 64 6f 77 2e 20 |a given window. | 00003ec0 53 65 65 20 61 6c 73 6f 20 5a 61 70 5f 4e 65 77 |See also Zap_New| 00003ed0 46 69 6c 65 54 69 74 6c 65 2e 0a 09 5c 45 20 52 |FileTitle...\E R| 00003ee0 38 2f 52 39 0a 0a 5a 61 70 5f 43 61 6c 6c 42 61 |8/R9..Zap_CallBa| 00003ef0 73 65 4d 6f 64 65 0a 41 73 20 66 6f 72 20 5a 61 |seMode.As for Za| 00003f00 70 5f 43 61 6c 6c 4d 6f 64 65 20 65 78 63 65 70 |p_CallMode excep| 00003f10 74 20 69 74 20 63 61 6c 6c 73 20 74 68 65 20 62 |t it calls the b| 00003f20 61 73 65 20 6d 6f 64 65 20 69 6e 73 74 65 61 64 |ase mode instead| 00003f30 2e 20 54 68 65 20 77 69 6e 64 6f 77 20 69 6e 20 |. The window in | 00003f40 52 38 0a 69 64 65 6e 74 69 66 69 65 73 20 74 68 |R8.identifies th| 00003f50 65 20 63 75 72 72 65 6e 74 20 6d 6f 64 65 2e 20 |e current mode. | 00003f60 54 68 65 20 65 6e 74 72 79 20 70 6f 69 6e 74 20 |The entry point | 00003f70 63 61 6c 6c 65 64 20 69 73 20 74 68 61 74 20 6f |called is that o| 00003f80 66 20 74 68 65 20 62 61 73 65 20 6d 6f 64 65 0a |f the base mode.| 00003f90 61 73 73 6f 63 69 61 74 65 64 20 74 6f 20 74 68 |associated to th| 00003fa0 69 73 20 63 75 72 72 65 6e 74 20 6d 6f 64 65 2e |is current mode.| 00003fb0 20 48 65 6e 63 65 2c 20 69 74 20 77 6f 75 6c 64 | Hence, it would| 00003fc0 20 62 65 20 75 73 65 64 20 62 79 20 61 20 6d 6f | be used by a mo| 00003fd0 64 65 20 74 6f 20 63 61 6c 6c 0a 61 20 62 61 73 |de to call.a bas| 00003fe0 65 20 6d 6f 64 65 20 65 6e 74 72 79 20 70 6f 69 |e mode entry poi| 00003ff0 6e 74 20 77 68 69 63 68 20 74 68 65 20 63 75 72 |nt which the cur| 00004000 72 65 6e 74 20 6d 6f 64 65 20 68 61 73 20 72 65 |rent mode has re| 00004010 64 65 66 69 6e 65 64 2e 0a 09 5c 45 20 52 30 2d |defined...\E R0-| 00004020 52 31 30 3d 70 61 72 61 6d 65 74 65 72 73 20 52 |R10=parameters R| 00004030 38 20 52 31 31 3d 6d 6f 64 65 20 65 6e 74 72 79 |8 R11=mode entry| 00004040 20 70 6f 69 6e 74 20 6f 66 66 73 65 74 20 28 73 | point offset (s| 00004050 65 65 20 45 2d 45 6e 74 72 79 29 0a 09 5c 58 20 |ee E-Entry)..\X | 00004060 41 73 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e |As for the given| 00004070 20 6d 6f 64 65 20 65 6e 74 72 79 20 70 6f 69 6e | mode entry poin| 00004080 74 2e 0a 0a 5a 61 70 5f 4e 65 77 56 69 65 77 0a |t...Zap_NewView.| 00004090 41 73 20 66 6f 72 20 5a 61 70 5f 43 72 65 61 74 |As for Zap_Creat| 000040a0 65 57 69 6e 64 42 6c 6b 20 62 75 74 20 27 63 6c |eWindBlk but 'cl| 000040b0 6f 6e 65 73 27 20 61 20 67 69 76 65 6e 20 77 69 |ones' a given wi| 000040c0 6e 64 6f 77 20 69 6d 61 67 65 2e 0a 09 5c 45 20 |ndow image...\E | 000040d0 52 38 2f 52 39 3d 77 69 6e 64 6f 77 20 74 6f 20 |R8/R9=window to | 000040e0 63 6c 6f 6e 65 20 66 72 6f 6d 20 28 52 38 3d 30 |clone from (R8=0| 000040f0 20 74 68 65 6e 20 64 6f 6e 27 74 20 63 6c 6f 6e | then don't clon| 00004100 65 29 0a 0a 5a 61 70 5f 52 65 61 64 53 65 6c 0a |e)..Zap_ReadSel.| 00004110 52 65 61 64 73 20 74 68 65 20 63 75 72 72 65 6e |Reads the curren| 00004120 74 6c 79 20 73 65 6c 65 63 74 65 64 20 72 65 67 |tly selected reg| 00004130 69 6f 6e 20 69 6e 74 6f 20 61 20 68 65 61 70 20 |ion into a heap | 00004140 62 6c 6f 63 6b 2e 20 59 6f 75 20 6d 75 73 74 20 |block. You must | 00004150 66 72 65 65 20 74 68 65 20 68 65 61 70 0a 62 6c |free the heap.bl| 00004160 6f 63 6b 20 77 68 65 6e 20 79 6f 75 20 68 61 76 |ock when you hav| 00004170 65 20 66 69 6e 69 73 68 65 64 20 77 69 74 68 20 |e finished with | 00004180 74 68 65 20 73 65 6c 65 63 74 69 6f 6e 2e 0a 09 |the selection...| 00004190 5c 58 20 52 33 3d 68 65 61 70 20 62 6c 6f 63 6b |\X R3=heap block| 000041a0 20 77 69 74 68 20 64 61 74 61 20 61 6e 64 20 52 | with data and R| 000041b0 32 3d 6c 65 6e 67 74 68 20 2f 20 52 33 3d 30 20 |2=length / R3=0 | 000041c0 69 66 20 6e 6f 20 73 65 6c 65 63 74 69 6f 6e 0a |if no selection.| 000041d0 0a 5a 61 70 5f 52 65 70 6c 61 63 65 0a 43 61 6c |.Zap_Replace.Cal| 000041e0 6c 73 20 74 68 65 20 7a 61 70 20 66 69 6c 65 20 |ls the zap file | 000041f0 73 65 61 72 63 68 20 61 6e 64 20 72 65 70 6c 61 |search and repla| 00004200 63 65 20 63 6f 64 65 20 75 73 69 6e 67 20 74 68 |ce code using th| 00004210 65 20 63 75 72 72 65 6e 74 20 73 65 61 72 63 68 |e current search| 00004220 20 73 74 72 69 6e 67 2e 0a 09 5c 45 20 52 31 3d | string...\E R1=| 00004230 30 20 66 6f 72 20 73 65 6c 65 63 74 69 76 65 2f |0 for selective/| 00004240 31 20 66 6f 72 20 67 6c 6f 62 61 6c 2f 32 20 66 |1 for global/2 f| 00004250 6f 72 20 63 6f 6e 74 69 6e 75 65 20 73 65 6c 65 |or continue sele| 00004260 63 74 69 76 65 0a 09 20 20 20 52 33 3d 73 74 61 |ctive.. R3=sta| 00004270 72 74 20 6f 66 66 73 65 74 20 69 6e 20 66 69 6c |rt offset in fil| 00004280 65 0a 09 20 20 20 52 34 3d 64 69 72 65 63 74 69 |e.. R4=directi| 00004290 6f 6e 20 28 2b 31 2f 2d 31 29 0a 09 20 20 20 52 |on (+1/-1).. R| 000042a0 38 2f 52 39 0a 0a 5a 61 70 5f 53 65 61 72 63 68 |8/R9..Zap_Search| 000042b0 0a 43 61 6c 6c 73 20 74 68 65 20 7a 61 70 20 77 |.Calls the zap w| 000042c0 69 6c 64 63 61 72 64 20 73 65 61 72 63 68 20 63 |ildcard search c| 000042d0 6f 64 65 2e 0a 09 5c 45 20 52 30 3d 73 65 61 72 |ode...\E R0=sear| 000042e0 63 68 20 73 74 72 69 6e 67 20 28 61 73 20 74 79 |ch string (as ty| 000042f0 70 65 64 20 62 79 20 75 73 65 72 29 0a 09 20 20 |ped by user).. | 00004300 20 52 31 3d 6f 75 74 70 75 74 20 74 79 70 65 20 | R1=output type | 00004310 28 30 3d 63 75 72 73 6f 72 20 31 3d 74 6f 62 75 |(0=cursor 1=tobu| 00004320 66 66 65 72 20 32 3d 6e 6f 6e 65 29 0a 09 20 20 |ffer 2=none).. | 00004330 20 52 33 3d 73 74 61 72 74 20 6f 66 66 73 65 74 | R3=start offset| 00004340 20 69 6e 20 66 69 6c 65 0a 09 20 20 20 52 34 3d | in file.. R4=| 00004350 73 65 61 72 63 68 20 64 69 72 65 63 74 69 6f 6e |search direction| 00004360 20 28 2b 31 2f 2d 31 29 0a 09 20 20 20 52 35 3d | (+1/-1).. R5=| 00004370 6f 62 6a 65 63 74 20 74 79 70 65 20 28 30 3d 73 |object type (0=s| 00004380 74 72 69 6e 67 20 32 3d 77 6f 72 64 20 34 3d 61 |tring 2=word 4=a| 00004390 73 73 65 6d 62 6c 65 72 20 69 6e 73 74 72 75 63 |ssembler instruc| 000043a0 74 69 6f 6e 29 0a 09 20 20 20 52 38 2f 52 39 0a |tion).. R8/R9.| 000043b0 09 5c 58 20 49 66 20 52 31 3d 30 20 6f 72 20 32 |.\X If R1=0 or 2| 000043c0 20 6f 6e 20 65 6e 74 72 79 20 74 68 65 6e 20 52 | on entry then R| 000043d0 30 3d 6d 61 74 63 68 20 6f 66 66 73 65 74 2f 2d |0=match offset/-| 000043e0 76 65 20 69 66 20 6e 6f 6e 65 2e 0a 0a 5a 61 70 |ve if none...Zap| 000043f0 5f 53 65 6c 65 63 74 0a 53 65 6c 65 63 74 73 20 |_Select.Selects | 00004400 61 20 67 69 76 65 6e 20 72 65 67 69 6f 6e 2c 20 |a given region, | 00004410 61 6e 64 20 70 75 74 73 20 63 61 72 65 74 73 20 |and puts carets | 00004420 62 61 63 6b 20 74 6f 20 64 65 66 61 75 6c 74 20 |back to default | 00004430 6d 6f 64 65 2e 0a 09 5c 45 20 52 32 3d 73 74 61 |mode...\E R2=sta| 00004440 72 74 20 6f 66 66 73 65 74 20 52 33 3d 65 6e 64 |rt offset R3=end| 00004450 20 6f 66 66 73 65 74 20 52 38 2f 52 39 0a 0a 5a | offset R8/R9..Z| 00004460 61 70 5f 41 6c 74 65 72 53 65 6c 0a 41 73 20 66 |ap_AlterSel.As f| 00004470 6f 72 20 5a 61 70 5f 53 65 6c 65 63 74 20 62 75 |or Zap_Select bu| 00004480 74 20 64 6f 65 73 6e 27 74 20 72 65 73 74 6f 72 |t doesn't restor| 00004490 65 20 63 61 72 65 74 20 6d 6f 64 65 73 2e 0a 09 |e caret modes...| 000044a0 5c 45 20 52 32 3d 73 74 61 72 74 20 6f 66 66 73 |\E R2=start offs| 000044b0 65 74 20 52 33 3d 65 6e 64 20 6f 66 66 73 65 74 |et R3=end offset| 000044c0 20 52 38 2f 52 39 0a 0a 5a 61 70 5f 4f 66 66 4c | R8/R9..Zap_OffL| 000044d0 69 6e 65 43 6f 6c 0a 43 6f 6e 76 65 72 74 73 20 |ineCol.Converts | 000044e0 61 20 66 69 6c 65 20 6f 66 66 73 65 74 20 74 6f |a file offset to| 000044f0 20 61 6e 64 20 78 2c 79 20 63 6f 6f 72 64 69 6e | and x,y coordin| 00004500 61 74 65 20 69 6e 20 74 68 65 20 77 69 6e 64 6f |ate in the windo| 00004510 77 20 77 6f 72 6b 20 61 72 65 61 2e 20 53 65 65 |w work area. See| 00004520 0a 61 6c 73 6f 20 5a 61 70 5f 46 69 6e 64 4f 66 |.also Zap_FindOf| 00004530 66 73 65 74 2e 20 53 65 65 20 45 2d 57 69 6e 64 |fset. See E-Wind| 00004540 6f 77 73 2e 0a 09 5c 45 20 52 30 3d 66 69 6c 65 |ows...\E R0=file| 00004550 20 6f 66 66 73 65 74 20 52 38 2f 52 39 0a 09 5c | offset R8/R9..\| 00004560 58 20 52 30 3d 73 74 61 72 74 20 6f 66 20 6c 69 |X R0=start of li| 00004570 6e 65 20 6f 66 66 73 65 74 0a 09 20 20 20 52 32 |ne offset.. R2| 00004580 3d 63 6f 6c 75 6d 6e 20 28 69 6e 63 20 6d 61 72 |=column (inc mar| 00004590 67 69 6e 29 0a 09 20 20 20 52 33 3d 72 6f 77 0a |gin).. R3=row.| 000045a0