a2-chemi-gs-1993/text.asm

1 line
1.7 KiB
NASM
Raw Permalink Normal View History

2017-10-22 14:30:14 +00:00
keep TEXT **************************************************************** * ChemiGS * **************************************************************** * A Drawing Program for Chemical Structures * * (c) 1992-93 by Urs Hochstrasser * * Buendtenweg 6 * * 5105 AUENSTEIN (SWITZERLAND) * **************************************************************** * Module TEXT **************************************************************** * * USES ... * mcopy text.macros copy equates.asm KeyFilter start using Globals oteH equ 8 Offset to the teH Input Parm otype equ 4 Offset to the type Input Parm phd save current DP tsc tcd switch to DP in stack ldy #0 *** new: save InfoRect into gInfoRect lda #0 *** sta $E0C034 *** lda [oteH],y sta teH iny iny lda [oteH],y sta teH+2 lda [otype],y sta type * ------------------- individual routine ----------------- inc gaga *** lda gaga *** inc a *** sta $E0C034 *** lda $E0C030 ~HandToPtr teH,#teRec,#$106 ldx #$D8 lda teRec,x sta theChar * do conversion stuff lda theChar example... and #$005F sta outChar ~PtrToHand #outChar,outH,#2 ldx #$DC keyRecord.theInputHandle lda outH sta teRec,x lda outH+2 sta teRec+2,x ldx #$E4 keyRecord.theOpcode stz teRec,x ~PtrToHand #teRec,teH,#106 * ------------------- Remove input parameters from stack ply pull original DP, save in y lda 2,s Move RTL addr down over inp parms sta 8,s lda 0,s sta 6,s tsc now move SP over inp parms clc adc #6 add number input parm bytes to SP tcs and reset stack tya restore original DP tcd * lda #2 *** * sta $E0C034 *** rtl back to Window Mgr teH ds 4 type ds 2 tePtr ds 4 theChar ds 2 outChar ds 2 gaga ds 2 end