From 52daf0722f7f4ad9d3f29e3cbbbaddde066f49f3 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 20 May 2019 01:44:06 -0700 Subject: 5211 Update syntax-highlighted renderings after a _long_ time. --- html/subx/037heap.cc.html | 90 ----------------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 html/subx/037heap.cc.html (limited to 'html/subx/037heap.cc.html') diff --git a/html/subx/037heap.cc.html b/html/subx/037heap.cc.html deleted file mode 100644 index 7065f55b..00000000 --- a/html/subx/037heap.cc.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -Mu - subx/037heap.cc - - - - - - - - - - -https://github.com/akkartik/mu/blob/master/subx/037heap.cc -
- 1 //: Support for dynamic allocation.
- 2 //:
- 3 //: Just provide a special label marking the first unused address in the data
- 4 //: segment. Then we'll write SubX helpers to make use of it.
- 5 
- 6 :(before "Begin rewrite_global_variables")
- 7 insert_heap_global_variable(p);
- 8 :(code)
- 9 void insert_heap_global_variable(program& p) {
-10   if (SIZE(p.segments) < 2)
-11     return;  // no data segment defined
-12   // Start-of-heap:
-13   p.segments.at(1).lines.push_back(label("Start-of-heap"));
-14 }
-15 
-16 line label(string s) {
-17   line result;
-18   result.words.push_back(word());
-19   result.words.back().data = (s+":");
-20   return result;
-21 }
-22 
-23 line imm32(const string& s) {
-24   line result;
-25   result.words.push_back(word());
-26   result.words.back().data = s;
-27   result.words.back().metadata.push_back("imm32");
-28   return result;
-29 }
-
- - - -- cgit 1.4.1-2-gfad0