forked from rileym65/Basic-02
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcdealloc.c
More file actions
29 lines (26 loc) · 1.03 KB
/
Copy pathcdealloc.c
File metadata and controls
29 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
*******************************************************************
*** This software is copyright 2021 by Michael H Riley ***
*** You have permission to use, modify, copy, and distribute ***
*** this software so long as this copyright notice is retained. ***
*** This software may not be used in commercial applications ***
*** without express written permission from the author. ***
*******************************************************************
*/
#include "header.h"
char* cdealloc(char* line) {
line = trim(line);
line = cexpr(line, 0);
Asm(" inc r7 ; Get transfer address");
Asm(" lda r7");
Asm(" plo rf");
Asm(" ldn r7");
Asm(" phi rf");
if (use32Bits) {
Asm(" inc r7 ; Remove high word from stack");
Asm(" inc r7");
}
Asm(" sep scall ; Call dealloc routine");
Asm(" dw dealloc");
return line;
}